#include <glsl_math.h>
Inheritance diagram for gslib::glsl_math::quat:


Public Types | |
| typedef tuple_mixin< quat, 4 > | TupleMixin |
Public Member Functions | |
| quat () | |
| quat (value_type v) | |
| quat (value_type inX, value_type inY, value_type inZ, value_type inW) | |
| quat (const vec3 &axis, value_type theta) | |
| vec4 & | xyzw () |
| swizzle ( cast to vec4 ) | |
| const vec4 & | xyzw () const |
| swizzle ( cast to vec4 ) | |
| vec3 & | xyz () |
| swizzle | |
| const vec3 & | xyz () const |
| swizzle | |
| vec2 & | xy () |
| swizzle | |
| const vec2 & | xy () const |
| swizzle | |
| quat & | operator *= (value_type v) |
| quat | operator * (value_type v) const |
| quat & | operator/= (value_type v) |
| quat | operator/ (value_type v) const |
| quat | operator * (const quat &q) const |
| quat & | operator *= (const quat &q) |
Static Public Member Functions | |
| quat | identity () |
|
|
Definition at line 774 of file glsl_math.h. |
|
|
Definition at line 734 of file glsl_math.h. Referenced by identity(), and operator *().
00734 {}
|
|
|
Definition at line 735 of file glsl_math.h.
|
|
||||||||||||||||||||
|
Definition at line 736 of file glsl_math.h.
|
|
||||||||||||
|
Definition at line 737 of file glsl_math.h. References xyz().
00737 {
00738 value_type halfCos = cosf( theta * 0.5f );
00739 value_type halfSin = sinf( theta * 0.5f );
00740 xyz() = halfCos * axis;
00741 w = halfSin;
00742 }
|
Here is the call graph for this function:

|
|
Definition at line 800 of file glsl_math.h. References quat().
00800 {
00801 return quat( 0, 0, 0, 1 );
00802 }
|
Here is the call graph for this function:

|
|
Definition at line 787 of file glsl_math.h. References quat(), w, x, y, and z.
00787 {
00788 return quat(
00789 w * q.x + x * q.w + y * q.z - z * q.y,
00790 w * q.y + y * q.w + z * q.x - x * q.z,
00791 w * q.z + z * q.w + x * q.y - y * q.x,
00792 w * q.w - x * q.x - y * q.y - z * q.z
00793 );
00794 }
|
Here is the call graph for this function:

|
|
Reimplemented from gslib::glsl_math::tuple_mixin< quat, 4 >. Definition at line 778 of file glsl_math.h.
00778 {
00779 return TupleMixin::operator * ( v );
00780 }
|
|
|
Definition at line 795 of file glsl_math.h.
00795 {
00796 *this = *this * q;
00797 return *this;
00798 }
|
|
|
Reimplemented from gslib::glsl_math::tuple_mixin< quat, 4 >. Definition at line 775 of file glsl_math.h.
00775 {
00776 return TupleMixin::operator *= ( v );
00777 }
|
|
|
Reimplemented from gslib::glsl_math::tuple_mixin< quat, 4 >. Definition at line 784 of file glsl_math.h.
00784 {
00785 return TupleMixin::operator / ( v );
00786 }
|
|
|
Reimplemented from gslib::glsl_math::tuple_mixin< quat, 4 >. Definition at line 781 of file glsl_math.h.
00781 {
00782 return TupleMixin::operator /= ( v );
00783 }
|
|
|
swizzle
Definition at line 770 of file glsl_math.h.
00770 {
00771 return *reinterpret_cast< const vec2* >( array );
00772 }
|
|
|
swizzle
Definition at line 765 of file glsl_math.h.
00765 {
00766 return *reinterpret_cast< vec2* >( array );
00767 }
|
|
|
swizzle
Definition at line 760 of file glsl_math.h.
00760 {
00761 return *reinterpret_cast< const vec3* >( array );
00762 }
|
|
|
swizzle
Definition at line 755 of file glsl_math.h. Referenced by quat().
00755 {
00756 return *reinterpret_cast< vec3* >( array );
00757 }
|
|
|
swizzle ( cast to vec4 )
Definition at line 750 of file glsl_math.h.
00750 {
00751 return *reinterpret_cast< const vec4* >( array );
00752 }
|
|
|
swizzle ( cast to vec4 )
Definition at line 745 of file glsl_math.h.
00745 {
00746 return *reinterpret_cast< vec4* >( array );
00747 }
|
|
|
Definition at line 732 of file glsl_math.h. |
|
|
Definition at line 730 of file glsl_math.h. Referenced by operator *(). |
|
|
Definition at line 730 of file glsl_math.h. Referenced by operator *(). |
|
|
Definition at line 730 of file glsl_math.h. Referenced by operator *(). |
|
|
Definition at line 730 of file glsl_math.h. Referenced by operator *(). |
1.3.6