|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectapps.lightrays.raytracer.scene.SceneObject
apps.lightrays.raytracer.scene.geometry.Sphere
public class Sphere
The Class Sphere.
Constructor Summary | |
---|---|
Sphere()
Instantiates a new sphere. |
|
Sphere(Point center,
double radius,
OpticalProperties optics)
Instantiates a new sphere. |
Method Summary | |
---|---|
Shader |
createShader(Ray r)
Creates the shader. |
Point |
getCenter()
Gets the center. |
Vector |
getNormal(Point intersect)
Gets the normal. |
RayHitInfo |
intersect(Ray r)
Intersect. |
void |
set(Point center,
double radius,
OpticalProperties optics)
Sets the. |
void |
setCenter(Point center)
Sets the center. |
void |
setRadius(double radius)
Sets the radius. |
java.lang.String |
toString()
|
Methods inherited from class apps.lightrays.raytracer.scene.SceneObject |
---|
getOpticProperties, setOpticProperties, setScene |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Sphere()
public Sphere(Point center, double radius, OpticalProperties optics)
center
- the centerradius
- the radiusoptics
- the opticsMethod Detail |
---|
public Shader createShader(Ray r)
SceneObject
createShader
in class SceneObject
r
- the r
public Point getCenter()
public Vector getNormal(Point intersect)
SceneObject
getNormal
in class SceneObject
intersect
- the intersect
public RayHitInfo intersect(Ray r)
SceneObject
intersect
in class SceneObject
r
- the r
public void set(Point center, double radius, OpticalProperties optics)
center
- the centerradius
- the radiusoptics
- the opticspublic void setCenter(Point center)
center
- the new centerpublic void setRadius(double radius)
radius
- the new radiuspublic java.lang.String toString()
toString
in class SceneObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |