total removal of the old path

This commit is contained in:
Julien Valentin
2017-08-28 18:16:30 +02:00
parent 28bb88a038
commit 925f1524cf
4 changed files with 0 additions and 209 deletions

View File

@@ -67,62 +67,6 @@ namespace osgAnimation
{}
};
// this class manage VertexInfluence database by mesh
// reference bones per vertex ...
class OSGANIMATION_EXPORT VertexInfluenceSet
{
public:
typedef std::vector<BoneInfluenceList> BoneToVertexList;
class BoneWeight
{
public:
BoneWeight(const std::string& name, float weight) : _boneName(name), _weight(weight) {}
BoneWeight(const BoneWeight &bw2) : _boneName(bw2._boneName), _weight(bw2._weight) {}
const std::string& getBoneName() const { return _boneName; }
float getWeight() const { return _weight; }
void setWeight(float weight) { _weight = weight; }
bool operator==(const BoneWeight& b) const { return (_boneName == b.getBoneName() && _weight == b.getWeight()); }
protected:
std::string _boneName;
float _weight;
};
typedef std::vector<BoneWeight> BoneWeightList;
typedef std::vector<BoneWeightList> VertIDToBoneWeightList;
class VertexGroup
{
public:
// set Influences of the VertexGroup
void setBones(BoneWeightList& bones) { _bones = bones;}
const BoneWeightList& getBones() const { return _bones;}
// set Vertex Indices of the VertexGroup
std::vector<unsigned int>& getVertexes() { return _vertexes;}
const std::vector<unsigned int>& getVertexes() const { return _vertexes;}
protected:
std::vector<unsigned int> _vertexes;
BoneWeightList _bones; // here we could limit matrix operation by caching (weight * matrix)
};
typedef std::vector<VertexGroup> UniqVertexGroupList;
/** construct a vector of unique VertexGroups and their influences**/
void buildUniqVertexGroupList();
/** return a list of unique VertexGroups and their influences**/
const UniqVertexGroupList& getUniqVertexGroupList() const { return _uniqVertexSetToBoneSet;}
void addVertexInfluence(const BoneInfluenceList& v);
void buildVertex2BoneList(unsigned int numvertices);
void clear();
const VertIDToBoneWeightList& getVertexToBoneList() const;
protected:
BoneToVertexList _bone2Vertexes;
VertIDToBoneWeightList _vertex2Bones;
UniqVertexGroupList _uniqVertexSetToBoneSet;
};
}
#endif