ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cc2DLabel::PickedPoint Struct Reference

Picked point descriptor. More...

#include <ecv2DLabel.h>

Collaboration diagram for cc2DLabel::PickedPoint:

Public Member Functions

CCVector3 getPointPosition () const
 Returns the point position (3D) More...
 
ccGenericPointCloudcloudOrVertices () const
 Returns the cloud or the mesh vertices. More...
 
unsigned getUniqueID () const
 Returns the cloud or the mesh unique ID. More...
 
ccHObjectentity () const
 Returns the associated entity (cloud or mesh) More...
 
QString itemTitle () const
 
QString prefix (const char *pointTag) const
 Returns the point prefix ('Point' or 'Point@Tri' or 'IDXX Center') More...
 
 PickedPoint ()
 Default constructor. More...
 
 PickedPoint (ccGenericPointCloud *_cloud, unsigned pointIndex, bool centerPoint=false)
 Constructor from a point and its index. More...
 
 PickedPoint (ccGenericMesh *_mesh, unsigned triIindex, const CCVector2d &_uv, bool centerPoint=false)
 Constructor from a triangle, its index and barycentric coordinates. More...
 

Public Attributes

ccGenericPointCloudcloud
 Cloud. More...
 
ccGenericMeshmesh
 Mesh. More...
 
unsigned index
 Point/triangle index. More...
 
CCVector3d pos2D
 Last known '2D' position (i.e. in screen space) More...
 
float markerScale
 Last known marker scale. More...
 
CCVector2d uv
 Barycentric coordinates (for triangles) More...
 
bool entityCenterPoint
 Entity center mode (index will be invalid) More...
 

Detailed Description

Picked point descriptor.

Label 'points' can be shared between multiple entities

Definition at line 122 of file ecv2DLabel.h.

Constructor & Destructor Documentation

◆ PickedPoint() [1/3]

cc2DLabel::PickedPoint::PickedPoint ( )
inline

Default constructor.

Definition at line 155 of file ecv2DLabel.h.

◆ PickedPoint() [2/3]

cc2DLabel::PickedPoint::PickedPoint ( ccGenericPointCloud _cloud,
unsigned  pointIndex,
bool  centerPoint = false 
)
inline

Constructor from a point and its index.

Definition at line 165 of file ecv2DLabel.h.

◆ PickedPoint() [3/3]

cc2DLabel::PickedPoint::PickedPoint ( ccGenericMesh _mesh,
unsigned  triIindex,
const CCVector2d _uv,
bool  centerPoint = false 
)
inline

Constructor from a triangle, its index and barycentric coordinates.

Definition at line 177 of file ecv2DLabel.h.

Member Function Documentation

◆ cloudOrVertices()

ccGenericPointCloud * cc2DLabel::PickedPoint::cloudOrVertices ( ) const

Returns the cloud or the mesh vertices.

Definition at line 104 of file ecv2DLabel.cpp.

Referenced by define_cc2DLabel(), and ccMPlanePoint::getCoordinates().

◆ entity()

ccHObject * cc2DLabel::PickedPoint::entity ( ) const

◆ getPointPosition()

CCVector3 cc2DLabel::PickedPoint::getPointPosition ( ) const

Returns the point position (3D)

Definition at line 74 of file ecv2DLabel.cpp.

References uv.

Referenced by define_cc2DLabel(), cc2DLabel::pointPicking(), and ecvDisplayTools::StartCPUBasedPointPicking().

◆ getUniqueID()

unsigned cc2DLabel::PickedPoint::getUniqueID ( ) const

Returns the cloud or the mesh unique ID.

Definition at line 96 of file ecv2DLabel.cpp.

Referenced by define_cc2DLabel(), and itemTitle().

◆ itemTitle()

QString cc2DLabel::PickedPoint::itemTitle ( ) const

Returns the item 'title' (either its index or 'Center' if it's a center point)

Definition at line 51 of file ecv2DLabel.cpp.

References CENTER_STRING, entity(), entityCenterPoint, getUniqueID(), and index.

Referenced by define_cc2DLabel().

◆ prefix()

QString cc2DLabel::PickedPoint::prefix ( const char *  pointTag) const

Returns the point prefix ('Point' or 'Point@Tri' or 'IDXX Center')

Definition at line 61 of file ecv2DLabel.cpp.

References CENTER_STRING.

Referenced by define_cc2DLabel().

Member Data Documentation

◆ cloud

◆ entityCenterPoint

bool cc2DLabel::PickedPoint::entityCenterPoint

Entity center mode (index will be invalid)

Definition at line 138 of file ecv2DLabel.h.

Referenced by cc2DLabel::addPickedPoint(), define_cc2DLabel(), and itemTitle().

◆ index

◆ markerScale

float cc2DLabel::PickedPoint::markerScale

Last known marker scale.

Definition at line 134 of file ecv2DLabel.h.

Referenced by cc2DLabel::pointPicking().

◆ mesh

ccGenericMesh* cc2DLabel::PickedPoint::mesh

◆ pos2D

CCVector3d cc2DLabel::PickedPoint::pos2D

Last known '2D' position (i.e. in screen space)

This position is updated on each call to drawMeOnly3D

Definition at line 132 of file ecv2DLabel.h.

Referenced by define_cc2DLabel().

◆ uv

CCVector2d cc2DLabel::PickedPoint::uv

Barycentric coordinates (for triangles)

Definition at line 136 of file ecv2DLabel.h.

Referenced by cc2DLabel::addPickedPoint(), and define_cc2DLabel().


The documentation for this struct was generated from the following files: