identity_matrix

NAME
SYNOPSIS
DESCRIPTION
AUTHOR
LICENSE
VERSION
SEE ALSO

NAME

identity_matrix, zero_vec, new_identity_matrix, new_zero_vec, make_identity_matrix, make_zero_vec - identity matrix and zero vector

SYNOPSIS

#include <matvec.h>

float identity_matrix[16];
float zero_vec[4];
float *new_identity_matrix (pool);
float *new_zero_vec (pool);
#define make_identity_matrix(m) memcpy (m, identity_matrix, sizeof(float)*16);
#define make_zero_vec(v) memcpy (v, zero_vec, sizeof (float) * 4);

DESCRIPTION

The identity_matrix variable contains a read-only copy of the identity matrix. The zero_vec variable contains a read-only copy of the zero vector.
Use new_identity_matrix to allocate a new identity matrix variable in pool. Use new_zero_vec to similarly allocate a new zero vector.
Use make_identity_matrix to copy the identity matrix over an existing matrix m. Use make_zero_vec to similarly copy the zero vector over an existing vector v.

AUTHOR

Richard Jones <rich@annexia.org>

LICENSE

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

VERSION

c2lib-1.2.13

SEE ALSO

new_matrix(3), new_vec(3).