9 #ifndef opengl_COpenGLStandardObject_H
10 #define opengl_COpenGLStandardObject_H
72 const std::vector<_GLENUM>& en = std::vector<_GLENUM>());
112 for (
size_t i = 0; i < 3; i++)
normal[i] =
n[i];
120 for (
size_t i = 0; i < 3; i++)
n[i] =
normal[i];
127 const std::vector<_GLENUM>& en)
130 for (
size_t i = 0; i < 3; i++)
normal[i] = 0.0;
141 for (
size_t i = 0; i < 3; i++)
normal[i] = 0.0;
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Objects of this class represent a generic openGL object without specific geometric properties.
std::vector< _GLENUM > enabled
Set of openGL properties enabled in the rendering of this object.
COpenGLStandardObject()
Baic empty constructor, initializes to default.
_GLENUM type
OpenGL identifier of the object type.
static COpenGLStandardObject::Ptr Create(_GLENUM t, const std::vector< mrpt::math::TPoint3D > &v, uint32_t cs=0, const std::vector< _GLENUM > &en=std::vector< _GLENUM >())
Creation of object from type, vertices, chunk size and a list of enabled openGL flags.
bool isEnabled(_GLENUM flag) const
Check whether an openGL will be enabled during the rendering of this object.
std::shared_ptr< COpenGLStandardObject > Ptr
void setFlags(const std::vector< _GLENUM > &v)
Set the list of all openGL flags.
void setNormal(const float(&n)[3])
Set the normal vector to this object.
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...
COpenGLStandardObject(_GLENUM t, const std::vector< mrpt::math::TPoint3D > &v, uint32_t cs, const std::vector< _GLENUM > &en)
Constructor with all the information.
void getEnabledFlags(std::vector< _GLENUM > &v) const
Get a list of all currently enabled openGL flags.
void disable(_GLENUM flag)
Disable some openGL flag.
virtual ~COpenGLStandardObject()
Destructor.
std::vector< mrpt::math::TPoint3D > vertices
Set of points in which consists this object.
void getNormal(float(&n)[3]) const
Gets the normal vector to this object.
virtual void render_dl() const override
Render.
bool traceRay(const mrpt::poses::CPose3D &o, double &dist) const override
Ray Tracing.
uint32_t chunkSize
Granularity of the openGL elements.
void enable(_GLENUM flag)
Enable some openGL flag.
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)
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
GLuint GLuint GLsizei GLenum type
const_iterator find(const KEY &key) const
The namespace for 3D scene representation and rendering.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
unsigned __int32 uint32_t