de.grogra.ray
Interface RTScene

All Known Implementing Classes:
GroIMPSceneGraph

public interface RTScene

This class represents a scene of 3d objects. It gives access to all objects and lights in this scene. To receive an array of all scene shadeable objects or of all light use the methodes de.grogra.ray.Raytracer.getShadeables(RTScene scene) or de.grogra.ray.Raytracer.getLights(RTScene scene).

See Also:
de.grogra.ray.Raytracer.getShadeables, de.grogra.ray.Raytracer.getLights

Method Summary
 java.lang.Object getGraph()
           
 int getLightsCount()
          Returns the number of light in this scene.
 int getShadeablesCount()
          Returns the number of shadeable (visible) objects in the scene.
 int getStamp()
          Returns a modification stamp for the scene graph.
 void traversSceneLights(RTSceneVisitor visitor)
          Provides an access to all light objects in this scene.
 void traversSceneObjects(RTSceneVisitor visitor)
          Provides an access to all objects in this scene.
 

Method Detail

getGraph

java.lang.Object getGraph()

getLightsCount

int getLightsCount()
Returns the number of light in this scene.

Returns:
number of scene lights

getShadeablesCount

int getShadeablesCount()
Returns the number of shadeable (visible) objects in the scene.

Returns:
number of shadeable objects

getStamp

int getStamp()
Returns a modification stamp for the scene graph. Each modification increments the value, so that the test whether some modification occured can be simply performed on values of the stamp.

Returns:
a stamp for the whole graph

traversSceneLights

void traversSceneLights(RTSceneVisitor visitor)
Provides an access to all light objects in this scene. For each light object the methode RTSceneVisitor.visitObject(RTObject object) is called.

Parameters:
visitor - a visitor object that can perform a proccessing with a concrete scene light.
See Also:
RTSceneVisitor

traversSceneObjects

void traversSceneObjects(RTSceneVisitor visitor)
Provides an access to all objects in this scene. For each object the methode RTSceneVisitor.visitObject(RTObject object) is called.

Parameters:
visitor - a visitor object that can perform a proccessing with a concrete scene object.
See Also:
RTSceneVisitor