Read bhkBallAndSocketConstraint and bhkStiffSpringConstraint

macos_ci_fix
Alexei Kotov 1 year ago
parent e2efc9dd2f
commit 6204a83a2b

@ -338,9 +338,11 @@ namespace Nif
{ "bhkBlendCollisionObject", &construct<bhkBlendCollisionObject, RC_bhkBlendCollisionObject> },
// Constraint records, Bethesda
{ "bhkBallAndSocketConstraint", &construct<bhkBallAndSocketConstraint, RC_bhkBallAndSocketConstraint> },
{ "bhkHingeConstraint", &construct<bhkHingeConstraint, RC_bhkHingeConstraint> },
{ "bhkLimitedHingeConstraint", &construct<bhkLimitedHingeConstraint, RC_bhkLimitedHingeConstraint> },
{ "bhkRagdollConstraint", &construct<bhkRagdollConstraint, RC_bhkRagdollConstraint> },
{ "bhkStiffSpringConstraint", &construct<bhkStiffSpringConstraint, RC_bhkStiffSpringConstraint> },
// Physics body records, Bethesda
{ "bhkRigidBody", &construct<bhkRigidBody, RC_bhkRigidBody> },

@ -332,6 +332,19 @@ namespace Nif
mMotor.read(nif);
}
void bhkBallAndSocketConstraintCInfo::read(NIFStream* nif)
{
nif->read(mPivotA);
nif->read(mPivotB);
}
void bhkStiffSpringConstraintCInfo::read(NIFStream* nif)
{
nif->read(mPivotA);
nif->read(mPivotB);
nif->read(mLength);
}
/// Record types
void bhkCollisionObject::read(NIFStream* nif)
@ -719,4 +732,18 @@ namespace Nif
mConstraint.read(nif);
}
void bhkBallAndSocketConstraint::read(NIFStream* nif)
{
bhkConstraint::read(nif);
mConstraint.read(nif);
}
void bhkStiffSpringConstraint::read(NIFStream* nif)
{
bhkConstraint::read(nif);
mConstraint.read(nif);
}
} // Namespace

@ -348,6 +348,21 @@ namespace Nif
void read(NIFStream* nif);
};
struct bhkBallAndSocketConstraintCInfo
{
osg::Vec4f mPivotA, mPivotB;
void read(NIFStream* nif);
};
struct bhkStiffSpringConstraintCInfo
{
osg::Vec4f mPivotA, mPivotB;
float mLength;
void read(NIFStream* nif);
};
/// Record types
// Abstract Bethesda Havok object
@ -684,5 +699,19 @@ namespace Nif
void read(NIFStream* nif) override;
};
struct bhkBallAndSocketConstraint : bhkConstraint
{
bhkBallAndSocketConstraintCInfo mConstraint;
void read(NIFStream* nif) override;
};
struct bhkStiffSpringConstraint : bhkConstraint
{
bhkStiffSpringConstraintCInfo mConstraint;
void read(NIFStream* nif) override;
};
} // Namespace
#endif

@ -36,6 +36,7 @@ namespace Nif
{
RC_MISSING = 0,
RC_AvoidNode,
RC_bhkBallAndSocketConstraint,
RC_bhkBlendCollisionObject,
RC_bhkBlendController,
RC_bhkBoxShape,
@ -61,6 +62,7 @@ namespace Nif
RC_bhkRigidBodyT,
RC_bhkSimpleShapePhantom,
RC_bhkSphereShape,
RC_bhkStiffSpringConstraint,
RC_BSBehaviorGraphExtraData,
RC_BSBound,
RC_BSBoneLODExtraData,

Loading…
Cancel
Save