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

Merge branch 'loadBsInvMarker' into 'master'

Load BSInvMarker NIF nodes

See merge request OpenMW/openmw!3092
This commit is contained in:
psi29a 2023-06-02 07:36:53 +00:00
commit cc213fb437
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