es.ucm.look.ar.math.collision
Interface Armature

All Known Subinterfaces:
DebugArmature
All Known Implementing Classes:
SphericalArmature, SphericalDebugArmature, SquareArmature, SquareDebugArmature

public interface Armature

An armature is a container for 3D objects. It will be used for collision tests. Armature are usually less complicated than the actual 3D object. They are usually cubes or spheres, to simplify calculations.


Method Summary
 boolean contains(Point3 p)
          Returns true if the given point is contained by the armature.
 Point3 getIntersectionPoint(Ray r)
          Test whether a ray intersects with the armature.
 boolean intersects(Ray r)
          Return if the given ray intersects with the armature
 

Method Detail

contains

boolean contains(Point3 p)
Returns true if the given point is contained by the armature. false otherwise

Parameters:
p - the point
Returns:
true if the given point is contained by the armature. false otherwise

getIntersectionPoint

Point3 getIntersectionPoint(Ray r)
Test whether a ray intersects with the armature. If it does, returns the intersection point. If it doesn't, returns null

Parameters:
r - the ray
Returns:
the intersection point. null if there is no intersection

intersects

boolean intersects(Ray r)
Return if the given ray intersects with the armature

Parameters:
r - the ray
Returns:
true if there is intersection. false otherwise