Functions | |
bool | boxLineCollision (const aabb3f &box, const v3f &start, const v3f &dir, v3f *collision_point, v3s16 *collision_normal) |
bool boxLineCollision | ( | const aabb3f & | box, |
const v3f & | start, | ||
const v3f & | dir, | ||
v3f * | collision_point, | ||
v3s16 * | collision_normal | ||
) |
Checks if a line and a box intersects.
[in] | box | box to test collision |
[in] | start | starting point of the line |
[in] | dir | direction and length of the line |
[out] | collision_point | first point of the collision |
[out] | collision_normal | normal vector at the collision, points outwards of the surface. If start is in the box, zero vector. |
References dir().
Referenced by Environment::continueRaycast(), ClientEnvironment::getSelectedActiveObjects(), and ServerEnvironment::getSelectedActiveObjects().