Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
blob: 933d78361f66bcf782b2e3d62814558860ad7fa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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