mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Load a bunch of triangle strip-based Havok records
This commit is contained in:
parent
e7cc76bba2
commit
83aa96e38f
5 changed files with 124 additions and 1 deletions
|
@ -77,6 +77,14 @@ struct hkpMoppCode
|
|||
void read(NIFStream *nif);
|
||||
};
|
||||
|
||||
struct TriangleData
|
||||
{
|
||||
unsigned short mTriangle[3];
|
||||
unsigned short mWeldingInfo;
|
||||
osg::Vec3f mNormal;
|
||||
void read(NIFStream *nif);
|
||||
};
|
||||
|
||||
/// Record types
|
||||
|
||||
// Abstract Bethesda Havok object
|
||||
|
@ -155,5 +163,40 @@ struct bhkMoppBvTreeShape : public bhkBvTreeShape
|
|||
void read(NIFStream *nif) override;
|
||||
};
|
||||
|
||||
// Bethesda triangle strip-based Havok shape collection
|
||||
struct bhkNiTriStripsShape : public bhkShape
|
||||
{
|
||||
HavokMaterial mHavokMaterial;
|
||||
float mRadius;
|
||||
unsigned int mGrowBy;
|
||||
osg::Vec4f mScale{1.f, 1.f, 1.f, 0.f};
|
||||
NiTriStripsDataList mData;
|
||||
std::vector<unsigned int> mFilters;
|
||||
void read(NIFStream *nif) override;
|
||||
void post(NIFFile *nif) override;
|
||||
};
|
||||
|
||||
// Bethesda packed triangle strip-based Havok shape collection
|
||||
struct bhkPackedNiTriStripsShape : public bhkShapeCollection
|
||||
{
|
||||
std::vector<hkSubPartData> mSubshapes;
|
||||
unsigned int mUserData;
|
||||
float mRadius;
|
||||
osg::Vec4f mScale;
|
||||
hkPackedNiTriStripsDataPtr mData;
|
||||
|
||||
void read(NIFStream *nif) override;
|
||||
void post(NIFFile *nif) override;
|
||||
};
|
||||
|
||||
// bhkPackedNiTriStripsShape data block
|
||||
struct hkPackedNiTriStripsData : public bhkShapeCollection
|
||||
{
|
||||
std::vector<TriangleData> mTriangles;
|
||||
std::vector<osg::Vec3f> mVertices;
|
||||
std::vector<hkSubPartData> mSubshapes;
|
||||
void read(NIFStream *nif) override;
|
||||
};
|
||||
|
||||
} // Namespace
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue