#include <gul_types.h>
Public Methods | |
| vec4< T > & | operator[] (size_t i) |
Static Public Methods | |
| mat4x4< T > | identity () |
| creates 4x4 unit matrix. More... | |
| mat4x4< T > | rotate_x (T theta) |
| create 4x4 rotation matrix about x axis. More... | |
| mat4x4< T > | rotate_y (T theta) |
| create 4x4 rotation matrix about y axis. More... | |
| mat4x4< T > | rotate_z (T theta) |
| create 4x4 rotation matrix about z axis. More... | |
Public Attributes | |
| vec4< T > | m [4] |
|
|||||||||
|
creates 4x4 unit matrix.
Definition at line 704 of file gul_types.h. Referenced by rotate_x(), rotate_y(), and rotate_z().
00705 {
00706 mat4x4 a = { {{{(T)1,(T)0,(T)0,(T)0}},
00707 {{(T)0,(T)1,(T)0,(T)0}},
00708 {{(T)0,(T)0,(T)1,(T)0}},
00709 {{(T)0,(T)0,(T)0,(T)1}}} };
00710 return a;
00711 }
|
|
||||||||||
|
Definition at line 700 of file gul_types.h.
00700 { return m[i]; }
|
|
||||||||||
|
create 4x4 rotation matrix about x axis. the angle theta (in radians) describes the clockwise rotation, if you look along the axis towards the origin Definition at line 717 of file gul_types.h. References identity().
00718 {
00719 mat4x4 a = identity();
00720 T ct = rtr<T>::cos(theta);
00721 T st = rtr<T>::sin(theta);
00722 a[1][1] = a[2][2] = ct;
00723 a[1][2] = -st;
00724 a[2][1] = st;
00725 return a;
00726 }
|
|
||||||||||
|
create 4x4 rotation matrix about y axis. the angle theta (in radians) describes the clockwise rotation, if you look along the axis towards the origin Definition at line 732 of file gul_types.h. References identity().
00733 {
00734 mat4x4 a = identity();
00735 T ct = rtr<T>::cos(theta);
00736 T st = rtr<T>::sin(theta);
00737 a[0][0] = a[2][2] = ct;
00738 a[0][2] = st;
00739 a[2][0] = -st;
00740 return a;
00741 }
|
|
||||||||||
|
create 4x4 rotation matrix about z axis. the angle theta (in radians) describes the clockwise rotation, if you look along the axis towards the origin Definition at line 747 of file gul_types.h. References identity().
00748 {
00749 mat4x4 a = identity();
00750 T ct = rtr<T>::cos(theta);
00751 T st = rtr<T>::sin(theta);
00752 a[0][0] = a[1][1] = ct;
00753 a[0][1] = -st;
00754 a[1][0] = st;
00755 return a;
00756 }
|
|
|||||
|
Definition at line 699 of file gul_types.h. |
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001