From 106d0cb0cf884dd7a2920564852c001e13af1568 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 8 Nov 2010 15:24:41 +0000 Subject: fixes crash on jumpgate usage, streamlined keepalive/upkeep frame cycle --- src/math/boundingbox3f.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/math') 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; -- cgit v1.2.3