mirror of https://github.com/OpenMW/openmw.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
635 B
C++
30 lines
635 B
C++
8 months ago
|
#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
|