24 return *this; |
24 return *this; |
25 } |
25 } |
26 |
26 |
27 void BoundingBox::consider(const Point3D& vertex) |
27 void BoundingBox::consider(const Point3D& vertex) |
28 { |
28 { |
29 this->minimum.x = std::min(vertex.x, this->minimum.x); |
29 this->minimum.x = math::min(vertex.x, this->minimum.x); |
30 this->minimum.y = std::min(vertex.y, this->minimum.y); |
30 this->minimum.y = math::min(vertex.y, this->minimum.y); |
31 this->minimum.z = std::min(vertex.z, this->minimum.z); |
31 this->minimum.z = math::min(vertex.z, this->minimum.z); |
32 this->maximum.x = std::max(vertex.x, this->maximum.x); |
32 this->maximum.x = math::max(vertex.x, this->maximum.x); |
33 this->maximum.y = std::max(vertex.y, this->maximum.y); |
33 this->maximum.y = math::max(vertex.y, this->maximum.y); |
34 this->maximum.z = std::max(vertex.z, this->maximum.z); |
34 this->maximum.z = math::max(vertex.z, this->maximum.z); |
35 } |
35 } |
36 |
36 |
37 /* |
37 /* |
38 * Returns the length of the bounding box on the longest measure. |
38 * Returns the length of the bounding box on the longest measure. |
39 */ |
39 */ |