Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/boundingbox3f.cc')
-rw-r--r--src/math/boundingbox3f.cc53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/math/boundingbox3f.cc b/src/math/boundingbox3f.cc
new file mode 100644
index 0000000..933d783
--- /dev/null
+++ b/src/math/boundingbox3f.cc
@@ -0,0 +1,53 @@
+/*
+ math/boundingbox3f.cc
+ This file is part of the Osirion project and is distributed under
+ the terms of the GNU General Public License version 2
+*/
+
+#include "math/boundingbox3f.h"
+
+namespace math {
+
+BoundingBox3f::BoundingBox3f() :
+ boundingbox_min(),
+ boundingbox_max()
+{
+}
+
+BoundingBox3f::BoundingBox3f(const Vector3f &center) :
+ boundingbox_min(center),
+ boundingbox_max(center)
+{
+}
+
+void BoundingBox3f::assign(const BoundingBox3f & other)
+{
+ boundingbox_min.assign(other.boundingbox_min);
+ boundingbox_max.assign(other.boundingbox_max);
+}
+
+void BoundingBox3f::assign(const Vector3f &center)
+{
+ boundingbox_min.assign(center);
+ boundingbox_max.assign(center);
+}
+void BoundingBox3f::assign(const Vector3f & min, const Vector3f & max)
+{
+ boundingbox_min.assign(min);
+ boundingbox_max.assign(max);
+}
+
+void BoundingBox3f::assign(const float min, const float max)
+{
+ boundingbox_min.assign(min, min, min);
+ boundingbox_max.assign(max, max, max);
+}
+
+void BoundingBox3f::clear()
+{
+ boundingbox_min.clear();
+ boundingbox_max.clear();
+}
+
+
+} // namespace math