A mesh collider is a container for 3D objects used for collision tests. More...
Public Member Functions | |
boolean | contains (Point3 p) |
Returns true if the given point is contained by the mesh collider. More... | |
Point3 | getIntersectionPoint (Ray r) |
Test whether a ray intersects with the mesh collider. More... | |
boolean | intersects (Ray r) |
Return if the given ray intersects with the mesh collider. More... | |
A mesh collider is a container for 3D objects used for collision tests.
mesh colliders are usually less complicated than the actual 3D object. They are usually cubes or spheres to simplify calculations.
boolean com.beyondar.android.opengl.colision.MeshCollider.contains | ( | Point3 | p | ) |
Returns true if the given point is contained by the mesh collider.
false otherwise
p | the point |
Implemented in com.beyondar.android.opengl.colision.SquareMeshCollider, and com.beyondar.android.opengl.colision.SphericalMeshCollider.
Test whether a ray intersects with the mesh collider.
If it does, returns the intersection point. If it doesn't, returns null
r | the ray |
Implemented in com.beyondar.android.opengl.colision.SphericalMeshCollider, and com.beyondar.android.opengl.colision.SquareMeshCollider.
boolean com.beyondar.android.opengl.colision.MeshCollider.intersects | ( | Ray | r | ) |
Return if the given ray intersects with the mesh collider.
r | the ray |
Implemented in com.beyondar.android.opengl.colision.SphericalMeshCollider, and com.beyondar.android.opengl.colision.SquareMeshCollider.