9 #ifndef opengl_CRenderizableDisplayList_H
10 #define opengl_CRenderizableDisplayList_H
18 #define INVALID_DISPLAY_LIST_ID static_cast<unsigned int>(-1)
41 mutable
unsigned int m_dl;
42 mutable
bool m_dl_recreate;
49 EIGEN_STRONG_INLINE
void notifyChange()
const { m_dl_recreate=
true;}
52 virtual void render_dl()
const = 0;
77 virtual void render()
const;
83 virtual CRenderizable&
setColorR_u8(
const uint8_t r) {m_color.R=r; notifyChange();
return *
this;}
84 virtual CRenderizable&
setColorG_u8(
const uint8_t g) {m_color.G=g; notifyChange();
return *
this;}
85 virtual CRenderizable&
setColorB_u8(
const uint8_t b) {m_color.B=b; notifyChange();
return *
this;}
86 virtual CRenderizable&
setColorA_u8(
const uint8_t a) {m_color.A=a; notifyChange();
return *
this;}
virtual CRenderizable & setColorG_u8(const uint8_t g)
Color components in the range [0,255].
virtual CRenderizable & setColorA_u8(const uint8_t a)
Color components in the range [0,255].
virtual CRenderizable & setColor_u8(const mrpt::utils::TColor &c)
The base class of 3D objects that can be directly rendered through OpenGL.
CRenderizableDisplayList * clone() const
Interface for the stlplus smart pointer class.
#define DEFINE_VIRTUAL_SERIALIZABLE(class_name)
This declaration must be inserted in virtual CSerializable classes definition:
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 DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
virtual bool should_skip_display_list_cache() const
Optional: If the object has some state in which creating a display list is NOT preferred over direct ...
void readFromStreamRender(mrpt::utils::CStream &in)
virtual CRenderizable & setColor_u8(const mrpt::utils::TColor &c)
Changes the default object color.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
virtual CRenderizable & setColorR_u8(const uint8_t r)
Color components in the range [0,255].
void readFromStreamRender(utils::CStream &in)
virtual CRenderizable & setColorB_u8(const uint8_t b)
Color components in the range [0,255].
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)