toxi.geom
Interface Intersector
- All Known Subinterfaces:
- Reflector
- All Known Implementing Classes:
- SphereIntersectorReflector
public interface Intersector
Generic interface for ray intersection with 3D geometry
getIntersectionDir
Vec3D getIntersectionDir(boolean normalized)
- Parameters:
normalized
- true, if a normalized version should be returned
- Returns:
- direction vector from ray origin to intersection point
getIntersectionDistance
float getIntersectionDistance()
- Returns:
- distance from ray origin to intersection point
getIntersectionPoint
Vec3D getIntersectionPoint()
- Returns:
- point of intersection on the entity surface
getNormalAtIntersection
Vec3D getNormalAtIntersection()
- Returns:
- entity's surface normal vector at intersection point
intersectsRay
boolean intersectsRay(Ray3D ray)
- Check if entity intersects with the given ray
- Parameters:
ray
- ray to check
- Returns:
- true, if ray hits the entity