Antiprism 0.23
Classes | Functions

base/mat3d.h File Reference

Matrix transformations for 3D geometry. More...

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

Classes

class  mat3d
 Matrix for transformations in 3D. More...

Functions

vec3d operator* (const mat3d &mat, const vec3d &v)
 Transform a column vector.
vec3d operator* (const vec3d &v, const mat3d &mat)
 Transform a row vector.
mat3d operator* (const mat3d &m1, const mat3d &m2)
 Multiply two matrices.
void transform (vector< vec3d > &vecs, const mat3d &mat)
 Transform a set of vectors.

Detailed Description

Matrix transformations for 3D geometry.


Function Documentation

vec3d operator* ( const mat3d mat,
const vec3d v 
)

Transform a column vector.

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

Transform a row vector.

Parameters:
vthe column vector.
matthe transformation matrix.
Returns:
The transformed vector (right-multiplied by the matrix).
mat3d operator* ( const mat3d m1,
const mat3d m2 
) [inline]

Multiply two matrices.

Parameters:
m1the first matrix.
m2the second matrix.
Returns:
The result of the first matrix multiplying the second.
void transform ( vector< vec3d > &  vecs,
const mat3d mat 
) [inline]

Transform a set of vectors.

Parameters:
vecsthe (column) vectors to transform.
matthe matrix transformation.