Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/math
diff options
context:
space:
mode:
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;