Matrix4 struct
A matrix 4.
Contents
Public static functions
- static auto identity() -> Matrix4
- Gets an identity Matrix4.
- static auto orthographic(float left, float right, float bottom, float top, float near, float far) -> Matrix4
- Returns an orthographic matrix.
- static auto perspective(float fov, float aspectRatio, float near, float far) -> Matrix4
- Returns a perspective matrix.
- static auto translation(const Vector3D& translation) -> Matrix4
- Returns a translation matrix, which translates by amounts defined by the translation vector parameter.
- static auto rotation(float angle, const Vector3D& axis) -> Matrix4
- Returns a rotation matrix, which rotates by amount defined by angle parameter about the axis defined by the axis parameter.
- static auto scale(const Vector3D scale) -> Matrix4
- Returns a scaling matrix, that scales by amounts defined by scale parameter.
Constructors, destructors, conversion operators
Public functions
Public variables
Friends
Function documentation
static Matrix4 RML:: Matrix4:: orthographic(float left,
float right,
float bottom,
float top,
float near,
float far)
Returns an orthographic matrix.
| Parameters | |
|---|---|
| left | The left parameter. |
| right | The right parameter. |
| bottom | The bottom parameter. |
| top | The top parameter. |
| near | The near parameter. |
| far | The far parameter. |
| Returns | A Matrix4. |
static Matrix4 RML:: Matrix4:: perspective(float fov,
float aspectRatio,
float near,
float far)
Returns a perspective matrix.
| Parameters | |
|---|---|
| fov | The field of view. |
| aspectRatio | The aspect ratio. |
| near | The near parameter. |
| far | The far parameter. |
| Returns | A Matrix4. |
static Matrix4 RML:: Matrix4:: translation(const Vector3D& translation)
Returns a translation matrix, which translates by amounts defined by the translation vector parameter.
| Parameters | |
|---|---|
| translation | The translation vector. |
| Returns | A Matrix4. |
static Matrix4 RML:: Matrix4:: rotation(float angle,
const Vector3D& axis)
Returns a rotation matrix, which rotates by amount defined by angle parameter about the axis defined by the axis parameter.
| Parameters | |
|---|---|
| angle | The angle(in degree) to be rotated by. |
| axis | The axis to be rotated about. |
| Returns | A Matrix4. |
Matrix4& RML:: Matrix4:: operator*=(const Matrix4& other)
Multiplication assignment operator.
| Parameters | |
|---|---|
| other | The other. |
| Returns | The result of the operation. |
std::ostream& operator<<(std::ostream& stream, const Matrix4& matrix)
Put to operator.
| Parameters | |
|---|---|
| stream | The output stream. |
| matrix | The matrix to be put to stream. |
| Returns | The result of the operation. |