15 class GenericIndexedCloudPersist;
32 QString
name = QString(
"Facet"));
48 bool transferOwnership =
false,
68 inline double getRMS()
const {
return m_rms; }
73 return m_planeEquation;
94 return m_contourVertices;
101 return m_originPoints;
110 m_contourVertices = cloud;
130 bool relative =
true)
override;
132 const Eigen::Vector3d& center)
override;
134 const Eigen::Vector3d& center)
override;
158 bool createInternalRepresentation(
Vector3Tpl< PointCoordinateType > CCVector3
Default 3D Vector.
float PointCoordinateType
Type of the coordinates of a (N-D) point.
int64_t CV_CLASS_ENUM
Type of object type flags (64 bits)
ccFacet * clone() const
Clones this facet.
ccMesh * getPolygon()
Returns polygon mesh (if any)
short minimumFileVersion_MeOnly() const override
double getSurface() const
Returns associated surface area.
virtual Eigen::Vector3d GetMaxBound() const override
Returns max bounds for geometry coordinates.
virtual ccBBox GetAxisAlignedBoundingBox() const override
Returns an axis-aligned bounding box of the geometry.
virtual void drawMeOnly(CC_DRAW_CONTEXT &context) override
Draws the entity only (not its children)
virtual ccFacet & Translate(const Eigen::Vector3d &translation, bool relative=true) override
Apply translation to the geometry coordinates.
ccFacet & operator+=(const ccFacet &polyline)
bool clone(ccFacet *facet) const
const ccPointCloud * getContourVertices() const
Returns contour vertices (if any)
virtual Eigen::Vector3d GetMinBound() const override
Returns min bounds for geometry coordinates.
ccFacet operator+(const ccFacet &polyline) const
const PointCoordinateType * getPlaneEquation() const
Returns plane equation.
ccPolyline * getContour()
Returns contour polyline (if any)
bool fromFile_MeOnly(QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override
Loads own object data.
double m_rms
RMS (relatively to m_associatedPoints)
ccFacet(PointCoordinateType maxEdgeLength=0, QString name=QString("Facet"))
Default constructor.
const ccMesh * getPolygon() const
Returns polygon mesh (if any)
ccMesh * m_polygonMesh
Facet.
virtual bool isSerializable() const override
Returns whether object is serializable of not.
double m_surface
Surface (m_polygon)
ccPointCloud * m_originPoints
Origin points.
virtual void applyGLTransformation(const ccGLMatrix &trans) override
Applies a GL transformation to the entity.
virtual ecvOrientedBBox GetOrientedBoundingBox() const override
CCVector3 getNormal() const override
Returns the entity normal.
PointCoordinateType m_maxEdgeLength
Max length.
void invertNormal()
Inverts the facet normal.
void setContour(ccPolyline *poly)
Sets contour polyline.
virtual Eigen::Vector3d GetCenter() const override
Returns the center of the geometry coordinates.
virtual bool IsEmpty() const override
ccPolyline * m_contourPolyline
Facet contour.
double getRMS() const
Returns associated RMS.
const ccPolyline * getContour() const
Returns contour polyline (if any)
virtual CV_CLASS_ENUM getClassID() const override
Returns class ID.
ccFacet & operator=(const ccFacet &polyline)
void setColor(const ecvColor::Rgb &rgb)
Sets the facet unique color.
std::shared_ptr< ccMesh > m_arrow
for python interface use
void setContourVertices(ccPointCloud *cloud)
Sets contour vertices.
static ccFacet * Create(cloudViewer::GenericIndexedCloudPersist *cloud, PointCoordinateType maxEdgeLength=0, bool transferOwnership=false, const PointCoordinateType *planeEquation=nullptr)
Creates a facet from a set of points.
ccFacet & PaintUniformColor(const Eigen::Vector3d &color)
Assigns each line in the LineSet the same color.
CCVector3 m_center
Facet centroid.
virtual ccFacet & Rotate(const Eigen::Matrix3d &R, const Eigen::Vector3d ¢er) override
Apply rotation to the geometry coordinates and normals. Given a rotation matrix , and center ,...
ccFacet(const ccFacet &poly)
Copy constructor.
const CCVector3 & getCenter() const
Returns the facet center.
virtual ccFacet & Transform(const Eigen::Matrix4d &transformation) override
Apply transformation (4x4 matrix) to the geometry coordinates.
ccPointCloud * getContourVertices()
Returns contour vertices (if any)
const ccPointCloud * getOriginPoints() const
Returns origin points (if any)
void setPolygon(ccMesh *mesh)
Sets polygon mesh.
bool toFile_MeOnly(QFile &out, short dataVersion) const override
Save own object data.
ccPointCloud * m_contourVertices
Shared vertices (between polygon and contour)
std::shared_ptr< ccMesh > getNormalVectorMesh(bool update=false)
Gets normal vector mesh.
virtual ~ccFacet() override
Destructor.
void setOriginPoints(ccPointCloud *cloud)
Sets origin points.
ccPointCloud * getOriginPoints()
Returns origin points (if any)
virtual ccFacet & Scale(const double s, const Eigen::Vector3d ¢er) override
Apply scaling to the geometry coordinates. Given a scaling factor , and center , a given point is tr...
Float version of ccGLMatrixTpl.
Hierarchical CLOUDVIEWER Object.
Interface for a planar entity.
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
QMultiMap< unsigned, unsigned > LoadedIDMap
Map of loaded unique IDs (old ID --> new ID)
A generic 3D point cloud with index-based and presistent access to points.
constexpr static RgbTpl FromEigen(const Eigen::Vector3d &t)
bool setColor(ccHObject::Container selectedEntities, bool colorize, QWidget *parent)
Generic file read and write utility for python interface.