src/types/boundingbox.cpp

changeset 196
6bcb284679d4
parent 189
815fbaae9cb2
child 264
76a025db4948
equal deleted inserted replaced
195:6e79c1cb83e6 196:6bcb284679d4
23 * @param box 23 * @param box
24 * @param vertex 24 * @param vertex
25 */ 25 */
26 void addPointToBox(BoundingBox &box, const glm::vec3 &vertex) 26 void addPointToBox(BoundingBox &box, const glm::vec3 &vertex)
27 { 27 {
28 box.minimum.x = math::min(vertex.x, box.minimum.x); 28 box.minimum.x = std::min(vertex.x, box.minimum.x);
29 box.minimum.y = math::min(vertex.y, box.minimum.y); 29 box.minimum.y = std::min(vertex.y, box.minimum.y);
30 box.minimum.z = math::min(vertex.z, box.minimum.z); 30 box.minimum.z = std::min(vertex.z, box.minimum.z);
31 box.maximum.x = math::max(vertex.x, box.maximum.x); 31 box.maximum.x = std::max(vertex.x, box.maximum.x);
32 box.maximum.y = math::max(vertex.y, box.maximum.y); 32 box.maximum.y = std::max(vertex.y, box.maximum.y);
33 box.maximum.z = math::max(vertex.z, box.maximum.z); 33 box.maximum.z = std::max(vertex.z, box.maximum.z);
34 } 34 }
35 35
36 /* 36 /*
37 * Returns the length of the bounding box on the longest measure. 37 * Returns the length of the bounding box on the longest measure.
38 */ 38 */

mercurial