MIRA
Public Types | Public Member Functions | Protected Attributes | List of all members
RigidModelProvider< ModelType > Class Template Reference

Inherit from this class by specifying a ModelType that is inherited from RigidModel to build your own model provider. More...

#include <model/RigidModelProvider.h>

Inheritance diagram for RigidModelProvider< ModelType >:
Inheritance graph
[legend]

Public Types

typedef boost::shared_ptr< ModelType > ModelTypePtr
 

Public Member Functions

template<typename Reflector >
void reflect (Reflector &r)
 Reflect method for serialization. More...
 
virtual model::RigidModelPtr getRigidModel ()
 Return the used rigid model pointer. More...
 
void publishJoint (const std::string &name, float value, Time const &t=Time::now())
 Publishes the state of the joint with the given name. More...
 
void publishTransforms (const std::string &ns, Time const &t=Time::now())
 Resolves all transform frames, adds transform links and publishes all transformations of the loaded model using the given namespace. More...
 
void reflect (RPCServer::RPCReflector &r)
 
virtual Buffer< uint8 > getResourceFile (const std::string &filename, bool compress)
 Return the content of a resource file (may be required to display the model). More...
 

Protected Attributes

ModelTypePtr mModel
 

Detailed Description

template<typename ModelType>
class mira::model::RigidModelProvider< ModelType >

Inherit from this class by specifying a ModelType that is inherited from RigidModel to build your own model provider.

Member Typedef Documentation

◆ ModelTypePtr

typedef boost::shared_ptr<ModelType> ModelTypePtr

Member Function Documentation

◆ reflect() [1/2]

void reflect ( Reflector &  r)
inline

Reflect method for serialization.

◆ getRigidModel()

virtual model::RigidModelPtr getRigidModel ( )
inlinevirtual

Return the used rigid model pointer.

Implements IRigidModelProvider.

◆ publishJoint()

void publishJoint ( const std::string &  name,
float  value,
Time const &  t = Time::now() 
)
inline

Publishes the state of the joint with the given name.

See RigidModel::publishJoint() for details.

Exceptions
XInvalidConfigif no model is loaded

◆ publishTransforms()

void publishTransforms ( const std::string &  ns,
Time const &  t = Time::now() 
)
inline

Resolves all transform frames, adds transform links and publishes all transformations of the loaded model using the given namespace.

Parameters
nsThe namespace of the model
tAn optional timestamp of the (initial) transformation states

◆ reflect() [2/2]

void reflect ( RPCServer::RPCReflector &  r)
inlineinherited

◆ getResourceFile()

virtual Buffer<uint8> getResourceFile ( const std::string &  filename,
bool  compress 
)
inlinevirtualinherited

Return the content of a resource file (may be required to display the model).

Member Data Documentation

◆ mModel

ModelTypePtr mModel
protected

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