|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.j3d.threeD.raytracer.engine.AbstractSurface
net.sf.j3d.threeD.raytracer.primitives.Sphere
public class Sphere
A Sphere object represents a primitive sphere in 3d space.
| Constructor Summary | |
|---|---|
Sphere()
Constructs a Sphere object that represents a unit sphere centered at the origin that is black. |
|
Sphere(Vector location,
double radius)
Constructs a Sphere object that represents a sphere with the specified center location and radius that is black. |
|
Sphere(Vector location,
double radius,
RGB color)
Constructs a Sphere object that represents a sphere with the specified center location, radius, and color. |
|
| Method Summary | |
|---|---|
double |
getIndexOfRefraction(Vector p)
|
Vector |
getNormalAt(Vector point)
Returns a Vector object that represents the vector normal to this sphere at the point represented by the specified Vector object. |
boolean |
intersect(Ray ray)
Returns true if the ray represented by the specified Ray object intersects the sphere represented by this Sphere object in real space. |
Intersection |
intersectAt(Ray ray)
Returns an Intersection object representing the points along the ray represented by the specified Ray object that intersection between the ray and the sphere represented by this Sphere object occurs. |
Mesh |
triangulate()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Sphere()
public Sphere(Vector location,
double radius)
public Sphere(Vector location,
double radius,
RGB color)
| Method Detail |
|---|
public Mesh triangulate()
triangulate in class AbstractSurfacepublic double getIndexOfRefraction(Vector p)
getIndexOfRefraction in class AbstractSurfacepublic Vector getNormalAt(Vector point)
public boolean intersect(Ray ray)
public Intersection intersectAt(Ray ray)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||