mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Split ESM headers
This commit is contained in:
parent
a57c350c08
commit
01166b1f26
29 changed files with 172 additions and 118 deletions
29
components/esm/quaternion.hpp
Normal file
29
components/esm/quaternion.hpp
Normal file
|
@ -0,0 +1,29 @@
|
|||
#ifndef OPENMW_COMPONENTS_ESM_QUATERNION_H
|
||||
#define OPENMW_COMPONENTS_ESM_QUATERNION_H
|
||||
|
||||
#include <osg/Quat>
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
// format 0, savegames only
|
||||
struct Quaternion
|
||||
{
|
||||
float mValues[4];
|
||||
|
||||
Quaternion() = default;
|
||||
|
||||
Quaternion(const osg::Quat& q)
|
||||
: mValues{
|
||||
static_cast<float>(q.w()),
|
||||
static_cast<float>(q.x()),
|
||||
static_cast<float>(q.y()),
|
||||
static_cast<float>(q.z()),
|
||||
}
|
||||
{
|
||||
}
|
||||
|
||||
operator osg::Quat() const { return osg::Quat(mValues[1], mValues[2], mValues[3], mValues[0]); }
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue