|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttracer.Traceable
tracer.Sphere
public class Sphere
A 3D roundish traceable thingy with a center and a radius
Field Summary | |
---|---|
(package private) Vec3 |
origin
|
(package private) float |
radius
|
Fields inherited from class tracer.Traceable |
---|
material |
Constructor Summary | |
---|---|
Sphere()
|
|
Sphere(Vec3 o,
float r)
|
Method Summary | |
---|---|
boolean |
hit(Ray r)
Returns a boolean indicating whether the line segment (r.origin + t*r.direction) with 0 <= t <= 1 intersects the object. |
IntersectionInfo |
intersect(Ray r)
Returns an IntersectionInfo object indicating whether the ray r intersects this object or not. |
void |
parse(Parser p)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
Vec3 origin
float radius
Constructor Detail |
---|
public Sphere(Vec3 o, float r)
public Sphere()
Method Detail |
---|
public void parse(Parser p) throws java.io.IOException
java.io.IOException
public IntersectionInfo intersect(Ray r)
Traceable
intersect
in class Traceable
IntersectionInfo
public boolean hit(Ray r)
Traceable
hit
in class Traceable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |