00001 #include "OMKMovingHumano.h" 00002 #include "OMKParametersAccessor.inl" 00003 #include "OMKTransform.h" 00004 #include "OMKAddVisualObjectPrm.h" 00005 00006 using namespace OMK ; 00007 using namespace OMK::Type ; 00008 00009 //============================================================================= 00010 00011 MovingHumano::MovingHumano( Controller& ctrl, const ObjectDescriptor& objectDescriptor ) 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 } 00019 //----------------------------------------------------------------------------- 00020 MovingHumano::~MovingHumano() 00021 { 00022 } 00023 //----------------------------------------------------------------------------- 00024 AddVisualObjectPrm MovingHumano::getVisualObjectPrm( ConfigurationParameterDescriptor* node ) const 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 } 00047 //-----------------------------------------------------------------------------
Documentation generated on Mon Jun 9 11:45:56 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |