A spherical mesh collider. More...
Public Member Functions | |
SphericalMeshCollider (Point3 center, float radius) | |
Constructs a spherical collision detector from its center and its radius. More... | |
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... | |
float | getRadius () |
A spherical mesh collider.
It's created from a point (sphere's center) and a radius (sphere's radius)
com.beyondar.android.opengl.colision.SphericalMeshCollider.SphericalMeshCollider | ( | Point3 | center, |
float | radius | ||
) |
Constructs a spherical collision detector from its center and its radius.
center | Center point |
radius | Sphere radius |
boolean com.beyondar.android.opengl.colision.SphericalMeshCollider.contains | ( | Point3 | p | ) |
Returns true if the given point is contained by the mesh collider.
false otherwise
p | the point |
Implements com.beyondar.android.opengl.colision.MeshCollider.
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 |
Implements com.beyondar.android.opengl.colision.MeshCollider.
boolean com.beyondar.android.opengl.colision.SphericalMeshCollider.intersects | ( | Ray | r | ) |
Return if the given ray intersects with the mesh collider.
r | the ray |
Implements com.beyondar.android.opengl.colision.MeshCollider.