mirror of
https://github.com/Relintai/godot_voxel.git
synced 2024-11-19 02:47:18 +01:00
19 lines
454 B
C
19 lines
454 B
C
#include <vector3.h>
|
|
#include "vector3i.h"
|
|
|
|
// TODO Having a C++11 lambda would be nice...
|
|
// pos: voxel position
|
|
// context: arguments to carry (as a lamdbda capture)
|
|
typedef bool(*VoxelPredicate)(Vector3i pos, void * context);
|
|
|
|
bool voxel_raycast(
|
|
Vector3 ray_origin,
|
|
Vector3 ray_direction,
|
|
VoxelPredicate predicate,
|
|
void * predicate_context, // Handle that one with care
|
|
real_t max_distance,
|
|
Vector3i & out_hit_pos,
|
|
Vector3i & out_prev_pos
|
|
);
|
|
|