M&B: Bannerlord 1.2.7
The horns sound, the ravens gather.
Loading...
Searching...
No Matches
TaleWorlds.Library.Quaternion Struct Reference

Public Member Functions

 Quaternion (float x, float y, float z, float w)
 
override int GetHashCode ()
 
override bool Equals (object obj)
 
float Normalize ()
 
float SafeNormalize ()
 
float NormalizeWeighted ()
 
void SetToRotationX (float angle)
 
void SetToRotationY (float angle)
 
void SetToRotationZ (float angle)
 
void Flip ()
 
Quaternion TransformToParent (Quaternion q)
 
Quaternion TransformToLocal (Quaternion q)
 
Quaternion TransformToLocalWithoutNormalize (Quaternion q)
 
float Dotp4 (Quaternion q2)
 
bool InverseDirection (Quaternion q2)
 

Static Public Member Functions

static bool operator== (Quaternion a, Quaternion b)
 
static bool operator!= (Quaternion a, Quaternion b)
 
static Quaternion operator+ (Quaternion a, Quaternion b)
 
static Quaternion operator- (Quaternion a, Quaternion b)
 
static Quaternion operator* (Quaternion a, float b)
 
static Quaternion operator* (float s, Quaternion v)
 
static Quaternion Slerp (Quaternion from, Quaternion to, float t)
 
static Quaternion Lerp (Quaternion from, Quaternion to, float t)
 
static Mat3 Mat3FromQuaternion (Quaternion quat)
 
static Quaternion QuaternionFromEulerAngles (float yaw, float pitch, float roll)
 
static Quaternion QuaternionFromMat3 (Mat3 m)
 
static void AxisAngleFromQuaternion (out Vec3 axis, out float angle, Quaternion quat)
 
static Quaternion QuaternionFromAxisAngle (Vec3 axis, float angle)
 
static Vec3 EulerAngleFromQuaternion (Quaternion quat)
 
static Quaternion FindShortestArcAsQuaternion (Vec3 v0, Vec3 v1)
 

Public Attributes

float W
 
float X
 
float Y
 
float Z
 

Properties

float this[int i] [get, set]
 
bool IsIdentity [get]
 
bool IsUnit [get]
 
static Quaternion Identity [get]
 
Mat3 ToMat3 [get]
 

Constructor & Destructor Documentation

◆ Quaternion()

TaleWorlds.Library.Quaternion.Quaternion ( float  x,
float  y,
float  z,
float  w 
)

Member Function Documentation

◆ GetHashCode()

override int TaleWorlds.Library.Quaternion.GetHashCode ( )

◆ Equals()

override bool TaleWorlds.Library.Quaternion.Equals ( object  obj)

◆ operator==()

static bool TaleWorlds.Library.Quaternion.operator== ( Quaternion  a,
Quaternion  b 
)
static

◆ operator!=()

static bool TaleWorlds.Library.Quaternion.operator!= ( Quaternion  a,
Quaternion  b 
)
static

◆ operator+()

static Quaternion TaleWorlds.Library.Quaternion.operator+ ( Quaternion  a,
Quaternion  b 
)
static

◆ operator-()

static Quaternion TaleWorlds.Library.Quaternion.operator- ( Quaternion  a,
Quaternion  b 
)
static

◆ operator*() [1/2]

static Quaternion TaleWorlds.Library.Quaternion.operator* ( Quaternion  a,
float  b 
)
static

◆ operator*() [2/2]

static Quaternion TaleWorlds.Library.Quaternion.operator* ( float  s,
Quaternion  v 
)
static

◆ Normalize()

float TaleWorlds.Library.Quaternion.Normalize ( )

◆ SafeNormalize()

float TaleWorlds.Library.Quaternion.SafeNormalize ( )

◆ NormalizeWeighted()

float TaleWorlds.Library.Quaternion.NormalizeWeighted ( )

◆ SetToRotationX()

void TaleWorlds.Library.Quaternion.SetToRotationX ( float  angle)

◆ SetToRotationY()

void TaleWorlds.Library.Quaternion.SetToRotationY ( float  angle)

◆ SetToRotationZ()

void TaleWorlds.Library.Quaternion.SetToRotationZ ( float  angle)

◆ Flip()

void TaleWorlds.Library.Quaternion.Flip ( )

◆ TransformToParent()

Quaternion TaleWorlds.Library.Quaternion.TransformToParent ( Quaternion  q)

◆ TransformToLocal()

Quaternion TaleWorlds.Library.Quaternion.TransformToLocal ( Quaternion  q)

◆ TransformToLocalWithoutNormalize()

Quaternion TaleWorlds.Library.Quaternion.TransformToLocalWithoutNormalize ( Quaternion  q)

◆ Slerp()

static Quaternion TaleWorlds.Library.Quaternion.Slerp ( Quaternion  from,
Quaternion  to,
float  t 
)
static

◆ Lerp()

static Quaternion TaleWorlds.Library.Quaternion.Lerp ( Quaternion  from,
Quaternion  to,
float  t 
)
static

◆ Mat3FromQuaternion()

static Mat3 TaleWorlds.Library.Quaternion.Mat3FromQuaternion ( Quaternion  quat)
static

◆ QuaternionFromEulerAngles()

static Quaternion TaleWorlds.Library.Quaternion.QuaternionFromEulerAngles ( float  yaw,
float  pitch,
float  roll 
)
static

◆ QuaternionFromMat3()

static Quaternion TaleWorlds.Library.Quaternion.QuaternionFromMat3 ( Mat3  m)
static

◆ AxisAngleFromQuaternion()

static void TaleWorlds.Library.Quaternion.AxisAngleFromQuaternion ( out Vec3  axis,
out float  angle,
Quaternion  quat 
)
static

◆ QuaternionFromAxisAngle()

static Quaternion TaleWorlds.Library.Quaternion.QuaternionFromAxisAngle ( Vec3  axis,
float  angle 
)
static

◆ EulerAngleFromQuaternion()

static Vec3 TaleWorlds.Library.Quaternion.EulerAngleFromQuaternion ( Quaternion  quat)
static

◆ FindShortestArcAsQuaternion()

static Quaternion TaleWorlds.Library.Quaternion.FindShortestArcAsQuaternion ( Vec3  v0,
Vec3  v1 
)
static

◆ Dotp4()

float TaleWorlds.Library.Quaternion.Dotp4 ( Quaternion  q2)

◆ InverseDirection()

bool TaleWorlds.Library.Quaternion.InverseDirection ( Quaternion  q2)

Member Data Documentation

◆ W

float TaleWorlds.Library.Quaternion.W

◆ X

float TaleWorlds.Library.Quaternion.X

◆ Y

float TaleWorlds.Library.Quaternion.Y

◆ Z

float TaleWorlds.Library.Quaternion.Z

Property Documentation

◆ this[int i]

float TaleWorlds.Library.Quaternion.this[int i]
getset

◆ IsIdentity

bool TaleWorlds.Library.Quaternion.IsIdentity
get

◆ IsUnit

bool TaleWorlds.Library.Quaternion.IsUnit
get

◆ Identity

Quaternion TaleWorlds.Library.Quaternion.Identity
staticget

◆ ToMat3

Mat3 TaleWorlds.Library.Quaternion.ToMat3
get