ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvCylinder.h
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 #pragma once
9 
10 // Local
11 #include "ecvCone.h"
12 
14 
17 public:
19 
21  static const unsigned DEFAULT_DRAWING_PRECISION = 24;
22 
24 
34  const ccGLMatrix* transMat = nullptr,
35  QString name = QString("Cylinder"),
36  unsigned precision = DEFAULT_DRAWING_PRECISION);
37 
39 
41  ccCylinder(QString name = QString("Cylinder"));
42 
44  virtual CV_CLASS_ENUM getClassID() const override {
45  return CV_TYPES::CYLINDER;
46  }
47 
48  // inherited from ccGenericPrimitive
49  virtual QString getTypeName() const override { return "Cylinder"; }
50  virtual ccGenericPrimitive* clone() const override;
51 
52  // inherited from ccCone
53  virtual void setBottomRadius(PointCoordinateType radius) override;
54  inline virtual void setTopRadius(PointCoordinateType radius) override {
55  return setBottomRadius(radius);
56  }
57 };
float PointCoordinateType
Type of the coordinates of a (N-D) point.
Definition: CVTypes.h:16
int64_t CV_CLASS_ENUM
Type of object type flags (64 bits)
Definition: CVTypes.h:97
#define CV_DB_LIB_API
Definition: CV_db.h:15
std::string name
int height
Cone (primitive)
Definition: ecvCone.h:16
virtual void setBottomRadius(PointCoordinateType radius)
Sets bottom radius.
Cylinder (primitive)
Definition: ecvCylinder.h:16
virtual void setTopRadius(PointCoordinateType radius) override
Sets top radius.
Definition: ecvCylinder.h:54
virtual ccGenericPrimitive * clone() const override
Clones primitive.
virtual CV_CLASS_ENUM getClassID() const override
Returns class ID.
Definition: ecvCylinder.h:44
ccCylinder(PointCoordinateType radius, PointCoordinateType height, const ccGLMatrix *transMat=nullptr, QString name=QString("Cylinder"), unsigned precision=DEFAULT_DRAWING_PRECISION)
Default constructor.
ccCylinder(QString name=QString("Cylinder"))
Simplified constructor.
virtual QString getTypeName() const override
Returns type name (sphere, cylinder, etc.)
Definition: ecvCylinder.h:49
virtual void setBottomRadius(PointCoordinateType radius) override
Sets bottom radius.
Float version of ccGLMatrixTpl.
Definition: ecvGLMatrix.h:19
Generic primitive interface.
@ CYLINDER
Definition: CVTypes.h:126