summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension/geometry.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-06-06 00:20:43 -0600
committerTavian Barnes <tavianator@gmail.com>2010-06-06 00:20:43 -0600
commit450eb86adf1d0634dd4c97bfc1bae405ca51f491 (patch)
treed4b778588318f33350983a263ea3a7cde7b6c665 /libdimension/dimension/geometry.h
parent8452b0227e3b7bf6fc012309a49cd1a14de6ae3d (diff)
downloaddimension-450eb86adf1d0634dd4c97bfc1bae405ca51f491.tar.xz
New bounding box special constructors.
Diffstat (limited to 'libdimension/dimension/geometry.h')
-rw-r--r--libdimension/dimension/geometry.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/libdimension/dimension/geometry.h b/libdimension/dimension/geometry.h
index 8e2e47c..effac7c 100644
--- a/libdimension/dimension/geometry.h
+++ b/libdimension/dimension/geometry.h
@@ -101,6 +101,26 @@ dmnsn_new_line(dmnsn_vector x0, dmnsn_vector n)
return l;
}
+DMNSN_INLINE dmnsn_bounding_box
+dmnsn_zero_bounding_box()
+{
+ dmnsn_bounding_box box = {
+ { INFINITY, INFINITY, INFINITY },
+ { -INFINITY, -INFINITY, -INFINITY }
+ };
+ return box;
+}
+
+DMNSN_INLINE dmnsn_bounding_box
+dmnsn_infinite_bounding_box()
+{
+ dmnsn_bounding_box box = {
+ { -INFINITY, -INFINITY, -INFINITY },
+ { INFINITY, INFINITY, INFINITY }
+ };
+ return box;
+}
+
/* Vector element access */
enum {