mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-17 10:21:11 +00:00
Read bhkCylinderShape
This commit is contained in:
parent
e207285323
commit
ecf644bda5
@ -290,6 +290,7 @@ namespace Nif
|
|||||||
// Physics geometry records, Bethesda
|
// Physics geometry records, Bethesda
|
||||||
{ "bhkBoxShape", &construct<bhkBoxShape, RC_bhkBoxShape> },
|
{ "bhkBoxShape", &construct<bhkBoxShape, RC_bhkBoxShape> },
|
||||||
{ "bhkCapsuleShape", &construct<bhkCapsuleShape, RC_bhkCapsuleShape> },
|
{ "bhkCapsuleShape", &construct<bhkCapsuleShape, RC_bhkCapsuleShape> },
|
||||||
|
{ "bhkCylinderShape", &construct<bhkCylinderShape, RC_bhkCylinderShape> },
|
||||||
{ "bhkCompressedMeshShape", &construct<bhkCompressedMeshShape, RC_bhkCompressedMeshShape> },
|
{ "bhkCompressedMeshShape", &construct<bhkCompressedMeshShape, RC_bhkCompressedMeshShape> },
|
||||||
{ "bhkCompressedMeshShapeData", &construct<bhkCompressedMeshShapeData, RC_bhkCompressedMeshShapeData> },
|
{ "bhkCompressedMeshShapeData", &construct<bhkCompressedMeshShapeData, RC_bhkCompressedMeshShapeData> },
|
||||||
{ "bhkConvexTransformShape", &construct<bhkConvexTransformShape, RC_bhkConvexTransformShape> },
|
{ "bhkConvexTransformShape", &construct<bhkConvexTransformShape, RC_bhkConvexTransformShape> },
|
||||||
|
@ -512,6 +512,17 @@ namespace Nif
|
|||||||
nif->read(mRadius2);
|
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)
|
void bhkListShape::read(NIFStream* nif)
|
||||||
{
|
{
|
||||||
readRecordList(nif, mSubshapes);
|
readRecordList(nif, mSubshapes);
|
||||||
|
@ -524,6 +524,15 @@ namespace Nif
|
|||||||
void read(NIFStream* nif) override;
|
void read(NIFStream* nif) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// A cylinder
|
||||||
|
struct bhkCylinderShape : public bhkConvexShape
|
||||||
|
{
|
||||||
|
osg::Vec4f mVertexA, mVertexB;
|
||||||
|
float mCylinderRadius;
|
||||||
|
|
||||||
|
void read(NIFStream* nif) override;
|
||||||
|
};
|
||||||
|
|
||||||
// A sphere
|
// A sphere
|
||||||
using bhkSphereShape = bhkConvexShape;
|
using bhkSphereShape = bhkConvexShape;
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@ namespace Nif
|
|||||||
RC_bhkBlendController,
|
RC_bhkBlendController,
|
||||||
RC_bhkBoxShape,
|
RC_bhkBoxShape,
|
||||||
RC_bhkCapsuleShape,
|
RC_bhkCapsuleShape,
|
||||||
|
RC_bhkCylinderShape,
|
||||||
RC_bhkCollisionObject,
|
RC_bhkCollisionObject,
|
||||||
RC_bhkCompressedMeshShape,
|
RC_bhkCompressedMeshShape,
|
||||||
RC_bhkCompressedMeshShapeData,
|
RC_bhkCompressedMeshShapeData,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user