Classes | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
ColladaWriter Class Reference

#include <ColladaWriter.h>

Inheritance diagram for ColladaWriter:
Inheritance graph
[legend]

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. More...
 
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. More...
 
 ColladaWriter (const std::list< ManipulatorInfo > &listmanipulators, const char *comment_str)
 
virtual void Save (const string &filename)
 Write down a COLLADA file. More...
 
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. More...
 
virtual boost::shared_ptr< kinematics_model_outputWriteKinematics_model (BodyInfo_impl *bodyInfo)
 
virtual boost::shared_ptr< physics_model_outputWritePhysics_model (BodyInfo_impl *bodyInfo)
 
virtual daeElementRef WriteSensor (const SensorInfo &sensor, const string &parentid)
 
virtual domImageRef WriteTexture (const TextureInfo &texture)
 Write texture. More...
 
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. More...
 
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. More...
 
void _WriteTransformation (daeElementRef pelt, const DblArray4 &rotation, const DblArray3 &translation)
 Write transformation. More...
 
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. More...
 
static bool ComparePair (const std::pair< int, int > &p0, const std::pair< int, int > &p1)
 

Private Attributes

domTechniqueRef _actuatorsLib
 custom actuators library More...
 
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 More...
 
domLibrary_visual_scenesRef _visualScenesLib
 

Detailed Description

Definition at line 55 of file ColladaWriter.h.

Constructor & Destructor Documentation

◆ ColladaWriter()

ColladaWriter::ColladaWriter ( const std::list< ManipulatorInfo > &  listmanipulators,
const char *  comment_str 
)
inline

Definition at line 142 of file ColladaWriter.h.

◆ ~ColladaWriter()

virtual ColladaWriter::~ColladaWriter ( )
inlinevirtual

Definition at line 221 of file ColladaWriter.h.

Member Function Documentation

◆ _AddKinematics_model()

virtual void ColladaWriter::_AddKinematics_model ( BodyInfo_impl bodyInfo,
boost::shared_ptr< kinematics_model_output kmout 
)
inlineprivatevirtual

Definition at line 1368 of file ColladaWriter.h.

◆ _AddPhysics_model()

virtual void ColladaWriter::_AddPhysics_model ( BodyInfo_impl bodyInfo,
boost::shared_ptr< physics_model_output pmout 
)
inlineprivatevirtual

Definition at line 1396 of file ColladaWriter.h.

◆ _CreateScene()

virtual void ColladaWriter::_CreateScene ( )
inlineprivatevirtual

save all the loaded scene models and their current state.

Definition at line 1177 of file ColladaWriter.h.

◆ _GetGeometryId()

virtual std::string ColladaWriter::_GetGeometryId ( BodyInfo_impl bodyInfo,
int  ilink,
int  igeom 
)
inlineprivatevirtual

Definition at line 1438 of file ColladaWriter.h.

◆ _GetJointNodeSid()

virtual std::string ColladaWriter::_GetJointNodeSid ( int  ijoint,
int  iaxis 
)
inlineprivatevirtual

Definition at line 1441 of file ColladaWriter.h.

◆ _GetKinematics_model()

virtual boost::shared_ptr<kinematics_model_output> ColladaWriter::_GetKinematics_model ( BodyInfo_impl bodyInfo)
inlineprivatevirtual

Definition at line 1387 of file ColladaWriter.h.

◆ _GetLinkSid()

virtual std::string ColladaWriter::_GetLinkSid ( int  ilink)
inlineprivatevirtual

Definition at line 1434 of file ColladaWriter.h.

◆ _GetNodeId() [1/2]

virtual std::string ColladaWriter::_GetNodeId ( BodyInfo_impl bodyInfo)
inlineprivatevirtual

Definition at line 1427 of file ColladaWriter.h.

◆ _GetNodeId() [2/2]

virtual std::string ColladaWriter::_GetNodeId ( BodyInfo_impl bodyInfo,
int  ilink 
)
inlineprivatevirtual

Definition at line 1430 of file ColladaWriter.h.

◆ _GetPhysics_model()

virtual boost::shared_ptr<physics_model_output> ColladaWriter::_GetPhysics_model ( BodyInfo_impl bodyInfo)
inlineprivatevirtual

Definition at line 1415 of file ColladaWriter.h.

◆ _GetRobotId()

virtual int ColladaWriter::_GetRobotId ( BodyInfo_impl bodyInfo)
inlineprivatevirtual

Definition at line 1424 of file ColladaWriter.h.

◆ _SetRotate()

void ColladaWriter::_SetRotate ( domTargetable_float4Ref  prot,
const DblArray4 &  rotation 
)
inlineprivate

Definition at line 1326 of file ColladaWriter.h.

◆ _SetVector3()

template<typename T >
static void ColladaWriter::_SetVector3 ( T &  t,
const DblArray3 &  v 
)
inlinestaticprivate

Set vector of three elements.

Definition at line 1361 of file ColladaWriter.h.

◆ _WriteBindingsInstance_kinematics_scene()

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 
)
inlineprivate

Definition at line 1345 of file ColladaWriter.h.

◆ _WriteInstance_kinematics_model()

virtual boost::shared_ptr<instance_kinematics_model_output> ColladaWriter::_WriteInstance_kinematics_model ( BodyInfo_impl bodyInfo,
daeElementRef  parent,
const string &  sidscope 
)
inlinevirtual

Write kinematic body in a given scene.

Definition at line 472 of file ColladaWriter.h.

◆ _WriteInstance_physics_model()

virtual boost::shared_ptr<instance_physics_model_output> ColladaWriter::_WriteInstance_physics_model ( BodyInfo_impl bodyInfo,
daeElementRef  parent,
const string &  sidscope 
)
inlinevirtual

Definition at line 518 of file ColladaWriter.h.

◆ _WriteLink()

virtual LINKOUTPUT ColladaWriter::_WriteLink ( BodyInfo_impl bodyInfo,
int  ilink,
daeElementRef  pkinparent,
domNodeRef  pnodeparent,
const string &  strModelUri,
std::map< std::string, int mapjointnames 
)
inlineprivatevirtual

Write link of a kinematic body.

Parameters
linkLink to write
pkinparentKinbody parent
pnodeparentNode parent
strModelUri
vjointsVector of joints

Definition at line 1215 of file ColladaWriter.h.

◆ _WriteRobot()

virtual boost::shared_ptr<instance_articulated_system_output> ColladaWriter::_WriteRobot ( BodyInfo_impl bodyInfo)
inlinevirtual

Write kinematic body in a given scene.

Definition at line 251 of file ColladaWriter.h.

◆ _WriteTransformation()

void ColladaWriter::_WriteTransformation ( daeElementRef  pelt,
const DblArray4 &  rotation,
const DblArray3 &  translation 
)
inlineprivate

Write transformation.

Parameters
peltElement to transform
tTransform to write

Definition at line 1338 of file ColladaWriter.h.

◆ ComparePair()

static bool ColladaWriter::ComparePair ( const std::pair< int, int > &  p0,
const std::pair< int, int > &  p1 
)
inlinestaticprivate

Definition at line 57 of file ColladaWriter.h.

◆ handleError()

virtual void ColladaWriter::handleError ( daeString  msg)
inlineprivatevirtual

Definition at line 1445 of file ColladaWriter.h.

◆ handleWarning()

virtual void ColladaWriter::handleWarning ( daeString  msg)
inlineprivatevirtual

Definition at line 1450 of file ColladaWriter.h.

◆ Save()

virtual void ColladaWriter::Save ( const string &  filename)
inlinevirtual

Write down a COLLADA file.

Definition at line 228 of file ColladaWriter.h.

◆ Write()

virtual bool ColladaWriter::Write ( BodyInfo_impl bodyInfo)
inlinevirtual

Definition at line 240 of file ColladaWriter.h.

◆ WriteActuator()

virtual daeElementRef ColladaWriter::WriteActuator ( const LinkInfo &  plink,
const string &  parentid 
)
inlinevirtual

Definition at line 1150 of file ColladaWriter.h.

◆ WriteEffect()

virtual domEffectRef ColladaWriter::WriteEffect ( const MaterialInfo &  material)
inlinevirtual

Write light effect vambient Ambient light color vdiffuse Diffuse light color

Definition at line 1018 of file ColladaWriter.h.

◆ WriteGeometry()

virtual domGeometryRef ColladaWriter::WriteGeometry ( BodyInfo_impl bodyInfo,
const ShapeInfo &  shapeInfo,
const DblArray12 &  transformMatrix,
const string &  parentid 
)
inlinevirtual

Write geometry properties.

Parameters
geomLink geometry
parentidParent Identifier

Definition at line 806 of file ColladaWriter.h.

◆ WriteKinematics_model()

virtual boost::shared_ptr<kinematics_model_output> ColladaWriter::WriteKinematics_model ( BodyInfo_impl bodyInfo)
inlinevirtual

Definition at line 553 of file ColladaWriter.h.

◆ WritePhysics_model()

virtual boost::shared_ptr<physics_model_output> ColladaWriter::WritePhysics_model ( BodyInfo_impl bodyInfo)
inlinevirtual

Definition at line 705 of file ColladaWriter.h.

◆ WriteSensor()

virtual daeElementRef ColladaWriter::WriteSensor ( const SensorInfo &  sensor,
const string &  parentid 
)
inlinevirtual

Definition at line 1078 of file ColladaWriter.h.

◆ WriteTexture()

virtual domImageRef ColladaWriter::WriteTexture ( const TextureInfo &  texture)
inlinevirtual

Write texture.

Definition at line 1066 of file ColladaWriter.h.

Member Data Documentation

◆ _actuatorsLib

domTechniqueRef ColladaWriter::_actuatorsLib
private

custom actuators library

Definition at line 1470 of file ColladaWriter.h.

◆ _articulatedSystemsLib

domLibrary_articulated_systemsRef ColladaWriter::_articulatedSystemsLib
private

Definition at line 1462 of file ColladaWriter.h.

◆ _collada

boost::shared_ptr<DAE> ColladaWriter::_collada
private

Definition at line 1455 of file ColladaWriter.h.

◆ _doc

daeDocument* ColladaWriter::_doc
private

Definition at line 1457 of file ColladaWriter.h.

◆ _dom

domCOLLADA* ColladaWriter::_dom
private

Definition at line 1456 of file ColladaWriter.h.

◆ _effectsLib

domLibrary_effectsRef ColladaWriter::_effectsLib
private

Definition at line 1466 of file ColladaWriter.h.

◆ _geometriesLib

domLibrary_geometriesRef ColladaWriter::_geometriesLib
private

Definition at line 1468 of file ColladaWriter.h.

◆ _globalscene

domCOLLADA::domSceneRef ColladaWriter::_globalscene
private

Definition at line 1458 of file ColladaWriter.h.

◆ _imagesLib

domLibrary_imagesRef ColladaWriter::_imagesLib
private

Definition at line 1467 of file ColladaWriter.h.

◆ _kinematicsModelsLib

domLibrary_kinematics_modelsRef ColladaWriter::_kinematicsModelsLib
private

Definition at line 1461 of file ColladaWriter.h.

◆ _kinematicsScenesLib

domLibrary_kinematics_scenesRef ColladaWriter::_kinematicsScenesLib
private

Definition at line 1460 of file ColladaWriter.h.

◆ _listkinbodies

std::list<kinbody_models> ColladaWriter::_listkinbodies
private

Definition at line 1473 of file ColladaWriter.h.

◆ _listmanipulators

std::list<ManipulatorInfo> ColladaWriter::_listmanipulators
private

Definition at line 1474 of file ColladaWriter.h.

◆ _materialsLib

domLibrary_materialsRef ColladaWriter::_materialsLib
private

Definition at line 1465 of file ColladaWriter.h.

◆ _nextactuatorid

int ColladaWriter::_nextactuatorid
private

Definition at line 1471 of file ColladaWriter.h.

◆ _nextsensorid

int ColladaWriter::_nextsensorid
private

Definition at line 1471 of file ColladaWriter.h.

◆ _physicsModelsLib

domLibrary_physics_modelsRef ColladaWriter::_physicsModelsLib
private

Definition at line 1464 of file ColladaWriter.h.

◆ _physicsScenesLib

domLibrary_physics_scenesRef ColladaWriter::_physicsScenesLib
private

Definition at line 1463 of file ColladaWriter.h.

◆ _scene

SCENE ColladaWriter::_scene
private

Definition at line 1472 of file ColladaWriter.h.

◆ _sensorsLib

domTechniqueRef ColladaWriter::_sensorsLib
private

custom sensors library

Definition at line 1469 of file ColladaWriter.h.

◆ _visualScenesLib

domLibrary_visual_scenesRef ColladaWriter::_visualScenesLib
private

Definition at line 1459 of file ColladaWriter.h.


The documentation for this class was generated from the following file:


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Thu Sep 8 2022 02:24:07