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>
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.
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
Constructor returning a smart pointer to the newly created object.
Definition at line 54 of file CBox.h.
| float mrpt::opengl::CBox::getLineWidth |
( |
|
) |
const [inline] |
| bool mrpt::opengl::CBox::isWireframe |
( |
|
) |
const [inline] |
| void mrpt::opengl::CBox::render |
( |
|
) |
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 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.