diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-06-17 14:38:31 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-06-17 14:38:31 +0000 |
commit | 3a270edef152bc55861f2371681f20ea35da87a3 (patch) | |
tree | 291667a45041029b06329e593ca3bfb47b97ebfe /libdimension/dimension/geometry.h | |
parent | 6c88e0028c11721499ef93a6df651df3a41150c3 (diff) | |
download | dimension-3a270edef152bc55861f2371681f20ea35da87a3.tar.xz |
New dmnsn_matrix_inverse() function.
Diffstat (limited to 'libdimension/dimension/geometry.h')
-rw-r--r-- | libdimension/dimension/geometry.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libdimension/dimension/geometry.h b/libdimension/dimension/geometry.h index 4effea8..95692c6 100644 --- a/libdimension/dimension/geometry.h +++ b/libdimension/dimension/geometry.h @@ -29,12 +29,7 @@ typedef struct { double x, y, z; } dmnsn_vector; -typedef struct { - double n00, n01, n02, n03, - n10, n11, n12, n13, - n20, n21, n22, n23, - n30, n31, n32, n33; -} dmnsn_matrix; +typedef struct { double n[4][4]; } dmnsn_matrix; /* A line, or ray. */ typedef struct { @@ -70,6 +65,7 @@ dmnsn_vector dmnsn_vector_cross(dmnsn_vector lhs, dmnsn_vector rhs); double dmnsn_vector_norm(dmnsn_vector n); dmnsn_vector dmnsn_vector_normalize(dmnsn_vector n); +dmnsn_matrix dmnsn_matrix_inverse(dmnsn_matrix A); dmnsn_matrix dmnsn_matrix_mul(dmnsn_matrix lhs, dmnsn_matrix rhs); dmnsn_vector dmnsn_matrix_vector_mul(dmnsn_matrix lhs, dmnsn_vector rhs); dmnsn_line dmnsn_matrix_line_mul(dmnsn_matrix lhs, dmnsn_line rhs); |