SimpleGL  1.1.0
A framework for platform independent rendering
Static Public Member Functions | List of all members
sgl::Model Class Reference

This class contains static methods to calculate model matrices. More...

#include <transform.hpp>

Static Public Member Functions

static glm::mat4 identity ()
 Returns an identity matrix. More...
 
static glm::mat4 scale (float x, float y, float z)
 Calculates a nonuniform scaling matrix. More...
 
static glm::mat4 scale (glm::vec3 vector)
 Calculates a nonuniform scaling matrix. More...
 
static glm::mat4 scale (glm::mat4 matrix, float x, float y, float z)
 Calculates a nonuniform scaling matrix. More...
 
static glm::mat4 scale (glm::mat4 matrix, glm::vec3 vector)
 Calculates a nonuniform scaling matrix. More...
 
static glm::mat4 translate (float x, float y, float z)
 Calculates a translation matrix. More...
 
static glm::mat4 translate (glm::vec3 vector)
 Calculates a translation matrix. More...
 
static glm::mat4 translate (glm::mat4 matrix, float x, float y, float z)
 Calculates a translation matrix. More...
 
static glm::mat4 translate (glm::mat4 matrix, glm::vec3 vector)
 Calculates a translation matrix. More...
 
static glm::mat4 rotate (float angle, float x, float y, float z)
 Calculates a rotation of angle degrees around the vector (x y z). More...
 
static glm::mat4 rotate (float angle, glm::vec3 vector)
 Calculates a rotation of angle degrees around the vector (x y z). More...
 
static glm::mat4 rotate (glm::mat4 matrix, float angle, float x, float y, float z)
 Calculates a rotation of angle degrees around the vector (x y z). More...
 
static glm::mat4 rotate (glm::mat4 matrix, float angle, glm::vec3 vector)
 Calculates a rotation of angle degrees around the vector (x y z). More...
 

Detailed Description

This class contains static methods to calculate model matrices.

Definition at line 66 of file transform.hpp.

Member Function Documentation

glm::mat4 sgl::Model::identity ( )
static

Returns an identity matrix.

Returns
The identity matrix.

Definition at line 20 of file transform.cpp.

glm::mat4 sgl::Model::rotate ( float  angle,
float  x,
float  y,
float  z 
)
static

Calculates a rotation of angle degrees around the vector (x y z).

Parameters
angleSpecifies the angle of rotation, in degrees.
xSpecifies the X-coordinates of a vector.
ySpecifies the Y-coordinates of a vector.
zSpecifies the Z-coordinates of a vector.
Returns
The calculated rotation matrix.

Definition at line 56 of file transform.cpp.

glm::mat4 sgl::Model::rotate ( float  angle,
glm::vec3  vector 
)
static

Calculates a rotation of angle degrees around the vector (x y z).

Parameters
angleSpecifies the angle of rotation, in degrees.
vectorSpecify the x, y, and z coordinates of a vector.
Returns
The calculated rotation matrix.

Definition at line 60 of file transform.cpp.

glm::mat4 sgl::Model::rotate ( glm::mat4  matrix,
float  angle,
float  x,
float  y,
float  z 
)
static

Calculates a rotation of angle degrees around the vector (x y z).

Parameters
matrixThis matrix is multiplied by the rotation matrix.
angleSpecifies the angle of rotation, in degrees.
xSpecifies the X-coordinates of a vector.
ySpecifies the Y-coordinates of a vector.
zSpecifies the Z-coordinates of a vector.
Returns
The calculated rotation matrix.

Definition at line 64 of file transform.cpp.

glm::mat4 sgl::Model::rotate ( glm::mat4  matrix,
float  angle,
glm::vec3  vector 
)
static

Calculates a rotation of angle degrees around the vector (x y z).

Parameters
matrixThis matrix is multiplied by the rotation matrix.
angleSpecifies the angle of rotation, in degrees.
vectorSpecify the x, y, and z coordinates of a vector.
Returns
The calculated rotation matrix.

Definition at line 68 of file transform.cpp.

glm::mat4 sgl::Model::scale ( float  x,
float  y,
float  z 
)
static

Calculates a nonuniform scaling matrix.

Parameters
xSpecifies the scale factor along the x axis.
ySpecifies the scale factor along the y axis.
zSpecifies the scale factor along the z axes.
Returns
The calculated scaling matrix.

Definition at line 24 of file transform.cpp.

glm::mat4 sgl::Model::scale ( glm::vec3  vector)
static

Calculates a nonuniform scaling matrix.

Parameters
vectorSpecifies the scale factors along the x, y, and z axes.
Returns
The calculated scaling matrix.

Definition at line 28 of file transform.cpp.

glm::mat4 sgl::Model::scale ( glm::mat4  matrix,
float  x,
float  y,
float  z 
)
static

Calculates a nonuniform scaling matrix.

Parameters
matrixThis matrix is multiplied by the scale matrix.
xSpecifies the scale factor along the x axis.
ySpecifies the scale factor along the y axis.
zSpecifies the scale factor along the z axes.
Returns
The calculated scaling matrix.

Definition at line 32 of file transform.cpp.

glm::mat4 sgl::Model::scale ( glm::mat4  matrix,
glm::vec3  vector 
)
static

Calculates a nonuniform scaling matrix.

Parameters
matrixThis matrix is multiplied by the scale matrix.
vectorSpecifies the scale factors along the x, y, and z axes.
Returns
The calculated scaling matrix.

Definition at line 36 of file transform.cpp.

glm::mat4 sgl::Model::translate ( float  x,
float  y,
float  z 
)
static

Calculates a translation matrix.

Parameters
xSpecifies the X-coordinates of a translation vector.
ySpecifies the Y-coordinates of a translation vector.
zSpecifies the Z-coordinates of a translation vector.
Returns
The calculated translation matrix.

Definition at line 40 of file transform.cpp.

glm::mat4 sgl::Model::translate ( glm::vec3  vector)
static

Calculates a translation matrix.

Parameters
vectorSpecifies the translation vector.
Returns
The calculated translation matrix.

Definition at line 44 of file transform.cpp.

glm::mat4 sgl::Model::translate ( glm::mat4  matrix,
float  x,
float  y,
float  z 
)
static

Calculates a translation matrix.

Parameters
matrixThis matrix is multiplied by the translation matrix.
xSpecifies the X-coordinates of a translation vector.
ySpecifies the Y-coordinates of a translation vector.
zSpecifies the Z-coordinates of a translation vector.
Returns
The calculated translation matrix.

Definition at line 48 of file transform.cpp.

glm::mat4 sgl::Model::translate ( glm::mat4  matrix,
glm::vec3  vector 
)
static

Calculates a translation matrix.

Parameters
matrixThis matrix is multiplied by the translation matrix.
vectorSpecifies the translation vector.
Returns
The calculated translation matrix.

Definition at line 52 of file transform.cpp.


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