summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension/geometry.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-06-17 14:38:31 +0000
committerTavian Barnes <tavianator@gmail.com>2009-06-17 14:38:31 +0000
commit3a270edef152bc55861f2371681f20ea35da87a3 (patch)
tree291667a45041029b06329e593ca3bfb47b97ebfe /libdimension/dimension/geometry.h
parent6c88e0028c11721499ef93a6df651df3a41150c3 (diff)
downloaddimension-3a270edef152bc55861f2371681f20ea35da87a3.tar.xz
New dmnsn_matrix_inverse() function.
Diffstat (limited to 'libdimension/dimension/geometry.h')
-rw-r--r--libdimension/dimension/geometry.h8
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);