Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
raycast.cpp File Reference
#include "raycast.h"
#include "irr_v3d.h"
#include "irr_aabb3d.h"
#include <quaternion.h>
#include "constants.h"
+ Include dependency graph for raycast.cpp:

Functions

bool boxLineCollision (const aabb3f &box, const v3f start, const v3f dir, v3f *collision_point, v3f *collision_normal)
 
bool boxLineCollision (const aabb3f &box, const v3f rotation, const v3f start, const v3f dir, v3f *collision_point, v3f *collision_normal, v3f *raw_collision_normal)
 

Function Documentation

◆ boxLineCollision() [1/2]

bool boxLineCollision ( const aabb3f & box,
const v3f rotation,
const v3f start,
const v3f dir,
v3f * collision_point,
v3f * collision_normal,
v3f * raw_collision_normal )

References boxLineCollision(), and dir().

+ Here is the call graph for this function:

◆ boxLineCollision() [2/2]

bool boxLineCollision ( const aabb3f & box,
v3f start,
v3f dir,
v3f * collision_point,
v3f * collision_normal )

Checks if a line and a box intersects.

Parameters
[in]boxbox to test collision
[in]startstarting point of the line
[in]dirdirection and length of the line
[out]collision_pointfirst point of the collision
[out]collision_normalnormal vector at the collision, points outwards of the surface. If start is in the box, zero vector.
Returns
true if a collision point was found

References dir().

Referenced by boxLineCollision(), Environment::continueRaycast(), ClientEnvironment::getSelectedActiveObjects(), and ServerEnvironment::getSelectedActiveObjects().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: