godot_voxel/edition/voxel_raycast_result.h
2022-01-09 22:16:44 +00:00

28 lines
610 B
C++

#ifndef VOXEL_RAYCAST_RESULT_H
#define VOXEL_RAYCAST_RESULT_H
#include "../util/math/vector3i.h"
#include <core/object/ref_counted.h>
namespace zylann::voxel {
// This class exists only to make the script API nicer.
class VoxelRaycastResult : public RefCounted {
GDCLASS(VoxelRaycastResult, RefCounted)
public:
Vector3i position;
Vector3i previous_position;
float distance_along_ray;
private:
Vector3i _b_get_position() const;
Vector3i _b_get_previous_position() const;
float _b_get_distance() const;
static void _bind_methods();
};
} // namespace zylann::voxel
#endif // VOXEL_RAYCAST_RESULT_H