remove utility classes BoneWeight and IndexWeight in order to avoid unnecessary symbols

(but decrease a bit clarity of the code)
This commit is contained in:
Julien Valentin
2017-09-01 16:23:49 +02:00
parent 8b74b04de0
commit 0d02dfbbbd
4 changed files with 28 additions and 41 deletions

View File

@@ -25,26 +25,14 @@
namespace osgAnimation
{
// first is bonename, and second the weight
struct BoneWeight: public std::pair<std::string, float>
{
BoneWeight( std::string f,float s):
std::pair<std::string,float>(f,s){}
inline const std::string& getBoneName()const{return first;}
inline void setBoneName(const std::string&s){first=s;}
inline const float &getWeight()const{return second;}
inline void setWeight(float i){second=i;}
};
typedef std::pair<std::string, float> BoneWeight;
// first is vertex index, and second the weight
struct VertexIndexWeight: public std::pair<unsigned int, float>
{
VertexIndexWeight( unsigned int f = 0xffffffff,float s = 0.0f): std::pair<unsigned int,float>(f,s){}
inline const unsigned int& getIndex()const{return first;}
inline void setIndex(unsigned int i){first=i;}
inline const float &getWeight()const{return second;}
inline void setWeight(float i){second=i;}
};
typedef std::pair<unsigned int, float> VertexIndexWeight;
// list of IndexWeight
typedef std::vector<VertexIndexWeight> IndexWeightList;
// list of IndexWeight
typedef std::vector<BoneWeight> BoneWeightList;
// list of Index
typedef std::vector<unsigned int> IndexList;
//Bone influence list