|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Scene
A Scene
represents the complete geometry, shading,
and lighting information which is needed for a raytracer. In addition,
it defines the sensors within the scene for a radiation model.
Note that
the methods are not thread-safe: For each additional thread,
its own instance of Scene
has to be created from the
original instance via the method dup()
.
Method Summary | |
---|---|
void |
appendStatistics(java.lang.StringBuffer stats)
Appends some statistics information about the scene to stats . |
boolean |
computeIntersections(Line line,
int which,
IntersectionList list,
Intersection excludeStart,
Intersection excludeEnd)
Computes intersections between the boundary surface of the objects of the scene and the specified line . |
Spectrum |
createSpectrum()
This factory method creates a new spectrum which shall be used for light computations within the context of this scene. |
Scene |
dup()
Returns a clone of this Scene . |
BoundingBox |
getBoundingBox()
Returns a bounding box which contains all finite geometric objects of the scene. |
java.lang.Object |
getGraph()
Returns an object identifying the underlying scene graph. |
Interior |
getInterior(Volume v)
Returns the interior which is associated with volume v . |
Matrix4d |
getInverseLightTransformation(int light)
Returns the affine light transformation from global world coordinates to local light coordinates for the light having index light in
getLights() . |
Matrix4d |
getInverseSensorTransformation(int sensor)
Returns the affine sensor transformation from global world coordinates to local sensor coordinates for the sensor having index sensor in
getSensors() . |
int |
getLight(Volume v)
Returns the index in getLights() of the light which is
associated with volume v , or -1
if no such light exists. |
Light[] |
getLights()
Returns an array of all lights in the scene. |
Matrix4d |
getLightTransformation(int light)
Returns the affine light transformation from local light coordinates to global world coordinates for the light having index light in
getLights() . |
OctreeUnion |
getOctree()
|
int |
getSensor(Volume v)
Returns the index in getSensors() of the sensor which is
associated with volume v , or -1
if no such sensor exists. |
Sensor[] |
getSensors()
Returns an array of all sensors in the scene. |
Matrix4d |
getSensorTransformation(int sensor)
Returns the affine sensor transformation from local sensor coordinates to global world coordinates for the sensor having index sensor in
getSensors() . |
Shader |
getShader(Volume v)
Returns the shader which is associated with volume v . |
int |
getStamp()
Returns a modification stamp for the underlying scene graph. |
java.lang.String |
getUniqueName()
Returns a unique name for the current scene, so that the test whether two scenes are identical can be performed. |
void |
transform(Volume v,
Tuple3d global,
Tuple3d localOut)
Transforms a point in global world coordinates to local object coordinates of the volume v . |
Method Detail |
---|
void appendStatistics(java.lang.StringBuffer stats)
stats
.
stats
- buffer for statistics informationboolean computeIntersections(Line line, int which, IntersectionList list, Intersection excludeStart, Intersection excludeEnd)
line
. For the precise
behaviour and the meaning of the parameters, see
Volume.computeIntersections(de.grogra.vecmath.geom.Line, int, de.grogra.vecmath.geom.IntersectionList, de.grogra.vecmath.geom.Intersection, de.grogra.vecmath.geom.Intersection)
.
line
- a linewhich
- one of Intersection.ALL
,
Intersection.CLOSEST
, Intersection.ANY
, this
determines which intersections have to be added to list
list
- the intersections are added to this listexcludeStart
- intersection at start point which shall be excluded, or null
excludeEnd
- intersection at end point which shall be excluded, or null
true
iff the beginning of the line lies
within the volume (i.e., if the line starts within the volume or
enters the volume at the starting point); however note that the returned
value is valid only if which == Intersection.ALL
Volume.computeIntersections(de.grogra.vecmath.geom.Line, int, de.grogra.vecmath.geom.IntersectionList, de.grogra.vecmath.geom.Intersection, de.grogra.vecmath.geom.Intersection)
Spectrum createSpectrum()
Scene dup()
Scene
.
All constant variables which are related to the structure
of the scene are copied shallowly, state variables
are newly created without copying.
BoundingBox getBoundingBox()
java.lang.Object getGraph()
Interior getInterior(Volume v)
v
.
v
- a volume
Matrix4d getInverseLightTransformation(int light)
light
in
getLights()
.
light
- index of light in getLights()
light
getLights()
Matrix4d getInverseSensorTransformation(int sensor)
sensor
in
getSensors()
.
sensor
- index of sensor in getSensors()
sensor
getSensors()
int getLight(Volume v)
getLights()
of the light which is
associated with volume v
, or -1
if no such light exists.
v
- a volume
getLights()
Light[] getLights()
getLightTransformation(int)
.
Matrix4d getLightTransformation(int light)
light
in
getLights()
.
light
- index of light in getLights()
light
getLights()
OctreeUnion getOctree()
int getSensor(Volume v)
getSensors()
of the sensor which is
associated with volume v
, or -1
if no such sensor exists.
v
- a volume
getSensors()
Sensor[] getSensors()
getSensorTransformation(int)
.
Matrix4d getSensorTransformation(int sensor)
sensor
in
getSensors()
.
sensor
- index of sensor in getSensors()
sensor
getSensors()
Shader getShader(Volume v)
v
.
v
- a volume
int getStamp()
java.lang.String getUniqueName()
void transform(Volume v, Tuple3d global, Tuple3d localOut)
v
.
v
- volume which defines the local object coordinatesglobal
- input point in global world coordinateslocalOut
- output point in local object coordinates
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |