1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-20 15:40:32 +00:00

Load BSInvMarker NIF nodes

This commit is contained in:
alekulyn 2023-06-01 15:27:42 -05:00
parent 8e3e351015
commit dc860ca302
4 changed files with 20 additions and 0 deletions

View File

@ -128,4 +128,14 @@ namespace Nif
}
}
void BSInvMarker::read(NIFStream* nif)
{
Extra::read(nif);
float rotX = nif->getUShort() / 1000.0;
float rotY = nif->getUShort() / 1000.0;
float rotZ = nif->getUShort() / 1000.0;
mScale = nif->getFloat();
mRotation = osg::Quat(rotX, osg::X_AXIS, rotY, osg::Y_AXIS, rotZ, osg::Z_AXIS);
}
}

View File

@ -146,5 +146,13 @@ namespace Nif
void read(NIFStream* nif) override;
};
struct BSInvMarker : public Extra
{
osg::Quat mRotation;
float mScale = 1.0f;
void read(NIFStream* nif) override;
};
} // Namespace
#endif

View File

@ -190,6 +190,7 @@ namespace Nif
{ "BSMultiBound", &construct<BSMultiBound, RC_BSMultiBound> },
{ "BSMultiBoundOBB", &construct<BSMultiBoundOBB, RC_BSMultiBoundOBB> },
{ "BSMultiBoundSphere", &construct<BSMultiBoundSphere, RC_BSMultiBoundSphere> },
{ "BSInvMarker", &construct<BSInvMarker, RC_BSInvMarker> },
};
}

View File

@ -162,6 +162,7 @@ namespace Nif
RC_BSMultiBound,
RC_BSMultiBoundOBB,
RC_BSMultiBoundSphere,
RC_BSInvMarker,
};
/// Base class for all records