org.autochthonous.graphics.rt.objects
Class Aggregate
java.lang.Object
org.autochthonous.graphics.rt.Renderable
org.autochthonous.graphics.rt.objects.Aggregate
- All Implemented Interfaces:
- java.lang.Cloneable, ColorCalculator, Illuminated, Traceable
- Direct Known Subclasses:
- DXFFile, ThreeDStudioFile
- public class Aggregate
- extends Renderable
- implements Illuminated
An aggregate object.
Example:
<Aggregate>
<Transform>
<Scale value="0.1, 0.1, 0.1"/>
<Translate value="-1.5, 1, 0"/>
</Transform>
<OffFile geometry="x29.geom" faceColors="x29.ipc"/>
</Aggregate>
Document Type Definition:
<!ENTITY %Renderable " Aggregate | Box | Cone | Cylinder | IndexedMesh | Polygon | Sphere | SuperQuadric | Torus | TriangularStrip ">
<!ENTITY %Light " DirectionalLight | DistantLight | PointLight ">
<!ELEMENT Aggregate (Transform | Shader | %Renderable; | %Light;)+ >
Methods inherited from class org.autochthonous.graphics.rt.Renderable |
clone, createObjectSpaceRay, getColor, getColor, getShader, hasShader, isSelfShadowing, processObject, processParameters, readObject, setColor, setColor, setSelfShadowing, setShader, toObjectSpace, toObjectSpace, transform, transformNormal |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.autochthonous.graphics.rt.Traceable |
clone |
Aggregate
public Aggregate()
getInstance
public static Aggregate getInstance(RMLReader in)
throws java.io.IOException
- Throws:
java.io.IOException
add
public void add(Light obj)
add
public void add(Atmosphere obj)
add
public void add(Shader obj)
add
public void add(Traceable obj)
objectCount
public int objectCount()
bBox
public BBox bBox()
isIntersected
public boolean isIntersected(Ray r)
- Specified by:
isIntersected
in interface Traceable
- Specified by:
isIntersected
in class Renderable
intersections
public HitList intersections(Ray r)
- Specified by:
intersections
in interface Traceable
isShadowing
public boolean isShadowing(Ray r)
- Specified by:
isShadowing
in interface Traceable
- Specified by:
isShadowing
in class Renderable
visibleLights
public LightDataList visibleLights(Hit hit)
- Specified by:
visibleLights
in interface Illuminated
visibleLights
public LightDataList visibleLights(Hit hit,
Illuminated world)
affectingAtmospheres
public AtmosphereDataList affectingAtmospheres(Hit hit)
- Description copied from interface:
Illuminated
- Return the atmospheres that affect the light coming back
from the hit.
- Specified by:
affectingAtmospheres
in interface Illuminated
- Parameters:
hit
- the hit of interest.
- Returns:
- a list of atmospheres that affect the light coming in.
affectingAtmospheres
public AtmosphereDataList affectingAtmospheres(Hit hit,
Illuminated world)
traceables
public TraceableIterator traceables()
lights
public LightIterator lights()
atmospheres
public AtmosphereIterator atmospheres()
shaders
public ShaderIterator shaders()