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:
commit
cc213fb437
@ -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;
|
void read(NIFStream* nif) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct BSInvMarker : public Extra
|
||||||
|
{
|
||||||
|
osg::Quat mRotation;
|
||||||
|
float mScale = 1.0f;
|
||||||
|
|
||||||
|
void read(NIFStream* nif) override;
|
||||||
|
};
|
||||||
|
|
||||||
} // Namespace
|
} // Namespace
|
||||||
#endif
|
#endif
|
||||||
|
@ -190,6 +190,7 @@ namespace Nif
|
|||||||
{ "BSMultiBound", &construct<BSMultiBound, RC_BSMultiBound> },
|
{ "BSMultiBound", &construct<BSMultiBound, RC_BSMultiBound> },
|
||||||
{ "BSMultiBoundOBB", &construct<BSMultiBoundOBB, RC_BSMultiBoundOBB> },
|
{ "BSMultiBoundOBB", &construct<BSMultiBoundOBB, RC_BSMultiBoundOBB> },
|
||||||
{ "BSMultiBoundSphere", &construct<BSMultiBoundSphere, RC_BSMultiBoundSphere> },
|
{ "BSMultiBoundSphere", &construct<BSMultiBoundSphere, RC_BSMultiBoundSphere> },
|
||||||
|
{ "BSInvMarker", &construct<BSInvMarker, RC_BSInvMarker> },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,6 +162,7 @@ namespace Nif
|
|||||||
RC_BSMultiBound,
|
RC_BSMultiBound,
|
||||||
RC_BSMultiBoundOBB,
|
RC_BSMultiBoundOBB,
|
||||||
RC_BSMultiBoundSphere,
|
RC_BSMultiBoundSphere,
|
||||||
|
RC_BSInvMarker,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Base class for all records
|
/// Base class for all records
|
||||||
|
Loading…
x
Reference in New Issue
Block a user