Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/math
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2010-11-08 15:24:41 +0000
committerStijn Buys <ingar@osirion.org>2010-11-08 15:24:41 +0000
commit106d0cb0cf884dd7a2920564852c001e13af1568 (patch)
tree74e813e9f57a1c43e4946850e860bd1a94ae5346 /src/math
parentb7dc0938eb7d59f928bbcf2a3a4877a6f60940e5 (diff)
fixes crash on jumpgate usage, streamlined keepalive/upkeep frame cycle
Diffstat (limited to 'src/math')
-rw-r--r--src/math/boundingbox3f.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/math/boundingbox3f.h b/src/math/boundingbox3f.h
index 54b846b..972292a 100644
--- a/src/math/boundingbox3f.h
+++ b/src/math/boundingbox3f.h
@@ -104,6 +104,17 @@ public:
expand(other.boundingbox_min, other.boundingbox_max);
}
+ /**
+ * @brief expand the bounding box by a range
+ */
+ inline void expand(const float range) {
+ for (size_t i =0; i < 3; i++) {
+ boundingbox_min[i] -= range;
+ boundingbox_max[i] += range;
+ }
+
+ }
+
private:
Vector3f boundingbox_min;
Vector3f boundingbox_max;