30 QString
name = QString(
"Plane"));
43 virtual QString
getTypeName()
const override {
return "Plane"; }
57 return m_transformation.getTranslationAsVec3D();
74 return m_transformation.getColumnAsVec3D(2);
83 QString imageFilename = QString());
float PointCoordinateType
Type of the coordinates of a (N-D) point.
int64_t CV_CLASS_ENUM
Type of object type flags (64 bits)
std::shared_ptr< core::Tensor > image
Float version of ccGLMatrixTpl.
Generic primitive interface.
virtual bool updateRepresentation()
Updates internal representation (as a mesh)
Interface for a planar entity.
virtual ccGenericPrimitive * clone() const override
Clones primitive.
bool fromFile_MeOnly(QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override
Loads own object data.
PointCoordinateType m_yWidth
Width along 'Y' dimension.
static ccPlane * Fit(cloudViewer::GenericIndexedCloudPersist *cloud, double *rms=0)
Fits a plane primitive on a cloud.
virtual bool buildUp() override
Builds primitive.
CCVector3 getCenter() const
Returns the center.
CCVector3 getNormal() const override
Returns the entity normal.
ccPlane(PointCoordinateType xWidth, PointCoordinateType yWidth, const ccGLMatrix *transMat=nullptr, QString name=QString("Plane"))
Default constructor.
void flip()
Flips the plane.
virtual QString getTypeName() const override
Returns type name (sphere, cylinder, etc.)
bool setAsTexture(QImage image, QString imageFilename=QString())
Sets an image as texture.
const PointCoordinateType * getEquation()
Returns the equation of the plane.
void setXWidth(PointCoordinateType w, bool autoUpdate=true)
Sets 'X' width.
PointCoordinateType m_xWidth
Width along 'X' dimension.
void getEquation(CCVector3 &N, PointCoordinateType &constVal) const
Returns the equation of the plane.
PointCoordinateType getXWidth() const
Returns 'X' width.
virtual ccBBox getOwnFitBB(ccGLMatrix &trans) override
Returns best-fit bounding-box (if available)
bool toFile_MeOnly(QFile &out, short dataVersion) const override
Save own object data.
short minimumFileVersion_MeOnly() const override
PointCoordinateType getYWidth() const
Returns 'Y' width.
virtual void drawMeOnly(CC_DRAW_CONTEXT &context) override
Enables (OpenGL) stipple mask.
void setYWidth(PointCoordinateType h, bool autoUpdate=true)
Sets 'Y' width.
ccPlane(QString name=QString("Plane"))
Simplified constructor.
virtual CV_CLASS_ENUM getClassID() const override
Returns class ID.
static bool SetQuadTexture(ccMesh *quadMesh, QImage image, QString imageFilename=QString())
Sets an image as texture for a quad mesh.
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.