|
||||||||||
| 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.engine.SurfaceGroup
public class SurfaceGroup
A SurfaceGroup object allows Surface objects to be grouped together. The properties of the SurfaceGroup object are applied to each of its children.
| Constructor Summary | |
|---|---|
SurfaceGroup()
Constructs a SurfaceGroup object with no Surface objects. |
|
SurfaceGroup(Surface[] surfaces)
Constructs a SurfaceGroup object using the Surface objects in the specified array. |
|
| Method Summary | |
|---|---|
void |
addSurface(Surface surface)
Adds the specified Surface object to this SurfaceGroup object and sets its parent to this SurfaceGroup object (if it is an instance of AbstractSurface). |
Vector |
getNormalAt(Vector point)
Returns null. |
Surface |
getSurface(int index)
Returns the Surface object stored by this SurfaceGroup object at the specified index. |
Surface[] |
getSurfaces()
Returns the Surface objects stored by this SurfaceGroup object as a Surface array. |
boolean |
intersect(Ray ray)
Returns true if the ray represented by the specified Ray object intersects any of the surfaces represented by this SurfaceGroup object. |
Intersection |
intersectAt(Ray ray)
Returns an Intersection object that represents the ray-surface intersections for the AbstractSurface object which is intersected closest to the origin of the ray (>= 0). |
void |
removeSurface(int index)
Removes the Surface object stored at the specified index from this SurfaceGroup object and sets the parent of the removed Surface object to null (if it is an instance of AbstractSurface). |
void |
setSurfaces(Surface[] surfaces)
Replaces all of the Surface objects of this SurfaceGroup object with those represented by the specified Surface array. |
RGB |
shade(ShaderParameters p)
Calculates a color value for this AbstractSurface using the sum of the values calculated by the Shader objects stored by this AbstractSurface and the parent of this AbstractSurface and returns this value as an RGB object. |
Mesh |
triangulate()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SurfaceGroup()
public SurfaceGroup(Surface[] surfaces)
| Method Detail |
|---|
public void setSurfaces(Surface[] surfaces)
public void addSurface(Surface surface)
public void removeSurface(int index)
public Surface[] getSurfaces()
public Surface getSurface(int index)
public RGB shade(ShaderParameters p)
AbstractSurface
shade in interface Surfaceshade in class AbstractSurfacenet.sf.j3d.threeD.raytracer.engine.Surface#shade(net.sf.j3d.threeD.raytracer.engine.ShaderParameters)public Vector getNormalAt(Vector point)
public Mesh triangulate()
triangulate in class AbstractSurfacepublic 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 | |||||||||