Antiprism 0.23

- Main Page
- Classes
- Files

- File List
- File Members

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:

  mat | the transformation matrix.
  v | the 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:

  v | the column vector.
  mat | the 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:

  mat | the matrix.
  n | the 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:

  n | the scalar.
  mat | the matrix.

Returns:
  the result of multiplying the matrix by the scalar.

mat4d operator* | ( | const mat4d & | m1,
|  | const mat4d & | m2
| ) |  | `[inline]`

Multiply two matrices.

Parameters:

  m1 | the first matrix.
  m2 | the 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:

  m1 | the first matrix.
  m2 | the second matrix.

Returns:
  The result of adding the two matrices.