21 static const unsigned DEFAULT_DRAWING_PRECISION = 24;
38 QString
name = QString(
"Quadric"),
39 unsigned precision = DEFAULT_DRAWING_PRECISION);
52 virtual QString
getTypeName()
const override {
return "Quadric"; }
float PointCoordinateType
Type of the coordinates of a (N-D) point.
int64_t CV_CLASS_ENUM
Type of object type flags (64 bits)
Float version of ccGLMatrixTpl.
Generic primitive interface.
CCVector2 m_maxCorner
Max corner.
const Tuple3ub & getEquationDims() const
const CCVector2 & getMaxCorner() const
Returns the quadric max corner.
virtual CV_CLASS_ENUM getClassID() const override
Returns class ID.
short minimumFileVersion_MeOnly() const override
PointCoordinateType m_minZ
Min height.
CCVector2 m_minCorner
Min corner.
virtual ccBBox getOwnFitBB(ccGLMatrix &trans) override
Returns best-fit bounding-box (if available)
ccQuadric(CCVector2 minCorner, CCVector2 maxCorner, const PointCoordinateType eq[6], const Tuple3ub *dims=0, const ccGLMatrix *transMat=0, QString name=QString("Quadric"), unsigned precision=DEFAULT_DRAWING_PRECISION)
Default constructor.
bool fromFile_MeOnly(QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override
Loads own object data.
virtual ccGenericPrimitive * clone() const override
Clones primitive.
Tuple3ub m_dims
Dimension indexes.
QString getEquationString() const
Returns the quadric equation coefficients as a string.
const PointCoordinateType * getEquationCoefs() const
Returns the quadric equation coefficients.
virtual bool buildUp() override
Builds primitive.
ccQuadric(QString name=QString("Quadric"))
Simplified constructor.
bool toFile_MeOnly(QFile &out, short dataVersion) const override
Save own object data.
virtual QString getTypeName() const override
Returns type name (sphere, cylinder, etc.)
PointCoordinateType m_maxZ
Max height.
const CCVector2 & getMinCorner() const
Returns the quadric min corner.
PointCoordinateType projectOnQuadric(const CCVector3 &P, CCVector3 &Q) const
Projects a 3D point in the quadric coordinate system.
static ccQuadric * Fit(cloudViewer::GenericIndexedCloudPersist *cloud, double *rms)
Fits a quadric primitive on a cloud.
virtual bool hasDrawingPrecision() const override
Whether drawing is dependent on 'precision' parameter.
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.