Go to the documentation of this file.
9 #ifndef opengl_COpenGLStandardObject_H
10 #define opengl_COpenGLStandardObject_H
61 static COpenGLStandardObjectPtr Create(
_GLENUM t,const std::vector<
mrpt::math::TPoint3D> &v,uint32_t cs=0,const std::vector<
_GLENUM> &en=std::vector<
_GLENUM>());
67 if (find(enabled.begin(),enabled.end(),flag)==enabled.end()) enabled.push_back(flag);
78 return find(enabled.begin(),enabled.end(),flag)!=enabled.end();
89 inline void setFlags(
const std::vector<_GLENUM> &v) {
97 for (
size_t i=0;i<3;i++) normal[i]=n[i];
104 for (
size_t i=0;i<3;i++) n[i]=normal[i];
110 COpenGLStandardObject(
_GLENUM t,
const std::vector<mrpt::math::TPoint3D> &v,uint32_t cs,
const std::vector<_GLENUM> &en):type(
t),vertices(v),chunkSize(cs),enabled(en) {
111 for (
size_t i=0;i<3;i++) normal[i]=0.0;
117 for (
size_t i=0;i<3;i++) normal[i]=0.0;
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.
void setNormal(const float(&n)[3])
Set the normal vector to this object.
bool isEnabled(_GLENUM flag) const
Check whether an openGL will be enabled during the rendering of this object.
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)
void getEnabledFlags(std::vector< _GLENUM > &v) const
Get a list of all currently enabled openGL flags.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
_GLENUM type
OpenGL identifier of the object type.
virtual ~COpenGLStandardObject()
Destructor.
const EIGEN_STRONG_INLINE AdjointReturnType t() const
Transpose.
COpenGLStandardObject(_GLENUM t, const std::vector< mrpt::math::TPoint3D > &v, uint32_t cs, const std::vector< _GLENUM > &en)
Constructor with all the information.
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
void getNormal(float(&n)[3]) const
Gets the normal vector to this object.
uint32_t chunkSize
Granularity of the openGL elements.
#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...
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
COpenGLStandardObject()
Baic empty constructor, initializes to default.
bool BASE_IMPEXP traceRay(const vector< TPolygonWithPlane > &vec, const mrpt::poses::CPose3D &pose, double &dist)
Fast ray tracing method using polygons' properties.
std::vector< mrpt::math::TPoint3D > vertices
Set of points in which consists this object.
void setFlags(const std::vector< _GLENUM > &v)
Set the list of all openGL flags.
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
Page generated by Doxygen 1.8.17 for MRPT 1.4.0 SVN: at Sat Jan 18 22:37:07 UTC 2020 | | |