28 #if MRPT_HAS_OPENGL_GLUT    38     if (m_keepRadiusIndependentEyeDistance)
    44         float eye_distance = raster_pos[3];
    46         eye_distance = max(eye_distance, 0.1f);
    48         real_radius = 0.01 * m_radius * eye_distance;
    51         real_radius = m_radius;
    53     GLUquadricObj* 
obj = gluNewQuadric();
    56     gluQuadricDrawStyle(
obj, GLU_FILL);
    57     gluQuadricNormals(
obj, GLU_SMOOTH);
    59     gluSphere(
obj, real_radius, m_nDivsLongitude, m_nDivsLatitude);
    62     gluDeleteQuadric(
obj);
    77     writeToStreamRender(out);
    80         << m_keepRadiusIndependentEyeDistance;
    89             readFromStreamRender(
in);
    96                 in >> m_keepRadiusIndependentEyeDistance;
    98                 m_keepRadiusIndependentEyeDistance = 
false;
   117     CPose3D transf = this->m_pose - o;
   118     double x = transf.
x(), 
y = transf.
y(), 
z = transf.z();
   119     double r2 = m_radius * m_radius;
   120     double dyz = 
y * 
y + 
z * 
z;
   121     if (dyz > r2) 
return false;
   122     double dx = sqrt(r2 - dyz);
   128     else if (
x + dx >= 0)
 void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated) ...
 
GLAPI void GLAPIENTRY glGetFloatv(GLenum pname, GLfloat *params)
 
GLAPI void GLAPIENTRY glEnable(GLenum cap)
 
GLAPI void GLAPIENTRY glRasterPos3f(GLfloat x, GLfloat y, GLfloat z)
 
bool traceRay(const mrpt::poses::CPose3D &o, double &dist) const override
Ray tracing. 
 
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
To be added to all CSerializable-classes implementation files. 
 
#define GL_ONE_MINUS_SRC_ALPHA
 
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object. 
 
GLsizei GLsizei GLuint * obj
 
#define GL_CURRENT_RASTER_POSITION
 
GLAPI void GLAPIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor)
 
A renderizable object suitable for rendering with OpenGL's display lists. 
 
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations. 
 
This base provides a set of functions for maths stuff. 
 
double x() const
Common members of all points & poses classes. 
 
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
 
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries. 
 
Virtual base class for "archives": classes abstracting I/O streams. 
 
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive. 
 
A class used to store a 3D pose (a 3D translation + a rotation in 3D). 
 
void checkOpenGLError()
Checks glGetError and throws an exception if an error situation is found. 
 
A solid or wire-frame sphere. 
 
The namespace for 3D scene representation and rendering. 
 
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
 
unsigned __int32 uint32_t
 
GLAPI void GLAPIENTRY glDisable(GLenum cap)
 
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.