replace VertexInfluence to BoneInfluenceList

and VertexIndexWeight to IndexWeight

fix in example
This commit is contained in:
Julien Valentin
2017-08-27 02:14:12 +02:00
parent 4f0256bcc3
commit ca224c81dd
8 changed files with 25 additions and 25 deletions

View File

@@ -813,7 +813,7 @@ bool RigGeometry_readLocalData(Object& obj, Input& fr)
iteratorAdvanced = true;
}
osgAnimation::VertexInfluence vi;
osgAnimation::BoneInfluenceList vi;
vi.setName(name);
vi.reserve(nbVertexes);
for (int j = 0; j < nbVertexes; j++)
@@ -827,7 +827,7 @@ bool RigGeometry_readLocalData(Object& obj, Input& fr)
fr += 2;
iteratorAdvanced = true;
}
vi.push_back(osgAnimation::VertexIndexWeight(index, weight));
vi.push_back(osgAnimation::IndexWeight(index, weight));
}
if (fr.matchSequence("}"))
{
@@ -863,8 +863,8 @@ bool RigGeometry_writeLocalData(const Object& obj, Output& fw)
name = "Empty";
fw.indent() << "osgAnimation::VertexInfluence \"" << name << "\" " << it->second.size() << " {" << std::endl;
fw.moveIn();
const osgAnimation::VertexInfluence& vi = it->second;
for (osgAnimation::VertexInfluence::const_iterator itv = vi.begin(); itv != vi.end(); itv++)
const osgAnimation::BoneInfluenceList& vi = it->second;
for (osgAnimation::BoneInfluenceList::const_iterator itv = vi.begin(); itv != vi.end(); itv++)
{
fw.indent() << itv->first << " " << itv->second << std::endl;
}

View File

@@ -20,7 +20,7 @@ static bool readInfluenceMap( osgDB::InputStream& is, osgAnimation::RigGeometry&
is.readWrappedString(name);
viSize = is.readSize(); is >> is.BEGIN_BRACKET;
osgAnimation::VertexInfluence vi;
osgAnimation::BoneInfluenceList vi;
vi.setName( name );
vi.reserve( viSize );
for ( unsigned int j=0; j<viSize; ++j )
@@ -28,7 +28,7 @@ static bool readInfluenceMap( osgDB::InputStream& is, osgAnimation::RigGeometry&
int index = 0;
float weight = 0.0f;
is >> index >> weight;
vi.push_back( osgAnimation::VertexIndexWeight(index, weight) );
vi.push_back( osgAnimation::IndexWeight(index, weight) );
}
(*map)[name] = vi;
is >> is.END_BRACKET;
@@ -47,14 +47,14 @@ static bool writeInfluenceMap( osgDB::OutputStream& os, const osgAnimation::RigG
itr!=map->end(); ++itr )
{
std::string name = itr->first;
const osgAnimation::VertexInfluence& vi = itr->second;
const osgAnimation::BoneInfluenceList& vi = itr->second;
if ( name.empty() ) name = "Empty";
os << os.PROPERTY("VertexInfluence");
os.writeWrappedString(name);
os.writeSize(vi.size()) ; os << os.BEGIN_BRACKET << std::endl;
for ( osgAnimation::VertexInfluence::const_iterator vitr=vi.begin();
for ( osgAnimation::BoneInfluenceList::const_iterator vitr=vi.begin();
vitr != vi.end(); ++vitr )
{
os << vitr->first << vitr->second << std::endl;