#include <mrpt/opengl/C3DSScene.h>
Classes | |
struct | TImpl3DS |
A container for automatic deletion of lib3ds's scene when the last reference of the smart_ptr's is destroyed. More... | |
Public Member Functions | |
void | render () const |
Render child objects. | |
void | loadFrom3DSFile (const std::string &file_name) |
Loads a scene from a 3DS file (3D Studio format) into this object, from either plain .3ds format, or in gzip compressed .3ds.gz format. | |
void | initializeAllTextures () |
Initializes all textures in the scene (See opengl::CTexturedPlane::loadTextureInOpenGL). | |
void | clear () |
Empty the object. | |
void | evaluateAnimation (double time_anim) |
Evaluates the scene at a given animation time. | |
void | setScale (double s) |
Changes the scale of the 3DS object (X,Y and Z with the same scale) Default=1. | |
void | setScale (double sx, double sy, double sz) |
Changes the scale of the 3DS object (X,Y and Z with different scales). | |
void | enableExtraAmbientLight (bool enable=true) |
Enables an extra ambient light. | |
virtual bool | traceRay (const mrpt::poses::CPose3D &o, float &dist) const |
Simulation of ray-trace, given a pose. | |
Static Public Member Functions | |
static C3DSScenePtr | Create () |
Class factory. | |
Private Member Functions | |
C3DSScene () | |
Default constructor. | |
virtual | ~C3DSScene () |
Private, virtual destructor: only can be deleted from smart pointers. | |
Private Attributes | |
stlplus::smart_ptr< TImpl3DS > | m_3dsfile |
An internal pointer to the lib3ds library's object of type "Lib3dsFile". | |
double | m_scale_x |
Scale of the object. | |
double | m_scale_y |
double | m_scale_z |
Scale components to apply to the object (default=1). | |
bool | m_enable_extra_lighting |
This class uses the opensource library lib3ds internally.
Definition at line 48 of file C3DSScene.h.
mrpt::opengl::C3DSScene::C3DSScene | ( | ) | [private] |
Default constructor.
virtual mrpt::opengl::C3DSScene::~C3DSScene | ( | ) | [private, virtual] |
Private, virtual destructor: only can be deleted from smart pointers.
void mrpt::opengl::C3DSScene::clear | ( | ) |
Empty the object.
static C3DSScenePtr mrpt::opengl::C3DSScene::Create | ( | ) | [inline, static] |
void mrpt::opengl::C3DSScene::enableExtraAmbientLight | ( | bool | enable = true |
) | [inline] |
void mrpt::opengl::C3DSScene::evaluateAnimation | ( | double | time_anim | ) |
Evaluates the scene at a given animation time.
void mrpt::opengl::C3DSScene::initializeAllTextures | ( | ) |
Initializes all textures in the scene (See opengl::CTexturedPlane::loadTextureInOpenGL).
void mrpt::opengl::C3DSScene::loadFrom3DSFile | ( | const std::string & | file_name | ) |
Loads a scene from a 3DS file (3D Studio format) into this object, from either plain .3ds format, or in gzip compressed .3ds.gz format.
Previous contents are lost. If the file ends in ".gz", it'll be automatically decompressed using gzip (see mrpt::compress::zip).
void mrpt::opengl::C3DSScene::render | ( | ) | const [virtual] |
void mrpt::opengl::C3DSScene::setScale | ( | double | sx, | |
double | sy, | |||
double | sz | |||
) | [inline] |
Changes the scale of the 3DS object (X,Y and Z with different scales).
Definition at line 85 of file C3DSScene.h.
void mrpt::opengl::C3DSScene::setScale | ( | double | s | ) | [inline] |
Changes the scale of the 3DS object (X,Y and Z with the same scale) Default=1.
Definition at line 82 of file C3DSScene.h.
virtual bool mrpt::opengl::C3DSScene::traceRay | ( | const mrpt::poses::CPose3D & | o, | |
float & | dist | |||
) | const [virtual] |
Simulation of ray-trace, given a pose.
Returns true if the ray effectively collisions with the object (returning the distance to the origin of the ray in "dist"), or false in other case. "dist" variable yields undefined behaviour when false is returned
Reimplemented from mrpt::opengl::CRenderizable.
An internal pointer to the lib3ds library's object of type "Lib3dsFile".
Definition at line 115 of file C3DSScene.h.
bool mrpt::opengl::C3DSScene::m_enable_extra_lighting [private] |
Definition at line 120 of file C3DSScene.h.
double mrpt::opengl::C3DSScene::m_scale_x [private] |
Scale of the object.
Reimplemented from mrpt::opengl::CRenderizable.
Definition at line 118 of file C3DSScene.h.
double mrpt::opengl::C3DSScene::m_scale_y [private] |
double mrpt::opengl::C3DSScene::m_scale_z [private] |
Scale components to apply to the object (default=1).
Reimplemented from mrpt::opengl::CRenderizable.
Definition at line 118 of file C3DSScene.h.
Page generated by Doxygen 1.5.9 for MRPT 0.6.5 SVN: at Sun Aug 2 11:39:56 CDT 2009 |