Helper class for 3D collision detection.
More...
#include <Collision3DHelper.hpp>
|
| static bool | checkCollisionSpheres (const Vector3f ¢er1, const float &radius1, const Vector3f ¢er2, const float &radius2) |
| | Check collision between two spheres. More...
|
| |
| static bool | checkCollisionBoxes (const BoundingBox &box1, const BoundingBox &box2) |
| | Check collision between two bounding boxes. More...
|
| |
| static bool | checkCollisionBoxSphere (const BoundingBox &box, const Vector3f ¢er, const float &radius) |
| | Check collision between a bounding box and a sphere. More...
|
| |
| static RayCollision | getRayCollisionSphere (const Ray &ray, const Vector3f ¢er, const float &radius) |
| | Get collision info between ray and sphere. More...
|
| |
| static RayCollision | getRayCollisionBox (const Ray &ray, const BoundingBox &box) |
| | Get collision info between ray and box. More...
|
| |
| static RayCollision | getRayCollisionModel (const Ray &ray, const model::RlModel &model) |
| | Get collision info between ray and model. More...
|
| |
| static RayCollision | getRayCollisionMesh (const Ray &ray, const model::RlMesh &mesh, const Matrix &transform) |
| | Get collision info between ray and mesh. More...
|
| |
| static RayCollision | getRayCollisionTriangle (const Ray &ray, const Vector3f &p1, const Vector3f &p2, const Vector3f &p3) |
| | Get collision info between ray and triangle. More...
|
| |
| static RayCollision | getRayCollisionQuad (const Ray &ray, const Vector3f &p1, const Vector3f &p2, const Vector3f &p3, const Vector3f &p4) |
| | Get collision info between ray and quad. More...
|
| |
Helper class for 3D collision detection.
◆ checkCollisionBoxes()
| bool raylib::helper::Collision3dHelper::checkCollisionBoxes |
( |
const BoundingBox & |
box1, |
|
|
const BoundingBox & |
box2 |
|
) |
| |
|
static |
Check collision between two bounding boxes.
- Parameters
-
| box1 | Bounding box of the first object |
| box2 | Bounding box of the second object |
- Returns
- If the two bounding boxes are colliding
◆ checkCollisionBoxSphere()
| bool raylib::helper::Collision3dHelper::checkCollisionBoxSphere |
( |
const BoundingBox & |
box, |
|
|
const Vector3f & |
center, |
|
|
const float & |
radius |
|
) |
| |
|
static |
Check collision between a bounding box and a sphere.
- Parameters
-
| box | Bounding box of the object |
| center | Center of the sphere |
| radius | Radius of the sphere |
- Returns
- If the bounding box and the sphere are colliding
◆ checkCollisionSpheres()
| bool raylib::helper::Collision3dHelper::checkCollisionSpheres |
( |
const Vector3f & |
center1, |
|
|
const float & |
radius1, |
|
|
const Vector3f & |
center2, |
|
|
const float & |
radius2 |
|
) |
| |
|
static |
Check collision between two spheres.
- Parameters
-
| center1 | Center of the first sphere |
| radius1 | Radius of the first sphere |
| center2 | Center of the second sphere |
| radius2 | Radius of the second sphere |
- Returns
- If the two spheres are colliding
◆ getRayCollisionBox()
| RayCollision raylib::helper::Collision3dHelper::getRayCollisionBox |
( |
const Ray & |
ray, |
|
|
const BoundingBox & |
box |
|
) |
| |
|
static |
Get collision info between ray and box.
- Parameters
-
- Returns
- If the ray and the box are colliding
◆ getRayCollisionMesh()
| RayCollision raylib::helper::Collision3dHelper::getRayCollisionMesh |
( |
const Ray & |
ray, |
|
|
const model::RlMesh & |
mesh, |
|
|
const Matrix & |
transform |
|
) |
| |
|
static |
Get collision info between ray and mesh.
- Parameters
-
| ray | Ray |
| mesh | Mesh |
| transform | Transform of the mesh |
- Returns
- If the ray and the mesh are colliding
◆ getRayCollisionModel()
| RayCollision raylib::helper::Collision3dHelper::getRayCollisionModel |
( |
const Ray & |
ray, |
|
|
const model::RlModel & |
model |
|
) |
| |
|
static |
Get collision info between ray and model.
- Parameters
-
- Returns
- If the ray and the model are colliding
◆ getRayCollisionQuad()
| RayCollision raylib::helper::Collision3dHelper::getRayCollisionQuad |
( |
const Ray & |
ray, |
|
|
const Vector3f & |
p1, |
|
|
const Vector3f & |
p2, |
|
|
const Vector3f & |
p3, |
|
|
const Vector3f & |
p4 |
|
) |
| |
|
static |
Get collision info between ray and quad.
- Parameters
-
| ray | Ray |
| p1 | Vertex 1 of the quad |
| p2 | Vertex 2 of the quad |
| p3 | Vertex 3 of the quad |
| p4 | Vertex 4 of the quad |
- Returns
- If the ray and the quad are colliding
◆ getRayCollisionSphere()
| RayCollision raylib::helper::Collision3dHelper::getRayCollisionSphere |
( |
const Ray & |
ray, |
|
|
const Vector3f & |
center, |
|
|
const float & |
radius |
|
) |
| |
|
static |
Get collision info between ray and sphere.
- Parameters
-
| ray | Ray |
| center | Center of the sphere |
| radius | Radius of the sphere |
- Returns
- If the ray and the sphere are colliding
◆ getRayCollisionTriangle()
| RayCollision raylib::helper::Collision3dHelper::getRayCollisionTriangle |
( |
const Ray & |
ray, |
|
|
const Vector3f & |
p1, |
|
|
const Vector3f & |
p2, |
|
|
const Vector3f & |
p3 |
|
) |
| |
|
static |
Get collision info between ray and triangle.
- Parameters
-
| ray | Ray |
| p1 | Vertex 1 of the triangle |
| p2 | Vertex 2 of the triangle |
| p3 | Vertex 3 of the triangle |
- Returns
- If the ray and the triangle are colliding
The documentation for this class was generated from the following files: