Maya 1.0
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
Matrix4Float Class Reference

Matrix representation for the GPU. More...

#include <evectorfloat.h>

Public Member Functions

 Matrix4Float ()
 Create a matrix.
 
 Matrix4Float (float)
 Create a diagonal matrix.
 
float & operator() (int, int)
 Accessor.
 

Static Public Member Functions

static Matrix4Float LookAt (const Vector &eye, const Vector &at, const Vector &up)
 Create a look-at matrix from (eye, at, up) vectors. More...
 
static Matrix4Float Perspective (float fovy, float zNear, float zFar, float width, float height)
 Create a perspective projection matrix. More...
 
static Matrix4Float Orthographic (float left, float right, float bottom, float top, float zNear, float zFar)
 Create an orthographic projection matrix. More...
 

Public Attributes

float r [16] = { 1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,1.0,0.0,0.0,1.0 }
 Coefficients, set to identity matrix.
 

Friends

Matrix4Float operator* (const Matrix4Float &, const Matrix4Float &)
 Matrix multiplication.
 

Detailed Description

Matrix representation for the GPU.

Member Function Documentation

◆ LookAt()

Matrix4Float Matrix4Float::LookAt ( const Vector eye,
const Vector at,
const Vector up 
)
static

Create a look-at matrix from (eye, at, up) vectors.

Parameters
eyecamera eye
atcamera look-at point
upcamera up vector

◆ Orthographic()

Matrix4Float Matrix4Float::Orthographic ( float  l,
float  r,
float  b,
float  t,
float  n,
float  f 
)
static

Create an orthographic projection matrix.

Parameters
lcoordinate of the left vertical clipping plane
rcoordinate of the right vertical clipping plane
bcoordinate of the bottom horizontal clipping plane
tcoordinate of the top horizontal clipping plane
n,fcamera near and far plane

References r.

◆ Perspective()

Matrix4Float Matrix4Float::Perspective ( float  fovy,
float  zNear,
float  zFar,
float  width,
float  height 
)
static

Create a perspective projection matrix.

Parameters
fovyCamera vertical fov (in degrees).
zNear,zFarPlanes.
width,heightCamera dimension.

References Math::DegreeToRadian().