mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 03:40:14 +00:00
Read bhkBallAndSocketConstraint and bhkStiffSpringConstraint
This commit is contained in:
parent
e2efc9dd2f
commit
6204a83a2b
@ -338,9 +338,11 @@ namespace Nif
|
|||||||
{ "bhkBlendCollisionObject", &construct<bhkBlendCollisionObject, RC_bhkBlendCollisionObject> },
|
{ "bhkBlendCollisionObject", &construct<bhkBlendCollisionObject, RC_bhkBlendCollisionObject> },
|
||||||
|
|
||||||
// Constraint records, Bethesda
|
// Constraint records, Bethesda
|
||||||
|
{ "bhkBallAndSocketConstraint", &construct<bhkBallAndSocketConstraint, RC_bhkBallAndSocketConstraint> },
|
||||||
{ "bhkHingeConstraint", &construct<bhkHingeConstraint, RC_bhkHingeConstraint> },
|
{ "bhkHingeConstraint", &construct<bhkHingeConstraint, RC_bhkHingeConstraint> },
|
||||||
{ "bhkLimitedHingeConstraint", &construct<bhkLimitedHingeConstraint, RC_bhkLimitedHingeConstraint> },
|
{ "bhkLimitedHingeConstraint", &construct<bhkLimitedHingeConstraint, RC_bhkLimitedHingeConstraint> },
|
||||||
{ "bhkRagdollConstraint", &construct<bhkRagdollConstraint, RC_bhkRagdollConstraint> },
|
{ "bhkRagdollConstraint", &construct<bhkRagdollConstraint, RC_bhkRagdollConstraint> },
|
||||||
|
{ "bhkStiffSpringConstraint", &construct<bhkStiffSpringConstraint, RC_bhkStiffSpringConstraint> },
|
||||||
|
|
||||||
// Physics body records, Bethesda
|
// Physics body records, Bethesda
|
||||||
{ "bhkRigidBody", &construct<bhkRigidBody, RC_bhkRigidBody> },
|
{ "bhkRigidBody", &construct<bhkRigidBody, RC_bhkRigidBody> },
|
||||||
|
@ -332,6 +332,19 @@ namespace Nif
|
|||||||
mMotor.read(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
|
/// Record types
|
||||||
|
|
||||||
void bhkCollisionObject::read(NIFStream* nif)
|
void bhkCollisionObject::read(NIFStream* nif)
|
||||||
@ -719,4 +732,18 @@ namespace Nif
|
|||||||
mConstraint.read(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
|
} // Namespace
|
||||||
|
@ -348,6 +348,21 @@ namespace Nif
|
|||||||
void read(NIFStream* 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
|
/// Record types
|
||||||
|
|
||||||
// Abstract Bethesda Havok object
|
// Abstract Bethesda Havok object
|
||||||
@ -684,5 +699,19 @@ namespace Nif
|
|||||||
void read(NIFStream* nif) override;
|
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
|
} // Namespace
|
||||||
#endif
|
#endif
|
||||||
|
@ -36,6 +36,7 @@ namespace Nif
|
|||||||
{
|
{
|
||||||
RC_MISSING = 0,
|
RC_MISSING = 0,
|
||||||
RC_AvoidNode,
|
RC_AvoidNode,
|
||||||
|
RC_bhkBallAndSocketConstraint,
|
||||||
RC_bhkBlendCollisionObject,
|
RC_bhkBlendCollisionObject,
|
||||||
RC_bhkBlendController,
|
RC_bhkBlendController,
|
||||||
RC_bhkBoxShape,
|
RC_bhkBoxShape,
|
||||||
@ -61,6 +62,7 @@ namespace Nif
|
|||||||
RC_bhkRigidBodyT,
|
RC_bhkRigidBodyT,
|
||||||
RC_bhkSimpleShapePhantom,
|
RC_bhkSimpleShapePhantom,
|
||||||
RC_bhkSphereShape,
|
RC_bhkSphereShape,
|
||||||
|
RC_bhkStiffSpringConstraint,
|
||||||
RC_BSBehaviorGraphExtraData,
|
RC_BSBehaviorGraphExtraData,
|
||||||
RC_BSBound,
|
RC_BSBound,
|
||||||
RC_BSBoneLODExtraData,
|
RC_BSBoneLODExtraData,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user