1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-28 16:09:43 +00:00

Remove GeometryInterface

Actually, it was a terrible idea
This commit is contained in:
Alexei Kotov 2023-09-27 13:36:29 +03:00
parent 291d0de79e
commit 8fb900da85

View file

@ -119,14 +119,7 @@ namespace Nif
void post(Reader& nif) override; void post(Reader& nif) override;
}; };
struct GeometryInterface struct NiGeometry : NiAVObject
{
NiSkinInstancePtr mSkin;
BSShaderPropertyPtr mShaderProperty;
NiAlphaPropertyPtr mAlphaProperty;
};
struct NiGeometry : NiAVObject, GeometryInterface
{ {
/* Possible flags: /* Possible flags:
0x40 - mesh has no vertex normals ? 0x40 - mesh has no vertex normals ?
@ -145,8 +138,12 @@ namespace Nif
void read(NIFStream* nif); void read(NIFStream* nif);
}; };
NiGeometryDataPtr mData; NiGeometryDataPtr mData;
NiSkinInstancePtr mSkin;
MaterialData mMaterial; MaterialData mMaterial;
BSShaderPropertyPtr mShaderProperty;
NiAlphaPropertyPtr mAlphaProperty;
void read(NIFStream* nif) override; void read(NIFStream* nif) override;
void post(Reader& nif) override; void post(Reader& nif) override;
@ -365,10 +362,13 @@ namespace Nif
void read(NIFStream* nif, uint16_t flags); void read(NIFStream* nif, uint16_t flags);
}; };
struct BSTriShape : NiAVObject, GeometryInterface struct BSTriShape : NiAVObject
{ {
osg::BoundingSpheref mBoundingSphere; osg::BoundingSpheref mBoundingSphere;
std::array<float, 6> mBoundMinMax; std::array<float, 6> mBoundMinMax;
RecordPtrT<Record> mSkin;
BSShaderPropertyPtr mShaderProperty;
NiAlphaPropertyPtr mAlphaProperty;
BSVertexDesc mVertDesc; BSVertexDesc mVertDesc;
uint32_t mDataSize; uint32_t mDataSize;
std::vector<BSVertexData> mVertData; std::vector<BSVertexData> mVertData;