new_matrix

NAME
SYNOPSIS
DESCRIPTION
AUTHOR
LICENSE
VERSION
SEE ALSO

NAME

new_matrix, new_vec - allocate a new matrix or vector

SYNOPSIS

#include <matvec.h>

#define new_matrix(pool) ((float *) pmalloc ((pool), sizeof (float) * 16))
#define new_vec(pool) ((float *) pmalloc ((pool), sizeof (float) * 4))

DESCRIPTION

new_matrix allocates a new 4x4 matrix of floats in pool.
new_vec allocates a new 4-vector of floats in pool.
You may use these functions to allocate matrices and vectors dynamically, or you may allocate them statically. The other matrix and vector functions available do not distriguish between dynamically and statically allocated variables.
Note: All matrices are stored in COLUMN-MAJOR ORDER! This is for compatibility with OpenGL, but it is the OPPOSITE of the natural C row-major ordering, so beware.

AUTHOR

Richard Jones <rich@annexia.org>

LICENSE

GNU LGPL (see http://www.gnu.org/)

VERSION

c2lib-1.2.13

SEE ALSO

new_identity_matrix(3), new_zero_vec(3).