Strong Coupling Core  0.1.0
Library for solving a system of strong coupled physical subsystems.
 All Classes Namespaces Files Functions Variables Macros Pages
Public Member Functions | List of all members
sc::Quat Class Reference

Quaternion class. More...

#include <Quat.h>

Public Member Functions

 Quat ()
 
 Quat (double x, double y, double z, double w)
 
virtual ~Quat ()
 
double & operator[] (int i)
 
double operator[] (int i) const
 
Quat multiply (const Quat &p) const
 Multiply with other quaternion. More...
 
Vec3 multiplyVector (const Vec3 &v) const
 Transform vector. More...
 
Vec3 getAxis () const
 
void normalize ()
 Normalize this vector. Will change state. More...
 
void set (double x, double y, double z, double w)
 Set all values. More...
 
void copy (const Quat &q)
 Copy state from other quaternion. More...
 
double x () const
 
double y () const
 
double z () const
 
double w () const
 

Detailed Description

Quaternion class.

Constructor & Destructor Documentation

Quat::Quat ( )
Quat::Quat ( double  x,
double  y,
double  z,
double  w 
)
Quat::~Quat ( )
virtual

Member Function Documentation

void Quat::copy ( const Quat q)

Copy state from other quaternion.

Vec3 Quat::getAxis ( ) const
Quat Quat::multiply ( const Quat p) const

Multiply with other quaternion.

Vec3 Quat::multiplyVector ( const Vec3 v) const

Transform vector.

void Quat::normalize ( )

Normalize this vector. Will change state.

double& sc::Quat::operator[] ( int  i)
inline
Returns
a reference to the i:th element of the quaternion in the order x,y,z,w
double sc::Quat::operator[] ( int  i) const
inline
Returns
the value of the i:th element of the quaternion in the order x,y,z,w
void Quat::set ( double  x,
double  y,
double  z,
double  w 
)

Set all values.

double Quat::w ( ) const
double Quat::x ( ) const
double Quat::y ( ) const
double Quat::z ( ) const

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