Main MRPT website > C++ reference
MRPT logo

mrpt::opengl::CBox Class Reference

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). More...

#include <mrpt/opengl/CBox.h>

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

List of all members.

Public Member Functions

void render () 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.

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

Definition at line 44 of file CBox.h.


Constructor & Destructor Documentation

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

Basic empty constructor.

Set all parameters to default.

Definition at line 83 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 86 of file CBox.h.

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

Destructor.

Definition at line 93 of file CBox.h.


Member Function Documentation

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 54 of file CBox.h.

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

Definition at line 78 of file CBox.h.

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

Definition at line 71 of file CBox.h.

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

Definition at line 74 of file CBox.h.

void mrpt::opengl::CBox::render (  )  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 70 of file CBox.h.

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

Definition at line 73 of file CBox.h.

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

Corners coordinates.

Definition at line 48 of file CBox.h.

Definition at line 48 of file CBox.h.

For wireframe only.

Definition at line 50 of file CBox.h.

true: wireframe, false: solid

Definition at line 49 of file CBox.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines



Page generated by Doxygen 1.6.1 for MRPT 0.9.0 SVN: at Mon Jun 7 06:47:58 UTC 2010