Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
raycast.h File Reference
#include "voxelalgorithms.h"
#include "util/pointedthing.h"
+ Include dependency graph for raycast.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  RaycastSort
 Sorts PointedThings based on their distance. More...
 
class  RaycastState
 Describes the state of a raycast. More...
 

Functions

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

Function Documentation

◆ boxLineCollision() [1/2]

bool boxLineCollision ( const aabb3f & box,
v3f box_rotation,
v3f start,
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: