- 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
Modifier and TypeMethodDescriptiongetGraph()
int
Returns the number of light in this scene.int
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 Details
-
traversSceneObjects
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:
-
traversSceneLights
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:
-
getShadeablesCount
int getShadeablesCount()Returns the number of shadeable (visible) objects in the scene.- Returns:
- number of shadeable objects
-
getLightsCount
int getLightsCount()Returns the number of light in this scene.- Returns:
- number of scene lights
-
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
-
getGraph
Object getGraph()
-