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 51 of file CBox.h.
#include <mrpt/opengl/CBox.h>
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::CObject * | duplicate () const |
| Returns a copy of the object, indepently of its class.
|
static mrpt::utils::CObject * | CreateObject () |
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.
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 CBoxPtr mrpt::opengl::CBox::Create |
( |
|
) |
[static] |
Constructor returning a smart pointer to the newly created object.
Definition at line 61 of file CBox.h.
float mrpt::opengl::CBox::getLineWidth |
( |
|
) |
const [inline] |
bool mrpt::opengl::CBox::isWireframe |
( |
|
) |
const [inline] |
void mrpt::opengl::CBox::render_dl |
( |
|
) |
const [virtual] |
Set the position and size of the box, from two corners in 3D.
void mrpt::opengl::CBox::setLineWidth |
( |
float |
width |
) |
[inline] |
void mrpt::opengl::CBox::setWireframe |
( |
bool |
is_wireframe = true |
) |
[inline] |
virtual bool mrpt::opengl::CBox::traceRay |
( |
const mrpt::poses::CPose3D & |
o, |
|
|
double & |
dist | |
|
) |
| | const [virtual] |
Member Data Documentation
Corners coordinates.
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.