| 49 | } |
| 50 | |
| 51 | void Plane::initPlane(const Vec3& p1, const Vec3& p2, const Vec3& p3) |
| 52 | { |
| 53 | Vec3 p21 = p2 - p1; |
| 54 | Vec3 p32 = p3 - p2; |
| 55 | Vec3::cross(p21, p32, &_normal); |
| 56 | _normal.normalize(); |
| 57 | _dist = _normal.dot(p1); |
| 58 | } |
| 59 | |
| 60 | void Plane::initPlane(const Vec3& normal, float dist) |
| 61 | { |
no test coverage detected