Antiprism 0.23
Classes | Functions

base/mat4d.h File Reference

Matrix transformations for 4D geometry. More...

#include <math.h>
#include "math_utils.h"
#include "vec4d.h"
Include dependency graph for mat4d.h:
This graph shows which files directly or indirectly include this file:

Classes

class  mat4d
 Matrix for transformations in 4D. More...

Functions

vec4d operator* (const mat4d &mat, const vec4d &v)
 Transform a column vector.
vec4d operator* (const vec4d &v, const mat4d &mat)
 Transform a row vector.
mat4d operator* (const mat4d &m1, const mat4d &m2)
 Multiply two matrices.
mat4d operator* (double n, const mat4d &mat)
 Multiply a matrix by a scalar.
mat4d operator* (const mat4d &mat, double n)
 Multiply a matrix by a scalar.
mat4d operator+ (const mat4d &m1, const mat4d &m2)
 Add two matrices.

Detailed Description

Matrix transformations for 4D geometry.


Function Documentation

vec4d operator* ( const mat4d mat,
const vec4d v 
) [inline]

Transform a column vector.

Parameters:
matthe transformation matrix.
vthe column vector.
Returns:
The transformed vector (left-multiplied by the matrix).
vec4d operator* ( const vec4d v,
const mat4d mat 
) [inline]

Transform a row vector.

Parameters:
vthe column vector.
matthe transformation matrix.
Returns:
The transformed vector (right-multiplied by the matrix).
mat4d operator* ( const mat4d mat,
double  n 
) [inline]

Multiply a matrix by a scalar.

Parameters:
matthe matrix.
nthe scalar.
Returns:
the result of multiplying the matrix by the scalar.
mat4d operator* ( double  n,
const mat4d mat 
) [inline]

Multiply a matrix by a scalar.

Parameters:
nthe scalar.
matthe matrix.
Returns:
the result of multiplying the matrix by the scalar.
mat4d operator* ( const mat4d m1,
const mat4d m2 
) [inline]

Multiply two matrices.

Parameters:
m1the first matrix.
m2the second matrix.
Returns:
The result of the first matrix multiplying the second.
mat4d operator+ ( const mat4d m1,
const mat4d m2 
) [inline]

Add two matrices.

Parameters:
m1the first matrix.
m2the second matrix.
Returns:
The result of adding the two matrices.