mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Read bhkConvexListShape and bhkConvexSweepShape
This commit is contained in:
parent
0eb8d28e81
commit
312e32717c
@ -298,6 +298,8 @@ namespace Nif
|
||||
{ "bhkCylinderShape", &construct<bhkCylinderShape, RC_bhkCylinderShape> },
|
||||
{ "bhkCompressedMeshShape", &construct<bhkCompressedMeshShape, RC_bhkCompressedMeshShape> },
|
||||
{ "bhkCompressedMeshShapeData", &construct<bhkCompressedMeshShapeData, RC_bhkCompressedMeshShapeData> },
|
||||
{ "bhkConvexListShape", &construct<bhkConvexListShape, RC_bhkConvexListShape> },
|
||||
{ "bhkConvexSweepShape", &construct<bhkConvexSweepShape, RC_bhkConvexSweepShape> },
|
||||
{ "bhkConvexTransformShape", &construct<bhkConvexTransformShape, RC_bhkConvexTransformShape> },
|
||||
{ "bhkConvexVerticesShape", &construct<bhkConvexVerticesShape, RC_bhkConvexVerticesShape> },
|
||||
{ "bhkListShape", &construct<bhkListShape, RC_bhkListShape> },
|
||||
|
@ -477,6 +477,35 @@ namespace Nif
|
||||
nif->read(mRadius);
|
||||
}
|
||||
|
||||
void bhkConvexListShape::read(NIFStream* nif)
|
||||
{
|
||||
readRecordList(nif, mSubShapes);
|
||||
mMaterial.read(nif);
|
||||
nif->read(mRadius);
|
||||
nif->skip(8); // Unknown
|
||||
mChildShapeProperty.read(nif);
|
||||
nif->read(mUseCachedAABB);
|
||||
nif->read(mClosestPointMinDistance);
|
||||
}
|
||||
|
||||
void bhkConvexListShape::post(Reader& nif)
|
||||
{
|
||||
postRecordList(nif, mSubShapes);
|
||||
}
|
||||
|
||||
void bhkConvexSweepShape::read(NIFStream* nif)
|
||||
{
|
||||
mShape.read(nif);
|
||||
mMaterial.read(nif);
|
||||
nif->read(mRadius);
|
||||
nif->skip(12); // Unknown
|
||||
}
|
||||
|
||||
void bhkConvexSweepShape::post(Reader& nif)
|
||||
{
|
||||
mShape.post(nif);
|
||||
}
|
||||
|
||||
void bhkConvexVerticesShape::read(NIFStream* nif)
|
||||
{
|
||||
bhkConvexShape::read(nif);
|
||||
|
@ -493,6 +493,30 @@ namespace Nif
|
||||
void read(NIFStream* nif) override;
|
||||
};
|
||||
|
||||
// A list of convex shapes sharing the same properties
|
||||
struct bhkConvexListShape : public bhkShape
|
||||
{
|
||||
bhkShapeList mSubShapes;
|
||||
HavokMaterial mMaterial;
|
||||
float mRadius;
|
||||
bhkWorldObjCInfoProperty mChildShapeProperty;
|
||||
bool mUseCachedAABB;
|
||||
float mClosestPointMinDistance;
|
||||
|
||||
void read(NIFStream* nif) override;
|
||||
void post(Reader& nif) override;
|
||||
};
|
||||
|
||||
struct bhkConvexSweepShape : bhkShape
|
||||
{
|
||||
bhkConvexShape mShape;
|
||||
HavokMaterial mMaterial;
|
||||
float mRadius;
|
||||
|
||||
void read(NIFStream* nif) override;
|
||||
void post(Reader& nif) override;
|
||||
};
|
||||
|
||||
// A convex shape built from vertices
|
||||
struct bhkConvexVerticesShape : public bhkConvexShape
|
||||
{
|
||||
|
@ -44,6 +44,8 @@ namespace Nif
|
||||
RC_bhkCollisionObject,
|
||||
RC_bhkCompressedMeshShape,
|
||||
RC_bhkCompressedMeshShapeData,
|
||||
RC_bhkConvexListShape,
|
||||
RC_bhkConvexSweepShape,
|
||||
RC_bhkConvexTransformShape,
|
||||
RC_bhkConvexVerticesShape,
|
||||
RC_bhkHingeConstraint,
|
||||
|
Loading…
x
Reference in New Issue
Block a user