use function

This commit is contained in:
Irlan 2018-09-23 13:20:25 -03:00
parent 254e18ca82
commit cd17583f63

View File

@ -74,17 +74,16 @@ struct b3Plane
}; };
// Transform a plane by a given frame. // Transform a plane by a given frame.
inline b3Plane operator*(const b3Transform& T, const b3Plane& plane) inline b3Plane b3Mul(const b3Transform& T, const b3Plane& plane)
{ {
b3Vec3 normal = b3Mul(T.rotation, plane.normal); b3Vec3 normal = b3Mul(T.rotation, plane.normal);
return b3Plane(normal, plane.offset + b3Dot(normal, T.position)); return b3Plane(normal, plane.offset + b3Dot(normal, T.position));
} }
// Transform a plane by a given frame. // Transform a plane by a given frame.
inline b3Plane b3Mul(const b3Transform& T, const b3Plane& plane) inline b3Plane operator*(const b3Transform& T, const b3Plane& plane)
{ {
b3Vec3 normal = b3Mul(T.rotation, plane.normal); return b3Mul(T, plane);
return b3Plane(normal, plane.offset + b3Dot(normal, T.position));
} }
// Compute the distance between a point and a plane. // Compute the distance between a point and a plane.