1 #ifndef TRIANGLEVECTOR3_2_HPP
2 #define TRIANGLEVECTOR3_2_HPP
4 #include "blub/math/vector3.hpp"
35 return other.positions[0] == positions[0]
36 && other.positions[1] == positions[1]
37 && other.positions[2] == positions[2];
42 return positions[nearestId(to)];
45 uint16 nearestId(
vector3 to)
const
48 real nearest(positions[0].squaredDistance(to));
49 for (uint16 index = 1; index < 3; ++index)
51 if (positions[index].squaredDistance(to) < nearest)
59 return ((positions[1]-positions[0]).normalisedCopy()).
crossProduct((positions[2]-positions[0]).normalisedCopy());
64 plane getPlane()
const;
68 return (positions[0] + positions[1] + positions[2]) / 3.0;
77 #endif // TRIANGLEVECTOR3_HPP
Definition: triangleVector3.hpp:10
Definition: vector3.hpp:26
vector3 crossProduct(const vector3 &rkVector) const
Definition: vector3.hpp:478
Definition: axisAlignedBox.hpp:20
Definition: deadlineTimer.hpp:10