30 return CDiskPtr(
new CDisk(radiusOut,radiusIn,slices,loops));
37 #if MRPT_HAS_OPENGL_GLUT 43 GLUquadricObj *
obj = gluNewQuadric();
52 gluDeleteQuadric(
obj);
69 writeToStreamRender(out);
70 out << m_radiusIn << m_radiusOut;
71 out << m_nSlices << m_nLoops;
85 readFromStreamRender(
in);
86 in >> m_radiusIn >> m_radiusOut;
105 double coef=sin(
w)*sin(
r)+cos(
w)*sin(
p)*cos(
r);
109 if (coef==0)
return false;
112 dist=
x+(
y*(sin(
p)*sin(
w)*cos(
r)-cos(
w)*sin(
r))+
z*cos(
p)*cos(
r))/coef;
113 if (dist<0)
return false;
115 double d2=(
x-dist)*(
x-dist)+
y*
y+
z*
z;
116 return d2>=(m_radiusIn*m_radiusIn)&&d2<=(m_radiusOut*m_radiusOut);
123 bb_min.
x = -std::max(m_radiusIn, m_radiusOut);
127 bb_max.
x = std::max(m_radiusIn, m_radiusOut);
132 m_pose.composePoint(bb_min, bb_min);
133 m_pose.composePoint(bb_max, bb_max);
double x() const
Common members of all points & poses classes.
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
GLAPI void GLAPIENTRY glEnable(GLenum cap)
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
double pitch() const
Get the PITCH angle (in radians)
double yaw() const
Get the YAW angle (in radians)
EIGEN_STRONG_INLINE void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated) ...
#define GL_ONE_MINUS_SRC_ALPHA
void readFromStream(mrpt::utils::CStream &in, int version)
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly...
double z
X,Y,Z coordinates.
GLsizei GLsizei GLuint * obj
GLubyte GLubyte GLubyte GLubyte w
GLAPI void GLAPIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor)
A renderizable object suitable for rendering with OpenGL's display lists.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
void writeToStream(mrpt::utils::CStream &out, int *getVersion) const
Introduces a pure virtual method responsible for writing to a CStream.
A planar disk in the XY plane.
bool traceRay(const mrpt::poses::CPose3D &o, double &dist) const MRPT_OVERRIDE
Ray tracing.
double roll() const
Get the ROLL angle (in radians)
void render_dl() const MRPT_OVERRIDE
Render.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
GLdouble GLdouble GLdouble r
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
void OPENGL_IMPEXP checkOpenGLError()
Checks glGetError and throws an exception if an error situation is found.
The namespace for 3D scene representation and rendering.
unsigned __int32 uint32_t
GLAPI void GLAPIENTRY glDisable(GLenum cap)
void getBoundingBox(mrpt::math::TPoint3D &bb_min, mrpt::math::TPoint3D &bb_max) const MRPT_OVERRIDE
Evaluates the bounding box of this object (including possible children) in the coordinate frame of th...