Go to the documentation of this file.
39 bool traceRay(const
mrpt::poses::CPose3D& o,
double& dist) const override;
122 const float baseRadius,
const float topRadius,
const float height = 1,
123 const int slices = 10)
174 : (Z <= m_height && Z >= 0);
bool m_hasTopBase
Boolean parameters about including the bases in the object.
CCylinder(const float baseRadius, const float topRadius, const float height=1, const int slices=10)
Complete constructor.
void notifyChange() const
Call to enable calling renderUpdateBuffers() before the next render() rendering iteration.
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
bool reachesHeight(double Z) const
void setHeight(float height)
Chenges cylinder's height.
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 onUpdateBuffers_Triangles() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
~CCylinder() override=default
Destructor.
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...
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...
float m_height
Cylinder's height.
float m_baseRadius
Cylinder's radii.
bool reachesHeight(float Z) const
Checks whether the cylinder exists at some height.
float d2f(const double d)
shortcut for static_cast<float>(double)
void setSlicesCount(uint32_t slices)
Number of radial divisions
float getBottomRadius() const
Gets the bottom radius.
bool traceRay(const mrpt::poses::CPose3D &o, double &dist) const override
Simulation of ray-trace, given a pose.
bool hasTopBase() const
Check whether top base is displayed.
uint32_t m_slices
Number of radial divisions.
#define DEFINE_SCHEMA_SERIALIZABLE()
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
uint32_t getSlicesCount() const
Number of radial divisions
Renderizable generic renderer for objects using the triangles shader.
The namespace for 3D scene representation and rendering.
void setHasBases(bool top=true, bool bottom=true)
Configuration of the cylinder's bases display.
Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Sun Jul 19 17:54:30 UTC 2020 | |