21 static const unsigned DEFAULT_DRAWING_PRECISION = 24;
37 double angle_rad = 2.0 *
M_PI,
38 bool rectangularSection =
false,
41 QString
name = QString(
"Torus"),
42 unsigned precision = DEFAULT_DRAWING_PRECISION);
55 virtual QString
getTypeName()
const override {
return "Torus"; }
61 return m_insideRadius;
65 return m_outsideRadius;
70 return m_rectSectionHeight;
80 bool toFile_MeOnly(QFile& out,
short dataVersion)
const override;
85 LoadedIDMap& oldToNewIDMap)
override;
86 virtual bool buildUp()
override;
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.
virtual ccGenericPrimitive * clone() const =0
Clones primitive.
bool toFile_MeOnly(QFile &out, short dataVersion) const override
Save own object data.
virtual bool buildUp()=0
Builds primitive.
bool fromFile_MeOnly(QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override
Loads own object data.
short minimumFileVersion_MeOnly() const override
double getAngleRad() const
Returns the torus subtended angle (in radians)
PointCoordinateType getInsideRadius() const
Returns the torus inside radius.
virtual bool hasDrawingPrecision() const override
Whether drawing is dependent on 'precision' parameter.
double m_angle_rad
Subtended angle (in radians)
PointCoordinateType m_insideRadius
Inside radius.
PointCoordinateType m_rectSectionHeight
Rectangular section height (along Y-axis) if applicable.
virtual QString getTypeName() const override
Returns type name (sphere, cylinder, etc.)
virtual CV_CLASS_ENUM getClassID() const override
Returns class ID.
bool m_rectSection
Whether torus has a rectangular (true) or circular (false) section.
PointCoordinateType getRectSectionHeight() const
PointCoordinateType m_outsideRadius
Outside radius.
PointCoordinateType getOutsideRadius() const
Returns the torus outside radius.
bool getRectSection() const