mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Load bhkConvexVerticesShape, bhkBoxShape, bhkListShape
This commit is contained in:
parent
83aa96e38f
commit
c01fff280a
4 changed files with 93 additions and 1 deletions
|
@ -179,4 +179,48 @@ namespace Nif
|
|||
}
|
||||
}
|
||||
|
||||
void bhkSphereRepShape::read(NIFStream *nif)
|
||||
{
|
||||
mHavokMaterial.read(nif);
|
||||
}
|
||||
|
||||
void bhkConvexShape::read(NIFStream *nif)
|
||||
{
|
||||
bhkSphereRepShape::read(nif);
|
||||
mRadius = nif->getFloat();
|
||||
}
|
||||
|
||||
void bhkConvexVerticesShape::read(NIFStream *nif)
|
||||
{
|
||||
bhkConvexShape::read(nif);
|
||||
mVerticesProperty.read(nif);
|
||||
mNormalsProperty.read(nif);
|
||||
unsigned int numVertices = nif->getUInt();
|
||||
if (numVertices)
|
||||
nif->getVector4s(mVertices, numVertices);
|
||||
unsigned int numNormals = nif->getUInt();
|
||||
if (numNormals)
|
||||
nif->getVector4s(mNormals, numNormals);
|
||||
}
|
||||
|
||||
void bhkBoxShape::read(NIFStream *nif)
|
||||
{
|
||||
bhkConvexShape::read(nif);
|
||||
nif->skip(8); // Unused
|
||||
mExtents = nif->getVector3();
|
||||
nif->skip(4); // Unused
|
||||
}
|
||||
|
||||
void bhkListShape::read(NIFStream *nif)
|
||||
{
|
||||
mSubshapes.read(nif);
|
||||
mHavokMaterial.read(nif);
|
||||
mChildShapeProperty.read(nif);
|
||||
mChildFilterProperty.read(nif);
|
||||
unsigned int numFilters = nif->getUInt();
|
||||
mHavokFilters.resize(numFilters);
|
||||
for (HavokFilter& filter : mHavokFilters)
|
||||
filter.read(nif);
|
||||
}
|
||||
|
||||
} // Namespace
|
Loading…
Add table
Add a link
Reference in a new issue