36 #include "../engine/le3d.h"
98 int collideRectRect(
float &ansX,
float &ansY,
float srcX,
float srcY,
float srcW,
float srcH,
float dstX,
float dstY,
float dstW,
float dstH);
109 #endif // COLLISIONS_H
int traceMesh(const LeMesh *mesh, const LeAxis &axis, float &distance)
Compute the intersection between a casted ray and a mesh.
Definition: collisions.cpp:406
Definition: collisions.h:49
COLLISIONS_RECT_RESULT
Return values of the collideRectRect routine.
Definition: collisions.h:44
Definition: collisions.h:89
int collideSphereMesh(LeVertex &ans, LeVertex &contact, const LeVertex &pos, float srcRadius, const LeMesh *dstMesh)
Compute the intersection between a sphere and a mesh.
Definition: collisions.cpp:315
Definition: collisions.h:91
Definition: collisions.h:57
Definition: collisions.h:66
int collideSphereSphere(LeVertex &ans, LeVertex &contact, const LeVertex &pos, float srcRadius, float dstRadius)
Compute the intersection between two spheres.
Definition: collisions.cpp:98
Definition: collisions.h:58
COLLISIONS_SPHERE_RESULT
Return values of the collideSphereSphere routine.
Definition: collisions.h:56
Definition: collisions.h:68
Definition: collisions.h:90
Definition: collisions.h:48
int traceSphere(const LeVertex &pos, float radius, const LeVertex &axis, float &distance)
Definition: collisions.cpp:117
Definition: collisions.h:79
Represent a vertex in 3D space.
Definition: geometry_scalar.h:46
Definition: collisions.h:94
Definition: collisions.h:69
Definition: collisions.h:88
Definition: collisions.h:47
Definition: collisions.h:67
Definition: collisions.h:92
Definition: collisions.h:78
Definition: collisions.h:45
int collideRectRect(float &ansX, float &ansY, float srcX, float srcY, float srcW, float srcH, float dstX, float dstY, float dstW, float dstH)
Compute the intersection between two rectangles.
Definition: collisions.cpp:56
Represent an axis in 3D space.
Definition: geometry_scalar.h:265
COLLISIONS_BOX_TRACE_RESULT
Return values of the traceBox routine.
Definition: collisions.h:87
Definition: collisions.h:93
COLLISIONS_BOX_RESULT
Return values of the collideSphereBox routine.
Definition: collisions.h:65
int traceBox(const LeVertex &pos, const LeVertex &size, const LeVertex &axis, float &distance)
Compute the intersection between a casted ray and a box.
Definition: collisions.cpp:222
int collideSphereBox(LeVertex &ans, LeVertex &contact, const LeVertex &pos, float srcRadius, const LeVertex &dstSize)
Compute the intersection between a sphere and a box.
Definition: collisions.cpp:133
Definition: collisions.h:77
Contain and manage a 3D mesh.
Definition: mesh.h:47
Definition: collisions.h:46
COLLISIONS_MESH_RESULT
Return values of the collideSphereMesh routine.
Definition: collisions.h:76
Definition: collisions.h:38