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.

Definition at line 46 of file COpenGLStandardObject.h.

#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< TPoint3Dvertices
 Set of points in which consists this object.
uint32_t chunkSize
 Granularity of the openGL elements.
std::vector< _GLENUMenabled
 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::CObjectduplicate () const
 Returns a copy of the object, indepently of its class.
static mrpt::utils::CObjectCreateObject ()
static COpenGLStandardObjectPtr Create ()

Member Typedef Documentation

A typedef for the associated smart pointer

Definition at line 47 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 135 of file COpenGLStandardObject.h.

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

Baic empty constructor, initializes to default.

Definition at line 141 of file COpenGLStandardObject.h.

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

Destructor.

Definition at line 147 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_error if the number of vertices is not an exact multiple of the chunk size.

Definition at line 81 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 95 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 88 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 108 of file COpenGLStandardObject.h.

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

Gets the normal vector to this object.

Definition at line 128 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 102 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 114 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 121 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 47 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 60 of file COpenGLStandardObject.h.

Definition at line 47 of file COpenGLStandardObject.h.

Definition at line 47 of file COpenGLStandardObject.h.

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

Definition at line 64 of file COpenGLStandardObject.h.

Definition at line 65 of file COpenGLStandardObject.h.

OpenGL identifier of the object type.

Definition at line 52 of file COpenGLStandardObject.h.

Set of points in which consists this object.

Definition at line 56 of file COpenGLStandardObject.h.




Page generated by Doxygen 1.7.1 for MRPT 0.9.4 SVN: at Mon Jan 10 23:33:19 UTC 2011