#include <OMKMovingHumano.h>
Inheritance diagram for OMK::MovingHumano:
Public Member Functions | |
virtual | ~MovingHumano () |
Destructor. | |
Protected Member Functions | |
MovingHumano (Controller &ctrl, const ObjectDescriptor &objectDescriptor) | |
Constructor. | |
virtual OMK::Type::AddVisualObjectPrm | getVisualObjectPrm (ConfigurationParameterDescriptor *node) const |
The parameter to create the associated visual object. | |
virtual HBT::InitialisationSequence * | getInitialiseSequence () |
To get the initialisation sequence. | |
Protected Attributes | |
AttributeT< HBT::PostureData > | _posture |
The posture attribute. | |
HBT::InitialisationSequence * | _initialisationSequence |
A pointer to the initialisation sequence returned by getInitialiseSequence. |
This simulated object cannot be create by the factory, it is only used by must be redefined by a son.
The posture attribute is named "Posture" and gives posture data. This structure cannot be set in the configuration file because it is too complex.
Definition at line 21 of file OMKMovingHumano.h.
MovingHumano::MovingHumano | ( | Controller & | ctrl, | |
const ObjectDescriptor & | objectDescriptor | |||
) | [protected] |
Constructor.
It is protected, because it is only called by the friend creator.
Adds the posture attribute with an output to update the associated avatar.
Definition at line 11 of file OMKMovingHumano.cpp.
References _posture, and OMK::ExtensibleSimulatedObject::addAttribute().
00012 : BasicHumano( ctrl, objectDescriptor ), 00013 _posture( "Posture", HBT::PostureData() ), 00014 _initialisationSequence( 0 ) 00015 { 00016 // The attribute to get the posture of the avatar 00017 addAttribute( _posture, true ) ; 00018 }
MovingHumano::~MovingHumano | ( | ) | [virtual] |
AddVisualObjectPrm MovingHumano::getVisualObjectPrm | ( | ConfigurationParameterDescriptor * | node | ) | const [protected, virtual] |
The parameter to create the associated visual object.
Reimplemented from OMK::BasicHumano.
Definition at line 24 of file OMKMovingHumano.cpp.
References OMK::ParametersAccessor::get(), OMK::SimulatedObject::getName(), OMK::BasicHumano::getVisualObjectPrm(), OMTRACE, and OMK::ParametersAccessor::set().
00025 { 00026 // Inclusion of the animator parameters in the node 00027 const ConfigurationParameterDescriptor* animatorNode = 0 ; 00028 ParametersAccessor::get( node, "Animator", animatorNode ) ; 00029 ConfigurationParameterDescriptor* modifiedAnimatorNode = const_cast< ConfigurationParameterDescriptor* >( animatorNode ) ; 00030 OMTRACE(" NodePere " << *node); 00031 if (animatorNode) 00032 OMTRACE(" Node " << *animatorNode); 00033 00034 ConfigurationParameterDescriptor* humanoAnimatorNode = 0 ; 00035 ParametersAccessor::set( humanoAnimatorNode, "Class", std::string( "HumanoAnimator" ) ) ; 00036 ParametersAccessor::set( 00037 humanoAnimatorNode, "ConnectTo", 00038 std::pair< Name, std::string >( getName(), "Posture" ) ) ; 00039 ParametersAccessor::set( modifiedAnimatorNode, "AvatarAnimator", humanoAnimatorNode ) ; 00040 if( !animatorNode ) ParametersAccessor::set( node, "Animator", modifiedAnimatorNode ) ; 00041 00042 // The default parameters 00043 AddVisualObjectPrm visualObjectPrm( BasicHumano::getVisualObjectPrm( node ) ) ; 00044 00045 return visualObjectPrm ; 00046 }
virtual HBT::InitialisationSequence* OMK::MovingHumano::getInitialiseSequence | ( | ) | [inline, protected, virtual] |
To get the initialisation sequence.
Implements OMK::BasicHumano.
Definition at line 52 of file OMKMovingHumano.h.
00052 { return _initialisationSequence ; } ;
AttributeT< HBT::PostureData > OMK::MovingHumano::_posture [protected] |
The posture attribute.
This posture attribute creates an output to update the associated avatar visual object throught a humano animator.
Definition at line 39 of file OMKMovingHumano.h.
Referenced by OMK::MKMHumano::computeParameters(), OMK::HumanoPlayer::computeParameters(), and MovingHumano().
A pointer to the initialisation sequence returned by getInitialiseSequence.
This pointer is not deleted in the destructor, the son must delete it if necessary.
Must be initialised with a valid initialisation sequence before the first call to compute.
Definition at line 52 of file OMKMovingHumano.h.
Referenced by OMK::MKMHumano::computeParameters(), and OMK::HumanoPlayer::loadParameters().
Documentation generated on Mon Jun 9 11:46:04 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |