Main MRPT website > C++ reference
MRPT logo
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions
mrpt::opengl::COpenGLStandardObject Class Reference

Detailed Description

Objects of this class represent a generic openGL object without specific geometric properties.

#include <mrpt/opengl/COpenGLStandardObject.h>

Inheritance diagram for mrpt::opengl::COpenGLStandardObject:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void render_dl () const
 Render.
virtual bool traceRay (const mrpt::poses::CPose3D &o, float &dist) const
 Ray Tracing.
void enable (_GLENUM flag)
 Enable some openGL flag.
void disable (_GLENUM flag)
 Disable some openGL flag.
bool isEnabled (_GLENUM flag) const
 Check whether an openGL will be enabled during the rendering of this object.
void getEnabledFlags (std::vector< _GLENUM > &v) const
 Get a list of all currently enabled openGL flags.
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 getNormal (float(&n)[3]) const
 Gets the normal vector to this object.

Static Public Member Functions

static COpenGLStandardObjectPtr Create (_GLENUM t, const std::vector< 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.

Protected Attributes

_GLENUM type
 OpenGL identifier of the object type.
std::vector< TPoint3D > vertices
 Set of points in which consists this object.
uint32_t chunkSize
 Granularity of the openGL elements.
std::vector< _GLENUM > enabled
 Set of openGL properties enabled in the rendering of this object.
float normal [3]

Private Member Functions

 COpenGLStandardObject (_GLENUM t, const std::vector< TPoint3D > &v, uint32_t cs, const vector< _GLENUM > &en)
 Constructor with all the information.
 COpenGLStandardObject ()
 Baic empty constructor, initializes to default.
virtual ~COpenGLStandardObject ()
 Destructor.

RTTI stuff

typedef COpenGLStandardObjectPtr SmartPtr
static mrpt::utils::CLASSINIT _init_COpenGLStandardObject
static mrpt::utils::TRuntimeClassId classCOpenGLStandardObject
static const
mrpt::utils::TRuntimeClassId * 
classinfo
static const
mrpt::utils::TRuntimeClassId * 
_GetBaseClass ()
virtual const
mrpt::utils::TRuntimeClassId * 
GetRuntimeClass () const
 Returns information about the class of an object in runtime.
virtual mrpt::utils::CObject * duplicate () const
 Returns a copy of the object, indepently of its class.
static mrpt::utils::CObject * CreateObject ()
static COpenGLStandardObjectPtr Create ()

Member Typedef Documentation

A typedef for the associated smart pointer

Definition at line 48 of file COpenGLStandardObject.h.


Constructor & Destructor Documentation

mrpt::opengl::COpenGLStandardObject::COpenGLStandardObject ( _GLENUM  t,
const std::vector< TPoint3D > &  v,
uint32_t  cs,
const vector< _GLENUM > &  en 
) [inline, private]

Constructor with all the information.

Definition at line 136 of file COpenGLStandardObject.h.

mrpt::opengl::COpenGLStandardObject::COpenGLStandardObject ( ) [inline, private]

Baic empty constructor, initializes to default.

Definition at line 142 of file COpenGLStandardObject.h.

virtual mrpt::opengl::COpenGLStandardObject::~COpenGLStandardObject ( ) [inline, private, virtual]

Destructor.

Definition at line 148 of file COpenGLStandardObject.h.


Member Function Documentation

static const mrpt::utils::TRuntimeClassId* mrpt::opengl::COpenGLStandardObject::_GetBaseClass ( ) [static, protected]
static COpenGLStandardObjectPtr mrpt::opengl::COpenGLStandardObject::Create ( ) [static]
static COpenGLStandardObjectPtr mrpt::opengl::COpenGLStandardObject::Create ( _GLENUM  t,
const std::vector< TPoint3D > &  v,
uint32_t  cs = 0,
const std::vector< _GLENUM > &  en = std::vector<_GLENUM>() 
) [inline, static]

Creation of object from type, vertices, chunk size and a list of enabled openGL flags.

Exceptions:
std::logic_errorif the number of vertices is not an exact multiple of the chunk size.

Definition at line 82 of file COpenGLStandardObject.h.

References mrpt::opengl::COpenGLStandardObject.

static mrpt::utils::CObject* mrpt::opengl::COpenGLStandardObject::CreateObject ( ) [static]
void mrpt::opengl::COpenGLStandardObject::disable ( _GLENUM  flag) [inline]

Disable some openGL flag.

Definition at line 96 of file COpenGLStandardObject.h.

References mrpt::opengl::CRenderizableDisplayList::notifyChange().

virtual mrpt::utils::CObject* mrpt::opengl::COpenGLStandardObject::duplicate ( ) const [virtual]

Returns a copy of the object, indepently of its class.

Implements mrpt::utils::CObject.

void mrpt::opengl::COpenGLStandardObject::enable ( _GLENUM  flag) [inline]

Enable some openGL flag.

Definition at line 89 of file COpenGLStandardObject.h.

References mrpt::opengl::CRenderizableDisplayList::notifyChange().

void mrpt::opengl::COpenGLStandardObject::getEnabledFlags ( std::vector< _GLENUM > &  v) const [inline]

Get a list of all currently enabled openGL flags.

Definition at line 109 of file COpenGLStandardObject.h.

void mrpt::opengl::COpenGLStandardObject::getNormal ( float(&)  n[3]) const [inline]

Gets the normal vector to this object.

Definition at line 129 of file COpenGLStandardObject.h.

virtual const mrpt::utils::TRuntimeClassId* mrpt::opengl::COpenGLStandardObject::GetRuntimeClass ( ) const [virtual]

Returns information about the class of an object in runtime.

Reimplemented from mrpt::opengl::CRenderizableDisplayList.

bool mrpt::opengl::COpenGLStandardObject::isEnabled ( _GLENUM  flag) const [inline]

Check whether an openGL will be enabled during the rendering of this object.

Definition at line 103 of file COpenGLStandardObject.h.

virtual void mrpt::opengl::COpenGLStandardObject::render_dl ( ) const [virtual]
void mrpt::opengl::COpenGLStandardObject::setFlags ( const std::vector< _GLENUM > &  v) [inline]

Set the list of all openGL flags.

Definition at line 115 of file COpenGLStandardObject.h.

References mrpt::opengl::CRenderizableDisplayList::notifyChange().

void mrpt::opengl::COpenGLStandardObject::setNormal ( const float(&)  n[3]) [inline]

Set the normal vector to this object.

Definition at line 122 of file COpenGLStandardObject.h.

References mrpt::opengl::CRenderizableDisplayList::notifyChange().

virtual bool mrpt::opengl::COpenGLStandardObject::traceRay ( const mrpt::poses::CPose3D &  o,
float &  dist 
) const [virtual]

Ray Tracing.

Will always return false, since objects of this class are not intended to have geometric properties.

See also:
mrpt::opengl::CRenderizable

Member Data Documentation

Definition at line 48 of file COpenGLStandardObject.h.

Granularity of the openGL elements.

3 for GL_TRIANGLES, 4 for GL_QUADS, and so on. Setting it to 0 will generate a single openGL object.

Definition at line 61 of file COpenGLStandardObject.h.

Definition at line 48 of file COpenGLStandardObject.h.

Definition at line 48 of file COpenGLStandardObject.h.

Set of openGL properties enabled in the rendering of this object.

Definition at line 65 of file COpenGLStandardObject.h.

Definition at line 66 of file COpenGLStandardObject.h.

OpenGL identifier of the object type.

Definition at line 53 of file COpenGLStandardObject.h.

Set of points in which consists this object.

Definition at line 57 of file COpenGLStandardObject.h.




Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Sun Oct 16 12:16:33 UTC 2011