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

A square mesh collider. More...

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

Public Member Functions

 SquareMeshCollider (Point3 topLeft, Point3 bottomLeft, Point3 bottomRight, Point3 topRight)
 Constructs a square mesh collider from 4 points. 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...
 

Detailed Description

A square mesh collider.

It's created from four points.

Constructor & Destructor Documentation

com.beyondar.android.opengl.colision.SquareMeshCollider.SquareMeshCollider ( Point3  topLeft,
Point3  bottomLeft,
Point3  bottomRight,
Point3  topRight 
)

Constructs a square mesh collider from 4 points.

This 4 points must be contained for the same plane. If not, weird behavior will happen

Parameters
topLeft
bottomLeft
bottomRight
topRight

Member Function Documentation

boolean com.beyondar.android.opengl.colision.SquareMeshCollider.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 call graph for this function:

Here is the caller graph for this function:

Point3 com.beyondar.android.opengl.colision.SquareMeshCollider.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:

Here is the caller graph for this function:

boolean com.beyondar.android.opengl.colision.SquareMeshCollider.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.

Here is the call graph for this function:


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