This element keeps a set of objects imported from a 3DStudio file (.3ds).
This class uses the opensource library lib3ds internally.
Definition at line 48 of file C3DSScene.h.
#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_dl () 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 | enableExtraAmbientLight (bool enable=true) |
Enables an extra ambient light. | |
virtual bool | traceRay (const mrpt::poses::CPose3D &o, double &dist) const |
Simulation of ray-trace, given a pose. | |
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". | |
bool | m_enable_extra_lighting |
Scale of the object. | |
RTTI stuff | |
typedef C3DSScenePtr | SmartPtr |
static mrpt::utils::CLASSINIT | _init_C3DSScene |
static mrpt::utils::TRuntimeClassId | classC3DSScene |
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 C3DSScenePtr | Create () |
A typedef for the associated smart pointer
Definition at line 50 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.
static const mrpt::utils::TRuntimeClassId* mrpt::opengl::C3DSScene::_GetBaseClass | ( | ) | [static, protected] |
Reimplemented from mrpt::opengl::CRenderizableDisplayList.
void mrpt::opengl::C3DSScene::clear | ( | ) |
Empty the object.
static C3DSScenePtr mrpt::opengl::C3DSScene::Create | ( | ) | [static] |
static mrpt::utils::CObject* mrpt::opengl::C3DSScene::CreateObject | ( | ) | [static] |
virtual mrpt::utils::CObject* mrpt::opengl::C3DSScene::duplicate | ( | ) | const [virtual] |
Returns a copy of the object, indepently of its class.
Implements mrpt::utils::CObject.
void mrpt::opengl::C3DSScene::enableExtraAmbientLight | ( | bool | enable = true | ) | [inline] |
Enables an extra ambient light.
Definition at line 77 of file C3DSScene.h.
References mrpt::opengl::CRenderizableDisplayList::notifyChange().
void mrpt::opengl::C3DSScene::evaluateAnimation | ( | double | time_anim | ) |
Evaluates the scene at a given animation time.
virtual const mrpt::utils::TRuntimeClassId* mrpt::opengl::C3DSScene::GetRuntimeClass | ( | ) | const [virtual] |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::opengl::CRenderizableDisplayList.
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_dl | ( | ) | const [virtual] |
Render child objects.
Implements mrpt::opengl::CRenderizableDisplayList.
virtual bool mrpt::opengl::C3DSScene::traceRay | ( | const mrpt::poses::CPose3D & | o, |
double & | 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.
mrpt::utils::CLASSINIT mrpt::opengl::C3DSScene::_init_C3DSScene [static, protected] |
Definition at line 50 of file C3DSScene.h.
Definition at line 50 of file C3DSScene.h.
const mrpt::utils::TRuntimeClassId* mrpt::opengl::C3DSScene::classinfo [static] |
Definition at line 50 of file C3DSScene.h.
An internal pointer to the lib3ds library's object of type "Lib3dsFile".
Definition at line 101 of file C3DSScene.h.
bool mrpt::opengl::C3DSScene::m_enable_extra_lighting [private] |
Scale of the object.
Definition at line 106 of file C3DSScene.h.
Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN: at Sat Mar 26 06:40:17 UTC 2011 |