Load BSInvMarker NIF nodes

macos_ci
alekulyn 2 years ago
parent 8e3e351015
commit dc860ca302

@ -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);
}
}

@ -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

@ -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> },
};
}

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

Loading…
Cancel
Save