Go to the documentation of this file.
30 #if MRPT_HAS_OPENGL_GLUT
36 GLUquadricObj*
obj = gluNewQuadric();
38 gluDisk(
obj, m_radiusIn, m_radiusOut, m_nSlices, m_nLoops);
40 gluDeleteQuadric(
obj);
49 writeToStreamRender(out);
50 out << m_radiusIn << m_radiusOut;
51 out << m_nSlices << m_nLoops;
60 readFromStreamRender(
in);
61 in >> m_radiusIn >> m_radiusOut;
81 CPose3D transf = this->m_pose - o;
82 double x = transf.
x(),
y = transf.
y(),
z = transf.z(),
w = transf.
yaw(),
84 double coef = sin(
w) * sin(
r) + cos(
w) * sin(
p) * cos(
r);
90 if (coef == 0)
return false;
95 (
y * (sin(
p) * sin(
w) * cos(
r) - cos(
w) * sin(
r)) +
96 z * cos(
p) * cos(
r)) /
98 if (dist < 0)
return false;
100 double d2 = (
x - dist) * (
x - dist) +
y *
y +
z *
z;
101 return d2 >= (m_radiusIn * m_radiusIn) && d2 <= (m_radiusOut * m_radiusOut);
110 bb_min.
x = -std::max(m_radiusIn, m_radiusOut);
114 bb_max.
x = std::max(m_radiusIn, m_radiusOut);
119 m_pose.composePoint(bb_min, bb_min);
120 m_pose.composePoint(bb_max, bb_max);
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...
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
double pitch() const
Get the PITCH angle (in radians)
A renderizable object suitable for rendering with OpenGL's display lists.
GLsizei GLsizei GLuint * obj
GLAPI void GLAPIENTRY glDisable(GLenum cap)
EIGEN_STRONG_INLINE void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated)
GLAPI void GLAPIENTRY glEnable(GLenum cap)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
GLubyte GLubyte GLubyte GLubyte w
Virtual base class for "archives": classes abstracting I/O streams.
GLdouble GLdouble GLdouble r
void checkOpenGLError()
Checks glGetError and throws an exception if an error situation is found.
#define GL_ONE_MINUS_SRC_ALPHA
double x() const
Common members of all points & poses classes.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
double x
X,Y,Z coordinates.
double roll() const
Get the ROLL angle (in radians)
A planar disk in the XY plane.
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
bool traceRay(const mrpt::poses::CPose3D &o, double &dist) const override
Ray tracing.
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
double yaw() const
Get the YAW angle (in radians)
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
The namespace for 3D scene representation and rendering.
GLAPI void GLAPIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor)
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 | |