Read bhkCylinderShape

macos_ci_fix
Alexei Kotov 1 year ago
parent e207285323
commit ecf644bda5

@ -290,6 +290,7 @@ namespace Nif
// Physics geometry records, Bethesda
{ "bhkBoxShape", &construct<bhkBoxShape, RC_bhkBoxShape> },
{ "bhkCapsuleShape", &construct<bhkCapsuleShape, RC_bhkCapsuleShape> },
{ "bhkCylinderShape", &construct<bhkCylinderShape, RC_bhkCylinderShape> },
{ "bhkCompressedMeshShape", &construct<bhkCompressedMeshShape, RC_bhkCompressedMeshShape> },
{ "bhkCompressedMeshShapeData", &construct<bhkCompressedMeshShapeData, RC_bhkCompressedMeshShapeData> },
{ "bhkConvexTransformShape", &construct<bhkConvexTransformShape, RC_bhkConvexTransformShape> },

@ -512,6 +512,17 @@ namespace Nif
nif->read(mRadius2);
}
void bhkCylinderShape::read(NIFStream* nif)
{
bhkConvexShape::read(nif);
nif->skip(8); // Unused
nif->read(mVertexA);
nif->read(mVertexB);
nif->read(mCylinderRadius);
nif->skip(12); // Unused
}
void bhkListShape::read(NIFStream* nif)
{
readRecordList(nif, mSubshapes);

@ -524,6 +524,15 @@ namespace Nif
void read(NIFStream* nif) override;
};
// A cylinder
struct bhkCylinderShape : public bhkConvexShape
{
osg::Vec4f mVertexA, mVertexB;
float mCylinderRadius;
void read(NIFStream* nif) override;
};
// A sphere
using bhkSphereShape = bhkConvexShape;

@ -39,6 +39,7 @@ namespace Nif
RC_bhkBlendController,
RC_bhkBoxShape,
RC_bhkCapsuleShape,
RC_bhkCylinderShape,
RC_bhkCollisionObject,
RC_bhkCompressedMeshShape,
RC_bhkCompressedMeshShapeData,

Loading…
Cancel
Save