28 virtual QString
getName()
const override;
42 QStringList getLabelContent(
int precision)
const;
48 QString getTitle(
int precision)
const;
57 int screenHeight)
override;
60 void setPosition(
float x,
float y);
63 inline const float*
getPosition()
const {
return m_screenPos; }
66 void clear(
bool ignoreDependencies =
false,
bool ignoreCaption =
true);
68 void clearLabel(
bool ignoreCaption =
true);
74 inline unsigned size()
const {
75 return static_cast<unsigned>(m_pickedPoints.size());
87 bool entityCenter =
false);
97 unsigned triangleIndex,
99 bool entityCenter =
false);
150 QString itemTitle()
const;
152 QString prefix(
const char* pointTag)
const;
162 entityCenterPoint(false) {}
167 bool centerPoint =
false)
174 entityCenterPoint(centerPoint) {}
180 bool centerPoint =
false)
187 entityCenterPoint(centerPoint) {}
191 bool addPickedPoint(
const PickedPoint& pp);
195 return m_pickedPoints[index];
199 return m_pickedPoints[index];
206 m_relMarkerScale = scale;
212 int& nearestPointIndex,
213 double& nearestSquareDist)
const;
240 sfValueIsShifted(false) {}
244 void getLabelInfo1(LabelInfo1& info)
const;
251 static QString GetSFValueAsString(
const LabelInfo1& info,
int precision);
269 void getLabelInfo2(LabelInfo2& info)
const;
297 void getLabelInfo3(LabelInfo3& info)
const;
300 bool toFile_MeOnly(QFile& out,
short dataVersion)
const override;
305 LoadedIDMap& oldToNewIDMap)
override;
341 float m_screenPos[2];
344 int m_lastScreenPos[2];
float PointCoordinateType
Type of the coordinates of a (N-D) point.
int64_t CV_CLASS_ENUM
Type of object type flags (64 bits)
2D label (typically attached to points)
const PickedPoint & getPickedPoint(unsigned index) const
Returns a given point.
virtual CV_CLASS_ENUM getClassID() const override
Returns class ID.
QRect m_labelROI
label ROI
bool m_dispIn2D
Whether to display the label in 2D.
float m_relMarkerScale
Relative marker scale.
bool isCollapsed() const
Returns whether the label is collapsed or not.
QString getRawName() const
Returns 'raw' name (no replacement of default keywords)
void setRelativeMarkerScale(float scale)
Sets marker (relative) scale.
const float * getPosition() const
Returns relative position.
PickedPoint & getPickedPoint(unsigned index)
Returns a given point.
void setCollapsed(bool state)
Whether to collapse label or not.
bool isPointLegendDisplayed() const
Returns whether the point(s) legend is displayed.
void setDisplayedIn2D(bool state)
Whether to display the label in 2D.
unsigned size() const
Returns current size.
std::vector< PickedPoint > m_pickedPoints
Picked points.
bool m_dispPointsLegend
Whether to display the point(s) legend.
virtual bool isSerializable() const override
Returns whether object is serializable of not.
bool isDisplayedIn2D() const
Returns whether the label is displayed in 2D.
QStringList m_historyMessage
bool m_showFullBody
Whether to show full label body or not.
void displayPointLegend(bool state)
Whether to display the point(s) legend (title only)
A 3D cloud interface with associated features (color, normals, octree, etc.)
Hierarchical CLOUDVIEWER Object.
virtual void drawMeOnly(CC_DRAW_CONTEXT &context)
Draws the entity only (not its children)
virtual short minimumFileVersion_MeOnly() const
virtual bool fromFile_MeOnly(QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap)
Loads own object data.
virtual bool toFile_MeOnly(QFile &out, short dataVersion) const
Save own object data.
virtual void onDeletionOf(const ccHObject *obj)
This method is called when another object is deleted.
Interactor interface (entity that can be dragged or clicked in a 3D view)
virtual bool acceptClick(int x, int y, Qt::MouseButton button)
Called on mouse click.
virtual bool move2D(int x, int y, int dx, int dy, int screenWidth, int screenHeight)
Called on mouse move (for 2D interactors)
virtual QString getName() const
Returns object name.
virtual unsigned getUniqueID() const
Returns object unique ID.
QString m_name
Object name.
ccGenericPointCloud * cloud
LabelInfo1()
Default constructor.
LabelInfo2()
Default constructor.
ccGenericPointCloud * cloud1
ccGenericPointCloud * cloud2
LabelInfo3()
Default constructor.
ccGenericPointCloud * cloud1
ccGenericPointCloud * cloud2
ccGenericPointCloud * cloud3
CCVector2d uv
Barycentric coordinates (for triangles)
PickedPoint()
Default constructor.
unsigned index
Point/triangle index.
PickedPoint(ccGenericPointCloud *_cloud, unsigned pointIndex, bool centerPoint=false)
Constructor from a point and its index.
ccGenericMesh * mesh
Mesh.
bool entityCenterPoint
Entity center mode (index will be invalid)
float markerScale
Last known marker scale.
CCVector3d pos2D
Last known '2D' position (i.e. in screen space)
ccGenericPointCloud * cloud
Cloud.
PickedPoint(ccGenericMesh *_mesh, unsigned triIindex, const CCVector2d &_uv, bool centerPoint=false)
Constructor from a triangle, its index and barycentric coordinates.
OpenGL camera parameters.