HBTDataTypes.h

Go to the documentation of this file.
00001 #if !defined HBT_DATATYPES_H
00002 #define HBT_DATATYPES_H
00003 
00004 #include "HBT.h"
00005 #include "Ogre.h"
00006 #include <iostream>
00007 #include <vector>
00008 
00009 //************************************************************************************* //**********************************************************************************
00013 
00014 namespace HBT
00015 {
00016 //************************************************************
00018 //************************************************************
00020 //------------------------------------------------------------
00022 //------------------------------------------------------------
00023 struct HBT_API PostureData
00024 {
00025   Ogre::Vector3     rootPos ;    
00026   Ogre::Quaternion  rootQuat;    
00027   Ogre::Vector3 generalScale;    
00028   std::vector<Ogre::Quaternion> postureQuat;  
00029   std::vector<bool> quatModified;  
00030 
00032   PostureData() {}
00034   PostureData( const PostureData& posture ) { _copy( posture ) ; }
00036   PostureData& operator = ( const PostureData& posture ) { _copy( posture ) ; return *this ; }
00037 protected:
00039   void _copy( const PostureData& posture ) ;
00040 };
00041 
00042 //------------------------------------------------------------
00044   //------------------------------------------------------------
00048 struct HBT_API InitialisationSequence
00049 {
00050   std::string meshFile;          
00051   std::string humanName;        
00052   bool useShadows;              
00053 
00054   Ogre::Vector3 generalScale;    
00055   Ogre::Quaternion  rootQuat;    
00056   Ogre::Vector3  rootPos;        
00057 
00058   std::vector<unsigned short>  boneNumber;  
00059   std::vector<Ogre::Quaternion> postureQuat;  
00060 
00062   InitialisationSequence() {}
00064   InitialisationSequence( const InitialisationSequence& initSeq ) { _copy( initSeq ) ; }
00066   InitialisationSequence& operator = ( const InitialisationSequence& initSeq ) { _copy( initSeq ) ; return *this ; }
00067 protected:
00069   void _copy( const InitialisationSequence& initSeq ) ;
00070 };
00072 }
00073 
00074 // Protected copy function.
00075 inline void HBT::PostureData::_copy( const PostureData& posture ) 
00076 {
00077   if( this != &posture )
00078   {
00079     rootPos      = posture.rootPos      ;
00080     rootQuat     = posture.rootQuat     ;  
00081     generalScale = posture.generalScale ;  
00082     postureQuat  = posture.postureQuat  ;  
00083     quatModified = posture.quatModified ;
00084   }
00085 }
00086 // Protected copy function.
00087 inline void HBT::InitialisationSequence::_copy( const InitialisationSequence& initSeq ) 
00088 {
00089   if( this != &initSeq )
00090   {
00091     meshFile     = initSeq.meshFile     ; 
00092     humanName    = initSeq.humanName    ; 
00093     useShadows   = initSeq.useShadows   ; 
00094     generalScale = initSeq.generalScale ; 
00095     rootQuat     = initSeq.rootQuat     ; 
00096     rootPos      = initSeq.rootPos      ; 
00097     boneNumber   = initSeq.boneNumber   ; 
00098     postureQuat  = initSeq.postureQuat  ; 
00099   }
00100 }
00101 
00102 
00103 #endif // HBT_DATATYPES_H
00104 

logo OpenMask

Documentation generated on Mon Jun 9 11:45:55 2008

Generated with doxygen by Dimitri van Heesch ,   1997-2007