Main MRPT website > C++ reference
MRPT logo
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions

mrpt::opengl::CBox Class Reference


Detailed Description

A solid or wireframe box in 3D, defined by 6 rectangular faces parallel to the planes X, Y and Z (note that the object can be translated and rotated afterwards as any other CRenderizable object using the "object pose" in the base class).

See also:
opengl::COpenGLScene,opengl::CRenderizable
mrpt::opengl::CBox
preview_CBox.png

Definition at line 51 of file CBox.h.

#include <mrpt/opengl/CBox.h>

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

List of all members.

Public Member Functions

void render_dl () const
 Render.
virtual bool traceRay (const mrpt::poses::CPose3D &o, double &dist) const
 Ray tracing.
void setLineWidth (float width)
float getLineWidth () const
void setWireframe (bool is_wireframe=true)
bool isWireframe () const
void setBoxCorners (const mrpt::math::TPoint3D &corner1, const mrpt::math::TPoint3D &corner2)
 Set the position and size of the box, from two corners in 3D.
void getBoxCorners (mrpt::math::TPoint3D &corner1, mrpt::math::TPoint3D &corner2) const

Static Public Member Functions

static CBoxPtr Create (const mrpt::math::TPoint3D &corner1, const mrpt::math::TPoint3D &corner2, bool is_wireframe=false, float lineWidth=1.0)
 Constructor returning a smart pointer to the newly created object.

Protected Attributes

mrpt::math::TPoint3D m_corner_min
mrpt::math::TPoint3D m_corner_max
 Corners coordinates.
bool m_wireframe
 true: wireframe, false: solid
float m_lineWidth
 For wireframe only.

Private Member Functions

 CBox ()
 Basic empty constructor.
 CBox (const mrpt::math::TPoint3D &corner1, const mrpt::math::TPoint3D &corner2, bool is_wireframe=false, float lineWidth=1.0)
 Constructor with all the parameters.
virtual ~CBox ()
 Destructor.

RTTI stuff



typedef CBoxPtr SmartPtr
static mrpt::utils::CLASSINIT _init_CBox
static mrpt::utils::TRuntimeClassId classCBox
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 CBoxPtr Create ()

Member Typedef Documentation

A typedef for the associated smart pointer

Definition at line 52 of file CBox.h.


Constructor & Destructor Documentation

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

Basic empty constructor.

Set all parameters to default.

Definition at line 90 of file CBox.h.

mrpt::opengl::CBox::CBox ( const mrpt::math::TPoint3D corner1,
const mrpt::math::TPoint3D corner2,
bool  is_wireframe = false,
float  lineWidth = 1.0 
) [inline, private]

Constructor with all the parameters.

Definition at line 93 of file CBox.h.

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

Destructor.

Definition at line 100 of file CBox.h.


Member Function Documentation

static const mrpt::utils::TRuntimeClassId* mrpt::opengl::CBox::_GetBaseClass (  )  [static, protected]
static CBoxPtr mrpt::opengl::CBox::Create (  )  [static]
static CBoxPtr mrpt::opengl::CBox::Create ( const mrpt::math::TPoint3D corner1,
const mrpt::math::TPoint3D corner2,
bool  is_wireframe = false,
float  lineWidth = 1.0 
) [inline, static]

Constructor returning a smart pointer to the newly created object.

Definition at line 61 of file CBox.h.

static mrpt::utils::CObject* mrpt::opengl::CBox::CreateObject (  )  [static]
virtual mrpt::utils::CObject* mrpt::opengl::CBox::duplicate (  )  const [virtual]

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

Implements mrpt::utils::CObject.

void mrpt::opengl::CBox::getBoxCorners ( mrpt::math::TPoint3D corner1,
mrpt::math::TPoint3D corner2 
) const [inline]

Definition at line 85 of file CBox.h.

float mrpt::opengl::CBox::getLineWidth (  )  const [inline]

Definition at line 78 of file CBox.h.

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

Returns information about the class of an object in runtime.

Reimplemented from mrpt::opengl::CRenderizableDisplayList.

bool mrpt::opengl::CBox::isWireframe (  )  const [inline]

Definition at line 81 of file CBox.h.

void mrpt::opengl::CBox::render_dl (  )  const [virtual]
void mrpt::opengl::CBox::setBoxCorners ( const mrpt::math::TPoint3D corner1,
const mrpt::math::TPoint3D corner2 
)

Set the position and size of the box, from two corners in 3D.

void mrpt::opengl::CBox::setLineWidth ( float  width  )  [inline]

Definition at line 77 of file CBox.h.

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

void mrpt::opengl::CBox::setWireframe ( bool  is_wireframe = true  )  [inline]

Definition at line 80 of file CBox.h.

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

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

Ray tracing.

See also:
mrpt::opengl::CRenderizable

Reimplemented from mrpt::opengl::CRenderizable.


Member Data Documentation

Definition at line 52 of file CBox.h.

Definition at line 52 of file CBox.h.

Definition at line 52 of file CBox.h.

Corners coordinates.

Definition at line 55 of file CBox.h.

Definition at line 55 of file CBox.h.

For wireframe only.

Definition at line 57 of file CBox.h.

true: wireframe, false: solid

Definition at line 56 of file CBox.h.




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