ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ccMPlanePoint.cpp
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #include "ecvGenericPointCloud.h"
9 
10 // Local dependencies
11 #include "ccMPlanePoint.h"
12 
13 unsigned int ccMPlanePoint::getIndex() const {
14  return m_label->getPickedPoint(0).index;
15 }
16 
18  return *m_label->getPickedPoint(0).cloudOrVertices()->getPoint(getIndex());
19 }
20 
21 cc2DLabel* ccMPlanePoint::getLabel() { return m_label; }
22 
23 QString ccMPlanePoint::getName() const { return m_label->getName(); }
24 
25 void ccMPlanePoint::setName(const QString& newName) {
26  m_label->setName(newName);
27 }
28 
29 float ccMPlanePoint::getDistance() const { return m_distance; }
30 
31 void ccMPlanePoint::setDistance(float distance) { m_distance = distance; }
2D label (typically attached to points)
Definition: ecv2DLabel.h:22
const PickedPoint & getPickedPoint(unsigned index) const
Returns a given point.
Definition: ecv2DLabel.h:194
virtual QString getName() const override
Returns object name.
void setDistance(float)
float getDistance() const
unsigned int getIndex() const
cc2DLabel * getLabel()
const CCVector3 & getCoordinates() const
void setName(const QString &newName)
QString getName() const
virtual void setName(const QString &name)
Sets object name.
Definition: ecvObject.h:75
virtual const CCVector3 * getPoint(unsigned index) const =0
Returns the ith point.
unsigned index
Point/triangle index.
Definition: ecv2DLabel.h:128
ccGenericPointCloud * cloudOrVertices() const
Returns the cloud or the mesh vertices.