#include "OMKPostureDataType.h"
#include "OMKIncomingSynchronisationMessage.h"
#include "OMKOutgoingSynchronisationMessage.h"
#include "OgreVector3.h"
#include "OgreQuaternion.h"
Include dependency graph for OMKPostureDataType.cpp:
Go to the source code of this file.
OutgoingSynchronisationMessage& operator<< | ( | OMK::OutgoingSynchronisationMessage & | out, | |
const HBT::InitialisationSequence & | p | |||
) |
stream operator for OutgoingSynchronisationMessage.
Use by SimpleTypeT::pack.
Definition at line 128 of file OMKPostureDataType.cpp.
References OMASSERT.
00129 { 00130 out << p.meshFile 00131 << p.humanName 00132 << p.useShadows 00133 << p.generalScale.x << p.generalScale.y << p.generalScale.z 00134 << p.rootQuat.w << p.rootQuat.x << p.rootQuat.y << p.rootQuat.z 00135 << p.rootPos.x << p.rootPos.y << p.rootPos.z 00136 << p.boneNumber.size() ; 00137 OMASSERT( p.boneNumber.size() == p.postureQuat.size() ) ; 00138 for( unsigned int i = 0 ; i < p.boneNumber.size() ; i++ ) 00139 { 00140 out << p.boneNumber[ i ] 00141 << p.postureQuat[ i ].w << p.postureQuat[ i ].x << p.postureQuat[ i ].y << p.postureQuat[ i ].z ; 00142 } 00143 return out ; 00144 }
std::ostream& operator<< | ( | std::ostream & | out, | |
const HBT::InitialisationSequence & | p | |||
) |
stream operator for ostream.
Use by SimpleTypeT::insertInStream.
Definition at line 86 of file OMKPostureDataType.cpp.
00087 { 00088 out << p.meshFile << " " 00089 << p.humanName << " " 00090 << p.useShadows << " " 00091 << p.generalScale.x << " " << p.generalScale.y << " " << p.generalScale.z << " " 00092 << p.rootQuat.w << " " << p.rootQuat.x << " " << p.rootQuat.y << " " << p.rootQuat.z << " " 00093 << p.rootPos.x << " " << p.rootPos.y << " " << p.rootPos.z << " " 00094 << p.boneNumber.size() << " " ; 00095 OMASSERT( p.boneNumber.size() == p.postureQuat.size() ) ; 00096 for( unsigned int i = 0 ; i < p.boneNumber.size() ; i++ ) 00097 { 00098 out << p.boneNumber[ i ] << " " 00099 << p.postureQuat[ i ].w << " " << p.postureQuat[ i ].x << " " << p.postureQuat[ i ].y << " " << p.postureQuat[ i ].z << " " ; 00100 } 00101 return out ; 00102 }
OutgoingSynchronisationMessage& operator<< | ( | OMK::OutgoingSynchronisationMessage & | out, | |
const HBT::PostureData & | p | |||
) |
stream operator for OutgoingSynchronisationMessage.
Use by SimpleTypeT::pack.
Definition at line 46 of file OMKPostureDataType.cpp.
00047 { 00048 out << p.rootPos.x << p.rootPos.y << p.rootPos.z 00049 << p.rootQuat.w << p.rootQuat.x << p.rootQuat.y << p.rootQuat.z 00050 << p.generalScale.x << p.generalScale.y << p.generalScale.z 00051 << p.postureQuat.size() ; 00052 for( unsigned int i = 0 ; i < p.postureQuat.size() ; i++ ) 00053 { 00054 out << p.postureQuat[ i ].w << p.postureQuat[ i ].x << p.postureQuat[ i ].y << p.postureQuat[ i ].z 00055 << p.quatModified[ i ] ; 00056 } 00057 return out ; 00058 }
std::ostream& operator<< | ( | std::ostream & | out, | |
const HBT::PostureData & | p | |||
) |
stream operator for ostream.
Use by SimpleTypeT::insertInStream.
Definition at line 12 of file OMKPostureDataType.cpp.
00013 { 00014 out << p.rootPos.x << " " << p.rootPos.y << " " << p.rootPos.z << " " 00015 << p.rootQuat.w << " " << p.rootQuat.x << " " << p.rootQuat.y << " " << p.rootQuat.z << " " 00016 << p.generalScale.x << " " << p.generalScale.y << " " << p.generalScale.z << " " 00017 << p.postureQuat.size() << " " ; 00018 for( unsigned int i = 0 ; i < p.postureQuat.size() ; i++ ) 00019 { 00020 out << p.postureQuat[ i ].w << " " << p.postureQuat[ i ].x << " " << p.postureQuat[ i ].y << " " << p.postureQuat[ i ].z << " " 00021 << p.quatModified[ i ] << " " ; 00022 } 00023 return out ; 00024 }
IncomingSynchronisationMessage& operator>> | ( | OMK::IncomingSynchronisationMessage & | in, | |
HBT::InitialisationSequence & | p | |||
) |
stream operator for IncomingSynchronisationMessage.
Use by SimpleTypeT::unpack.
Definition at line 147 of file OMKPostureDataType.cpp.
00148 { 00149 unsigned int size ; 00150 in >> p.meshFile 00151 >> p.humanName 00152 >> p.useShadows 00153 >> p.generalScale.x >> p.generalScale.y >> p.generalScale.z 00154 >> p.rootQuat.w >> p.rootQuat.x >> p.rootQuat.y >> p.rootQuat.z 00155 >> p.rootPos.x >> p.rootPos.y >> p.rootPos.z 00156 >> size ; 00157 00158 for( ; 0 < size ; size-- ) 00159 { 00160 unsigned short boneNumber ; 00161 Ogre::Quaternion postureQuat ; 00162 in >> boneNumber 00163 >> postureQuat.w >> postureQuat.x >> postureQuat.y >> postureQuat.z ; 00164 p.boneNumber.push_back( boneNumber ) ; 00165 p.postureQuat.push_back( postureQuat ) ; 00166 } 00167 return in ; 00168 }
std::istream& operator>> | ( | std::istream & | in, | |
HBT::InitialisationSequence & | p | |||
) |
stream operator for istream.
Use by SimpleTypeT::extract.
Definition at line 104 of file OMKPostureDataType.cpp.
00105 { 00106 unsigned int size ; 00107 in >> p.meshFile 00108 >> p.humanName 00109 >> p.useShadows 00110 >> p.generalScale.x >> p.generalScale.y >> p.generalScale.z 00111 >> p.rootQuat.w >> p.rootQuat.x >> p.rootQuat.y >> p.rootQuat.z 00112 >> p.rootPos.x >> p.rootPos.y >> p.rootPos.z 00113 >> size ; 00114 00115 for( ; 0 < size ; size-- ) 00116 { 00117 unsigned short boneNumber ; 00118 Ogre::Quaternion postureQuat ; 00119 in >> boneNumber 00120 >> postureQuat.w >> postureQuat.x >> postureQuat.y >> postureQuat.z ; 00121 p.boneNumber.push_back( boneNumber ) ; 00122 p.postureQuat.push_back( postureQuat ) ; 00123 } 00124 return in ; 00125 }
IncomingSynchronisationMessage& operator>> | ( | OMK::IncomingSynchronisationMessage & | in, | |
HBT::PostureData & | p | |||
) |
stream operator for IncomingSynchronisationMessage.
Use by SimpleTypeT::unpack.
Definition at line 61 of file OMKPostureDataType.cpp.
00062 { 00063 unsigned int size ; 00064 in >> p.rootPos.x >> p.rootPos.y >> p.rootPos.z 00065 >> p.rootQuat.w >> p.rootQuat.x >> p.rootQuat.y >> p.rootQuat.z 00066 >> p.generalScale.x >> p.generalScale.y >> p.generalScale.z 00067 >> size ; 00068 for( ; 0 < size ; size-- ) 00069 { 00070 Ogre::Quaternion postureQuat ; 00071 bool quatModified ; 00072 in >> postureQuat.w >> postureQuat.x >> postureQuat.y >> postureQuat.z 00073 >> quatModified ; 00074 p.postureQuat.push_back( postureQuat ) ; 00075 p.quatModified.push_back( quatModified ) ; 00076 } 00077 return in ; 00078 }
std::istream& operator>> | ( | std::istream & | in, | |
HBT::PostureData & | p | |||
) |
stream operator for istream.
Use by SimpleTypeT::extract.
Definition at line 26 of file OMKPostureDataType.cpp.
00027 { 00028 unsigned int size ; 00029 in >> p.rootPos.x >> p.rootPos.y >> p.rootPos.z 00030 >> p.rootQuat.w >> p.rootQuat.x >> p.rootQuat.y >> p.rootQuat.z 00031 >> p.generalScale.x >> p.generalScale.y >> p.generalScale.z 00032 >> size ; 00033 for( ; 0 < size ; size-- ) 00034 { 00035 Ogre::Quaternion postureQuat ; 00036 bool quatModified ; 00037 in >> postureQuat.w >> postureQuat.x >> postureQuat.y >> postureQuat.z 00038 >> quatModified ; 00039 p.postureQuat.push_back( postureQuat ) ; 00040 p.quatModified.push_back( quatModified ) ; 00041 } 00042 return in ; 00043 }
Documentation generated on Mon Jun 9 11:45:58 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |