|
le3d - LightEngine 3D
A straightforward C++ 3D software engine for real-time graphics
|
Functions | |
| 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. More... | |
| int | collideSphereSphere (LeVertex &ans, LeVertex &contact, const LeVertex &pos, float srcRadius, float dstRadius) |
| Compute the intersection between two spheres. More... | |
| int | collideSphereBox (LeVertex &ans, LeVertex &contact, const LeVertex &pos, float srcRadius, const LeVertex &dstSize) |
| Compute the intersection between a sphere and a box. More... | |
| int | collideSphereMesh (LeVertex &ans, LeVertex &contact, const LeVertex &pos, float srcRadius, const LeMesh *dstMesh) |
| Compute the intersection between a sphere and a mesh. More... | |
| int | traceSphere (const LeVertex &pos, float radius, const LeVertex &axis, float &distance) |
| int | traceBox (const LeVertex &pos, const LeVertex &size, const LeVertex &axis, float &distance) |
| Compute the intersection between a casted ray and a box. More... | |
| int | traceMesh (const LeMesh *mesh, const LeAxis &axis, float &distance) |
| Compute the intersection between a casted ray and a mesh. More... | |
Return values of the traceBox routine.
Return values of the collideRectRect routine.
| int LeCollisions::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.
| [out] | ansX | x coordinate of answer / correction vector |
| [out] | ansY | y coordinate of answer / correction vector |
| [in] | srcX | x coordinate of source rectangle |
| [in] | srcY | y coordinate of source rectangle |
| [in] | srcW | width of source rectangle |
| [in] | srcH | height of source rectangle |
| [in] | dstX | x coordinate of destination rectangle |
| [in] | dstY | y coordinate of destination rectangle |
| [in] | dstW | width of destination rectangle |
| [in] | dstH | height of destination rectangle |
| int LeCollisions::collideSphereBox | ( | LeVertex & | ans, |
| LeVertex & | contact, | ||
| const LeVertex & | pos, | ||
| float | srcRadius, | ||
| const LeVertex & | dstSize | ||
| ) |
Compute the intersection between a sphere and a box.
| [out] | ans | answer / correction vector |
| [out] | contact | place of contact vector |
| [in] | pos | relative position of the sphere to the box center |
| [in] | srcRadius | radius of source sphere |
| [in] | dstSize | size of destination box |
| int LeCollisions::collideSphereMesh | ( | LeVertex & | ans, |
| LeVertex & | contact, | ||
| const LeVertex & | pos, | ||
| float | srcRadius, | ||
| const LeMesh * | dstMesh | ||
| ) |
Compute the intersection between a sphere and a mesh.
| [out] | ans | answer / correction vector |
| [out] | contact | place of contact vector |
| [in] | pos | relative position of the sphere to the mesh center |
| [in] | srcRadius | radius of source sphere |
| [in] | dstMesh | pointer to a destination mesh |
| int LeCollisions::collideSphereSphere | ( | LeVertex & | ans, |
| LeVertex & | contact, | ||
| const LeVertex & | pos, | ||
| float | srcRadius, | ||
| float | dstRadius | ||
| ) |
Compute the intersection between two spheres.
| [out] | ans | answer / correction vector |
| [out] | contact | place of contact vector |
| [in] | pos | relative position of spheres |
| [in] | srcRadius | radius of source sphere |
| [in] | dstRadius | radius of destination sphere |
| int LeCollisions::traceBox | ( | const LeVertex & | pos, |
| const LeVertex & | size, | ||
| const LeVertex & | axis, | ||
| float & | distance | ||
| ) |
Compute the intersection between a casted ray and a box.
| [in] | pos | position of the center of the box |
| [in] | size | size of the box |
| [in] | axis | casted ray axis |
| [out] | distance | distance from axis origin to box surface |
Compute the intersection between a casted ray and a mesh.
| [in] | mesh | pointer to a mesh |
| [in] | axis | casted ray axis |
| [out] | distance | distance from axis origin to mesh surface |
1.8.10