Line | |
---|
1 | |
---|
2 | #include <IMGPlane3.h> |
---|
3 | |
---|
4 | namespace IMG { |
---|
5 | |
---|
6 | Plane3::Plane3() |
---|
7 | { |
---|
8 | } |
---|
9 | |
---|
10 | Plane3::~Plane3() |
---|
11 | { |
---|
12 | } |
---|
13 | |
---|
14 | Plane3 & Plane3::operator =(const Plane3 & p) |
---|
15 | { |
---|
16 | normal.x = p.normal.x; |
---|
17 | normal.y = p.normal.y; |
---|
18 | normal.z = p.normal.z; |
---|
19 | d = p.d; |
---|
20 | return *this; |
---|
21 | } |
---|
22 | |
---|
23 | Ogre::Vector3 * Plane3::getNormal() |
---|
24 | { |
---|
25 | Ogre::Vector3 *v = new Ogre::Vector3; |
---|
26 | v->x = normal.x; |
---|
27 | v->y = normal.y; |
---|
28 | v->z = normal.z; |
---|
29 | return v; |
---|
30 | } |
---|
31 | |
---|
32 | void Plane3::setNormal(float x, float y, float z) |
---|
33 | { |
---|
34 | normal.x = x; |
---|
35 | normal.y = y; |
---|
36 | normal.z = z; |
---|
37 | } |
---|
38 | |
---|
39 | void Plane3::setDistance(float dist) |
---|
40 | { |
---|
41 | d = dist; |
---|
42 | } |
---|
43 | |
---|
44 | float Plane3::getDistance() const |
---|
45 | { |
---|
46 | return d; |
---|
47 | } |
---|
48 | |
---|
49 | void Plane3::print() |
---|
50 | { |
---|
51 | Ogre::LogManager::getSingleton().logMessage("Printant pla: (" + Ogre::StringConverter::toString(normal) + Ogre::StringConverter::toString(d) + ")"); |
---|
52 | } |
---|
53 | |
---|
54 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.