mirror of
https://github.com/allankoechke/raylib-cpp.git
synced 2026-12-01 01:18:52 +00:00
Merge pull request #195 from wmpowell8/patch-1
Add more constructor overloads for RayCollision
This commit is contained in:
@@ -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
|
||||
*/
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user