Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions include/RayCollision.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ class RayCollision : public ::RayCollision {
// Nothing.
}

/**
* Get collision info between ray and bounding box
*/
RayCollision(const ::Ray& ray, const ::BoundingBox& box) {
set(::GetRayCollisionBox(ray, box));
}

/**
* Get collision info between ray and mesh
*/
Expand All @@ -33,6 +40,20 @@ class RayCollision : public ::RayCollision {
set(::GetRayCollisionModel(ray, model));
}

/**
* Get collision info between ray and quad
*/
RayCollision(const ::Ray& ray, ::Vector3 p1, ::Vector3 p2, ::Vector3 p3, ::Vector3 p4) {
set(::GetRayCollisionQuad(ray, p1, p2, p3, p4));
}

/**
* Get collision info between ray and sphere
*/
RayCollision(const ::Ray& ray, ::Vector3 center, float radius) {
set(::GetRayCollisionSphere(ray, center, radius));
}

/**
* Get collision info between ray and triangle
*/
Expand Down