Go to the documentation of this file.
9 #ifndef opengl_CCylinder_H
10 #define opengl_CCylinder_H
173 const float baseRadius,
const float topRadius,
const float height = 1,
174 const int slices = 10,
const int stacks = 10)
204 : (Z <= mHeight && Z >= 0);
uint32_t getStacksCount() const
Sets the amount of stacks used to display the object.
void setStacksCount(uint32_t stacks)
Gets how many stacks are used in the cylinder's lateral area.
CCylinder()
Basic empty constructor.
void setHeight(float height)
Chenges cylinder's height.
A renderizable object suitable for rendering with OpenGL's display lists.
EIGEN_STRONG_INLINE void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated)
void render_dl() const override
Render.
A cylinder or cone whose base lies in the XY plane.
bool hasBottomBase() const
Check whether bottom base is displayed.
void setRadius(float radius)
Sets both radii to a single value, thus configuring the object as a cylinder.
void setRadii(float bottom, float top)
Sets both radii independently.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
float getTopRadius() const
Gets the top radius.
void getBoundingBox(mrpt::math::TPoint3D &bb_min, mrpt::math::TPoint3D &bb_max) const override
Evaluates the bounding box of this object (including possible children) in the coordinate frame of th...
GLdouble GLdouble GLdouble r
float getHeight() const
Gets the cylinder's height.
bool getRadius(float Z, float &r) const
Gets the radius of the circunference located at certain height, returning false if the cylinder doesn...
CCylinder(const float baseRadius, const float topRadius, const float height=1, const int slices=10, const int stacks=10)
Complete constructor.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
bool reachesHeight(float Z) const
Checks whether the cylinder exists at some height.
uint32_t mSlices
Implementation parameters on which depend the number of actually rendered polygons.
void setSlicesCount(uint32_t slices)
Gets how many slices are used in the cylinder's lateral area and in its bases.
GLenum GLsizei GLsizei height
bool mHasTopBase
Boolean parameters about including the bases in the object.
float getBottomRadius() const
Gets the bottom radius.
bool traceRay(const mrpt::poses::CPose3D &o, double &dist) const override
Ray tracing.
bool hasTopBase() const
Check whether top base is displayed.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
float mBaseRadius
Cylinder's radii.
uint32_t getSlicesCount() const
Sets the amount of slices used to display the object.
virtual ~CCylinder()
Destructor.
unsigned __int32 uint32_t
float mHeight
Cylinder's height.
void setHasBases(bool top=true, bool bottom=true)
Configuration of the cylinder's bases display.
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |