|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttracer.IntersectionInfo
Used for returning information about intersections from Traceable.intersect.
Field Summary | |
float |
distance
|
boolean |
hit
|
Vec3 |
location
|
Vec3 |
normal
|
Traceable |
object
|
Constructor Summary | |
IntersectionInfo(boolean hit)
Constructor indicating there is no intersection. |
|
IntersectionInfo(Vec3 location,
Vec3 normal,
float distance,
Traceable object)
Constructor indicating there was an intersection. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public boolean hit
public Vec3 location
public Vec3 normal
public float distance
public Traceable object
Constructor Detail |
public IntersectionInfo(boolean hit)
hit
- Should be false. I know this is ugly, at least it saves us
from having to type `new IntersectionInfo(false,null,null,0,null)' for
indicating no hit.public IntersectionInfo(Vec3 location, Vec3 normal, float distance, Traceable object)
location
- The location of the intersectionnormal
- The normal of the object at the point of intersection.distance
- The distance from ray origin to the intersection point.object
- The object that was hit. Supply `this' here from the
intersect method of your Traceable.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |