Fork me
BeyondAR
Augmented Reality Framework for Android
 All Classes Functions Variables
com.beyondar.android.opengl.colision.SphericalMeshCollider Class Reference

A spherical mesh collider. More...

Inheritance diagram for com.beyondar.android.opengl.colision.SphericalMeshCollider:
Collaboration diagram for com.beyondar.android.opengl.colision.SphericalMeshCollider:

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 ()
 

Detailed Description

A spherical mesh collider.

It's created from a point (sphere's center) and a radius (sphere's radius)

Constructor & Destructor Documentation

com.beyondar.android.opengl.colision.SphericalMeshCollider.SphericalMeshCollider ( Point3  center,
float  radius 
)

Constructs a spherical collision detector from its center and its radius.

Parameters
centerCenter point
radiusSphere radius

Member Function Documentation

boolean com.beyondar.android.opengl.colision.SphericalMeshCollider.contains ( Point3  p)

Returns true if the given point is contained by the mesh collider.

false otherwise

Parameters
pthe point
Returns
true if the given point is contained by the armature. false otherwise

Implements com.beyondar.android.opengl.colision.MeshCollider.

Here is the caller graph for this function:

Point3 com.beyondar.android.opengl.colision.SphericalMeshCollider.getIntersectionPoint ( Ray  r)

Test whether a ray intersects with the mesh collider.

If it does, returns the intersection point. If it doesn't, returns null

Parameters
rthe ray
Returns
the intersection point. null if there is no intersection

Implements com.beyondar.android.opengl.colision.MeshCollider.

Here is the call graph for this function:

boolean com.beyondar.android.opengl.colision.SphericalMeshCollider.intersects ( Ray  r)

Return if the given ray intersects with the mesh collider.

Parameters
rthe ray
Returns
true if there is intersection. false otherwise

Implements com.beyondar.android.opengl.colision.MeshCollider.


The documentation for this class was generated from the following file: