Nebula
Loading...
Searching...
No Matches
Math::quat Class Reference

#include <quat.h>

Detailed Description

A quaternion is usually used to represent an orientation in 3D space.

Inherited by Game::Orientation.

Public Member Functions

 quat ()
 default constructor
 
 quat (quat const &)=default
 default copy constructor
 
 quat (scalar x, scalar y, scalar z, scalar w)
 construct from components
 
 quat (const vec4 &rhs)
 construct from vec4
 
 quat (const __m128 &rhs)
 construct from __m128
 
void operator= (const __m128 &rhs)
 assign __m128
 
bool operator== (const quat &rhs) const
 equality operator
 
bool operator!= (const quat &rhs) const
 inequality operator
 
void load (const scalar *ptr)
 load content from 16-byte-aligned memory
 
void loadu (const scalar *ptr)
 load content from unaligned memory
 
void store (scalar *ptr) const
 write content to 16-byte-aligned memory through the write cache
 
void storeu (scalar *ptr) const
 write content to unaligned memory through the write cache
 
void stream (scalar *ptr) const
 stream content to 16-byte-aligned memory circumventing the write-cache
 
vec3 x_axis () const
 get the x axis of the cartesian coordinate system that this quaternion represents
 
vec3 y_axis () const
 get the y axis of the cartesian coordinate system that this quaternion represents
 
vec3 z_axis () const
 get the z axis of the cartesian coordinate system that this quaternion represents
 
void set (scalar x, scalar y, scalar z, scalar w)
 set content
 
void set (vec4 const &f4)
 set from vec4
 

Public Attributes

union { 
 
   struct { 
 
      float   x 
 
      float   y 
 
      float   z 
 
      float   w 
 
   }  
 
   __m128   vec 
 
};  
 

Friends

struct mat4
 

Constructor & Destructor Documentation

◆ quat() [1/5]

__forceinline Math::quat::quat ( )

default constructor

◆ quat() [2/5]

Math::quat::quat ( quat const & )
default

default copy constructor

◆ quat() [3/5]

__forceinline Math::quat::quat ( scalar x,
scalar y,
scalar z,
scalar w )

construct from components

◆ quat() [4/5]

__forceinline Math::quat::quat ( const vec4 & rhs)

construct from vec4

◆ quat() [5/5]

__forceinline Math::quat::quat ( const __m128 & rhs)

construct from __m128

Member Function Documentation

◆ load()

__forceinline void Math::quat::load ( const scalar * ptr)

load content from 16-byte-aligned memory

Load 4 floats from 16-byte-aligned memory.

◆ loadu()

__forceinline void Math::quat::loadu ( const scalar * ptr)

load content from unaligned memory

Load 4 floats from unaligned memory.

◆ operator!=()

__forceinline bool Math::quat::operator!= ( const quat & rhs) const

inequality operator

◆ operator=()

__forceinline void Math::quat::operator= ( const __m128 & rhs)

assign __m128

◆ operator==()

__forceinline bool Math::quat::operator== ( const quat & rhs) const

equality operator

◆ set() [1/2]

__forceinline void Math::quat::set ( scalar x,
scalar y,
scalar z,
scalar w )

set content

◆ set() [2/2]

__forceinline void Math::quat::set ( vec4 const & f4)

set from vec4

◆ store()

__forceinline void Math::quat::store ( scalar * ptr) const

write content to 16-byte-aligned memory through the write cache

Store to 16-byte-aligned float pointer.

◆ storeu()

__forceinline void Math::quat::storeu ( scalar * ptr) const

write content to unaligned memory through the write cache

Store to non-aligned float pointer.

◆ stream()

__forceinline void Math::quat::stream ( scalar * ptr) const

stream content to 16-byte-aligned memory circumventing the write-cache

◆ x_axis()

__forceinline vec3 Math::quat::x_axis ( ) const

get the x axis of the cartesian coordinate system that this quaternion represents

◆ y_axis()

__forceinline vec3 Math::quat::y_axis ( ) const

get the y axis of the cartesian coordinate system that this quaternion represents

◆ z_axis()

__forceinline vec3 Math::quat::z_axis ( ) const

get the z axis of the cartesian coordinate system that this quaternion represents

Friends And Related Symbol Documentation

◆ mat4

friend struct mat4
friend

Member Data Documentation

◆ [union]

union { ... } Math::quat

◆ vec

__m128 Math::quat::vec

◆ w

float Math::quat::w

◆ x

float Math::quat::x

◆ y

float Math::quat::y

◆ z

float Math::quat::z

The documentation for this class was generated from the following file: