Read BSSegmentedTriShape

macos_ci_fix
Alexei Kotov 1 year ago
parent 67e24a0ffe
commit 052fb416c6

@ -272,6 +272,7 @@ namespace Nif
{ "BSDynamicTriShape", &construct<BSDynamicTriShape, RC_BSDynamicTriShape> },
{ "BSLODTriShape", &construct<BSLODTriShape, RC_BSLODTriShape> },
{ "BSMeshLODTriShape", &construct<BSMeshLODTriShape, RC_BSMeshLODTriShape> },
{ "BSSegmentedTriShape", &construct<BSSegmentedTriShape, RC_BSSegmentedTriShape> },
// PARTICLES

@ -196,6 +196,7 @@ namespace Nif
{
case RC_NiTriShape:
case RC_BSLODTriShape:
case RC_BSSegmentedTriShape:
if (mData->recType != RC_NiTriShapeData)
mData = NiGeometryDataPtr(nullptr);
break;
@ -217,6 +218,19 @@ namespace Nif
}
}
void BSSegmentedTriShape::read(NIFStream* nif)
{
NiTriShape::read(nif);
mSegments.resize(nif->get<uint32_t>());
for (SegmentData& segment : mSegments)
{
nif->read(segment.mFlags);
nif->read(segment.mStartIndex);
nif->read(segment.mNumTriangles);
}
}
void BSLODTriShape::read(NIFStream* nif)
{
NiTriBasedGeom::read(nif);

@ -161,6 +161,20 @@ namespace Nif
{
};
struct BSSegmentedTriShape : NiTriShape
{
struct SegmentData
{
uint8_t mFlags;
uint32_t mStartIndex;
uint32_t mNumTriangles;
};
std::vector<SegmentData> mSegments;
void read(NIFStream* nif);
};
struct NiTriStrips : NiTriBasedGeom
{
};

@ -120,6 +120,7 @@ namespace Nif
RC_BSStripPSysData,
RC_BSRefractionFirePeriodController,
RC_BSRefractionStrengthController,
RC_BSSegmentedTriShape,
RC_BSShaderNoLightingProperty,
RC_BSShaderPPLightingProperty,
RC_BSShaderProperty,

Loading…
Cancel
Save