#include <ColladaWriter.h>
Classes | |
struct | axis_sids |
struct | instance_articulated_system_output |
struct | instance_kinematics_model_output |
struct | instance_physics_model_output |
struct | kinbody_models |
struct | kinematics_model_output |
struct | LINKOUTPUT |
struct | physics_model_output |
struct | SCENE |
Public Member Functions | |
virtual boost::shared_ptr < instance_kinematics_model_output > | _WriteInstance_kinematics_model (BodyInfo_impl *bodyInfo, daeElementRef parent, const string &sidscope) |
Write kinematic body in a given scene. | |
virtual boost::shared_ptr < instance_physics_model_output > | _WriteInstance_physics_model (BodyInfo_impl *bodyInfo, daeElementRef parent, const string &sidscope) |
virtual boost::shared_ptr < instance_articulated_system_output > | _WriteRobot (BodyInfo_impl *bodyInfo) |
Write kinematic body in a given scene. | |
ColladaWriter (const std::list< ManipulatorInfo > &listmanipulators, const char *comment_str) | |
virtual void | Save (const string &filename) |
Write down a COLLADA file. | |
virtual bool | Write (BodyInfo_impl *bodyInfo) |
virtual daeElementRef | WriteActuator (const LinkInfo &plink, const string &parentid) |
virtual domEffectRef | WriteEffect (const MaterialInfo &material) |
virtual domGeometryRef | WriteGeometry (BodyInfo_impl *bodyInfo, const ShapeInfo &shapeInfo, const DblArray12 &transformMatrix, const string &parentid) |
Write geometry properties. | |
virtual boost::shared_ptr < kinematics_model_output > | WriteKinematics_model (BodyInfo_impl *bodyInfo) |
virtual boost::shared_ptr < physics_model_output > | WritePhysics_model (BodyInfo_impl *bodyInfo) |
virtual daeElementRef | WriteSensor (const SensorInfo &sensor, const string &parentid) |
virtual domImageRef | WriteTexture (const TextureInfo &texture) |
Write texture. | |
virtual | ~ColladaWriter () |
Private Member Functions | |
virtual void | _AddKinematics_model (BodyInfo_impl *bodyInfo, boost::shared_ptr< kinematics_model_output > kmout) |
virtual void | _AddPhysics_model (BodyInfo_impl *bodyInfo, boost::shared_ptr< physics_model_output > pmout) |
virtual void | _CreateScene () |
save all the loaded scene models and their current state. | |
virtual std::string | _GetGeometryId (BodyInfo_impl *bodyInfo, int ilink, int igeom) |
virtual std::string | _GetJointNodeSid (int ijoint, int iaxis) |
virtual boost::shared_ptr < kinematics_model_output > | _GetKinematics_model (BodyInfo_impl *bodyInfo) |
virtual std::string | _GetLinkSid (int ilink) |
virtual std::string | _GetNodeId (BodyInfo_impl *bodyInfo) |
virtual std::string | _GetNodeId (BodyInfo_impl *bodyInfo, int ilink) |
virtual boost::shared_ptr < physics_model_output > | _GetPhysics_model (BodyInfo_impl *bodyInfo) |
virtual int | _GetRobotId (BodyInfo_impl *bodyInfo) |
void | _SetRotate (domTargetable_float4Ref prot, const DblArray4 &rotation) |
void | _WriteBindingsInstance_kinematics_scene (domInstance_kinematics_sceneRef ikscene, BodyInfo_impl *bodyInfo, const std::vector< axis_sids > &vaxissids, const std::vector< std::pair< std::string, std::string > > &vkinematicsbindings) |
virtual LINKOUTPUT | _WriteLink (BodyInfo_impl *bodyInfo, int ilink, daeElementRef pkinparent, domNodeRef pnodeparent, const string &strModelUri, std::map< std::string, int > mapjointnames) |
Write link of a kinematic body. | |
void | _WriteTransformation (daeElementRef pelt, const DblArray4 &rotation, const DblArray3 &translation) |
Write transformation. | |
virtual void | handleError (daeString msg) |
virtual void | handleWarning (daeString msg) |
Static Private Member Functions | |
template<typename T > | |
static void | _SetVector3 (T &t, const DblArray3 &v) |
Set vector of three elements. | |
static bool | ComparePair (const std::pair< int, int > &p0, const std::pair< int, int > &p1) |
Private Attributes | |
domTechniqueRef | _actuatorsLib |
custom actuators library | |
domLibrary_articulated_systemsRef | _articulatedSystemsLib |
boost::shared_ptr< DAE > | _collada |
daeDocument * | _doc |
domCOLLADA * | _dom |
domLibrary_effectsRef | _effectsLib |
domLibrary_geometriesRef | _geometriesLib |
domCOLLADA::domSceneRef | _globalscene |
domLibrary_imagesRef | _imagesLib |
domLibrary_kinematics_modelsRef | _kinematicsModelsLib |
domLibrary_kinematics_scenesRef | _kinematicsScenesLib |
std::list< kinbody_models > | _listkinbodies |
std::list< ManipulatorInfo > | _listmanipulators |
domLibrary_materialsRef | _materialsLib |
int | _nextactuatorid |
int | _nextsensorid |
domLibrary_physics_modelsRef | _physicsModelsLib |
domLibrary_physics_scenesRef | _physicsScenesLib |
SCENE | _scene |
domTechniqueRef | _sensorsLib |
custom sensors library | |
domLibrary_visual_scenesRef | _visualScenesLib |
Definition at line 55 of file ColladaWriter.h.
ColladaWriter::ColladaWriter | ( | const std::list< ManipulatorInfo > & | listmanipulators, |
const char * | comment_str | ||
) | [inline] |
Definition at line 142 of file ColladaWriter.h.
virtual ColladaWriter::~ColladaWriter | ( | ) | [inline, virtual] |
Definition at line 221 of file ColladaWriter.h.
virtual void ColladaWriter::_AddKinematics_model | ( | BodyInfo_impl * | bodyInfo, |
boost::shared_ptr< kinematics_model_output > | kmout | ||
) | [inline, private, virtual] |
Definition at line 1363 of file ColladaWriter.h.
virtual void ColladaWriter::_AddPhysics_model | ( | BodyInfo_impl * | bodyInfo, |
boost::shared_ptr< physics_model_output > | pmout | ||
) | [inline, private, virtual] |
Definition at line 1391 of file ColladaWriter.h.
virtual void ColladaWriter::_CreateScene | ( | ) | [inline, private, virtual] |
save all the loaded scene models and their current state.
Definition at line 1172 of file ColladaWriter.h.
virtual std::string ColladaWriter::_GetGeometryId | ( | BodyInfo_impl * | bodyInfo, |
int | ilink, | ||
int | igeom | ||
) | [inline, private, virtual] |
Definition at line 1433 of file ColladaWriter.h.
virtual std::string ColladaWriter::_GetJointNodeSid | ( | int | ijoint, |
int | iaxis | ||
) | [inline, private, virtual] |
Definition at line 1436 of file ColladaWriter.h.
virtual boost::shared_ptr<kinematics_model_output> ColladaWriter::_GetKinematics_model | ( | BodyInfo_impl * | bodyInfo | ) | [inline, private, virtual] |
Definition at line 1382 of file ColladaWriter.h.
virtual std::string ColladaWriter::_GetLinkSid | ( | int | ilink | ) | [inline, private, virtual] |
Definition at line 1429 of file ColladaWriter.h.
virtual std::string ColladaWriter::_GetNodeId | ( | BodyInfo_impl * | bodyInfo | ) | [inline, private, virtual] |
Definition at line 1422 of file ColladaWriter.h.
virtual std::string ColladaWriter::_GetNodeId | ( | BodyInfo_impl * | bodyInfo, |
int | ilink | ||
) | [inline, private, virtual] |
Definition at line 1425 of file ColladaWriter.h.
virtual boost::shared_ptr<physics_model_output> ColladaWriter::_GetPhysics_model | ( | BodyInfo_impl * | bodyInfo | ) | [inline, private, virtual] |
Definition at line 1410 of file ColladaWriter.h.
virtual int ColladaWriter::_GetRobotId | ( | BodyInfo_impl * | bodyInfo | ) | [inline, private, virtual] |
Definition at line 1419 of file ColladaWriter.h.
void ColladaWriter::_SetRotate | ( | domTargetable_float4Ref | prot, |
const DblArray4 & | rotation | ||
) | [inline, private] |
Definition at line 1321 of file ColladaWriter.h.
static void ColladaWriter::_SetVector3 | ( | T & | t, |
const DblArray3 & | v | ||
) | [inline, static, private] |
Set vector of three elements.
Definition at line 1356 of file ColladaWriter.h.
void ColladaWriter::_WriteBindingsInstance_kinematics_scene | ( | domInstance_kinematics_sceneRef | ikscene, |
BodyInfo_impl * | bodyInfo, | ||
const std::vector< axis_sids > & | vaxissids, | ||
const std::vector< std::pair< std::string, std::string > > & | vkinematicsbindings | ||
) | [inline, private] |
Definition at line 1340 of file ColladaWriter.h.
virtual boost::shared_ptr<instance_kinematics_model_output> ColladaWriter::_WriteInstance_kinematics_model | ( | BodyInfo_impl * | bodyInfo, |
daeElementRef | parent, | ||
const string & | sidscope | ||
) | [inline, virtual] |
Write kinematic body in a given scene.
Definition at line 471 of file ColladaWriter.h.
virtual boost::shared_ptr<instance_physics_model_output> ColladaWriter::_WriteInstance_physics_model | ( | BodyInfo_impl * | bodyInfo, |
daeElementRef | parent, | ||
const string & | sidscope | ||
) | [inline, virtual] |
Definition at line 517 of file ColladaWriter.h.
virtual LINKOUTPUT ColladaWriter::_WriteLink | ( | BodyInfo_impl * | bodyInfo, |
int | ilink, | ||
daeElementRef | pkinparent, | ||
domNodeRef | pnodeparent, | ||
const string & | strModelUri, | ||
std::map< std::string, int > | mapjointnames | ||
) | [inline, private, virtual] |
Write link of a kinematic body.
link | Link to write |
pkinparent | Kinbody parent |
pnodeparent | Node parent |
strModelUri | |
vjoints | Vector of joints |
Definition at line 1210 of file ColladaWriter.h.
virtual boost::shared_ptr<instance_articulated_system_output> ColladaWriter::_WriteRobot | ( | BodyInfo_impl * | bodyInfo | ) | [inline, virtual] |
Write kinematic body in a given scene.
Definition at line 250 of file ColladaWriter.h.
void ColladaWriter::_WriteTransformation | ( | daeElementRef | pelt, |
const DblArray4 & | rotation, | ||
const DblArray3 & | translation | ||
) | [inline, private] |
Write transformation.
pelt | Element to transform |
t | Transform to write |
Definition at line 1333 of file ColladaWriter.h.
static bool ColladaWriter::ComparePair | ( | const std::pair< int, int > & | p0, |
const std::pair< int, int > & | p1 | ||
) | [inline, static, private] |
Definition at line 57 of file ColladaWriter.h.
virtual void ColladaWriter::handleError | ( | daeString | msg | ) | [inline, private, virtual] |
Definition at line 1440 of file ColladaWriter.h.
virtual void ColladaWriter::handleWarning | ( | daeString | msg | ) | [inline, private, virtual] |
Definition at line 1445 of file ColladaWriter.h.
virtual void ColladaWriter::Save | ( | const string & | filename | ) | [inline, virtual] |
Write down a COLLADA file.
Definition at line 228 of file ColladaWriter.h.
virtual bool ColladaWriter::Write | ( | BodyInfo_impl * | bodyInfo | ) | [inline, virtual] |
Definition at line 240 of file ColladaWriter.h.
virtual daeElementRef ColladaWriter::WriteActuator | ( | const LinkInfo & | plink, |
const string & | parentid | ||
) | [inline, virtual] |
Definition at line 1145 of file ColladaWriter.h.
virtual domEffectRef ColladaWriter::WriteEffect | ( | const MaterialInfo & | material | ) | [inline, virtual] |
Write light effect vambient Ambient light color vdiffuse Diffuse light color
Definition at line 1013 of file ColladaWriter.h.
virtual domGeometryRef ColladaWriter::WriteGeometry | ( | BodyInfo_impl * | bodyInfo, |
const ShapeInfo & | shapeInfo, | ||
const DblArray12 & | transformMatrix, | ||
const string & | parentid | ||
) | [inline, virtual] |
Write geometry properties.
geom | Link geometry |
parentid | Parent Identifier |
Definition at line 801 of file ColladaWriter.h.
virtual boost::shared_ptr<kinematics_model_output> ColladaWriter::WriteKinematics_model | ( | BodyInfo_impl * | bodyInfo | ) | [inline, virtual] |
Definition at line 552 of file ColladaWriter.h.
virtual boost::shared_ptr<physics_model_output> ColladaWriter::WritePhysics_model | ( | BodyInfo_impl * | bodyInfo | ) | [inline, virtual] |
Definition at line 700 of file ColladaWriter.h.
virtual daeElementRef ColladaWriter::WriteSensor | ( | const SensorInfo & | sensor, |
const string & | parentid | ||
) | [inline, virtual] |
Definition at line 1073 of file ColladaWriter.h.
virtual domImageRef ColladaWriter::WriteTexture | ( | const TextureInfo & | texture | ) | [inline, virtual] |
Write texture.
Definition at line 1061 of file ColladaWriter.h.
domTechniqueRef ColladaWriter::_actuatorsLib [private] |
custom actuators library
Definition at line 1465 of file ColladaWriter.h.
domLibrary_articulated_systemsRef ColladaWriter::_articulatedSystemsLib [private] |
Definition at line 1457 of file ColladaWriter.h.
boost::shared_ptr<DAE> ColladaWriter::_collada [private] |
Definition at line 1450 of file ColladaWriter.h.
daeDocument* ColladaWriter::_doc [private] |
Definition at line 1452 of file ColladaWriter.h.
domCOLLADA* ColladaWriter::_dom [private] |
Definition at line 1451 of file ColladaWriter.h.
domLibrary_effectsRef ColladaWriter::_effectsLib [private] |
Definition at line 1461 of file ColladaWriter.h.
domLibrary_geometriesRef ColladaWriter::_geometriesLib [private] |
Definition at line 1463 of file ColladaWriter.h.
domCOLLADA::domSceneRef ColladaWriter::_globalscene [private] |
Definition at line 1453 of file ColladaWriter.h.
domLibrary_imagesRef ColladaWriter::_imagesLib [private] |
Definition at line 1462 of file ColladaWriter.h.
domLibrary_kinematics_modelsRef ColladaWriter::_kinematicsModelsLib [private] |
Definition at line 1456 of file ColladaWriter.h.
domLibrary_kinematics_scenesRef ColladaWriter::_kinematicsScenesLib [private] |
Definition at line 1455 of file ColladaWriter.h.
std::list<kinbody_models> ColladaWriter::_listkinbodies [private] |
Definition at line 1468 of file ColladaWriter.h.
std::list<ManipulatorInfo> ColladaWriter::_listmanipulators [private] |
Definition at line 1469 of file ColladaWriter.h.
domLibrary_materialsRef ColladaWriter::_materialsLib [private] |
Definition at line 1460 of file ColladaWriter.h.
int ColladaWriter::_nextactuatorid [private] |
Definition at line 1466 of file ColladaWriter.h.
int ColladaWriter::_nextsensorid [private] |
Definition at line 1466 of file ColladaWriter.h.
domLibrary_physics_modelsRef ColladaWriter::_physicsModelsLib [private] |
Definition at line 1459 of file ColladaWriter.h.
domLibrary_physics_scenesRef ColladaWriter::_physicsScenesLib [private] |
Definition at line 1458 of file ColladaWriter.h.
SCENE ColladaWriter::_scene [private] |
Definition at line 1467 of file ColladaWriter.h.
domTechniqueRef ColladaWriter::_sensorsLib [private] |
custom sensors library
Definition at line 1464 of file ColladaWriter.h.
domLibrary_visual_scenesRef ColladaWriter::_visualScenesLib [private] |
Definition at line 1454 of file ColladaWriter.h.