|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sunflow.core.Scene
public class Scene
Represents a entire scene, defined as a collection of instances viewed by a camera.
| Constructor Summary | |
|---|---|
Scene()
Creates an empty scene. |
|
| Method Summary | |
|---|---|
boolean |
calculatePhotons(PhotonStore map,
java.lang.String type,
int seed)
Create a photon map as prescribed by the given PhotonStore. |
BoundingBox |
getBounds()
Get scene world space bounding box. |
ShadingState |
getRadiance(IntersectionState istate,
float rx,
float ry,
double lensU,
double lensV,
double time,
int instance)
Get the radiance seen through a particular pixel |
int |
getThreadPriority()
Get the priority level to assign to multi-threaded operations. |
int |
getThreads()
Get number of allowed threads for multi-threaded operations. |
void |
render(Options options,
ImageSampler sampler,
Display display)
Render the scene using the specified options, image sampler and display. |
void |
setBakingInstance(Instance instance)
The provided instance will be considered for lightmap baking. |
void |
setCamera(Camera camera)
Sets the current camera (no support for multiple cameras yet). |
void |
setInstanceLists(Instance[] instances,
Instance[] infinite)
Update the instance lists for this scene. |
void |
setLightList(LightSource[] lights)
Update the light list for this scene. |
void |
setShaderOverride(Shader shader,
boolean photonOverride)
Enables shader overiding (set null to disable). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Scene()
| Method Detail |
|---|
public int getThreads()
public int getThreadPriority()
public void setCamera(Camera camera)
camera - camera to be used as the viewpoint for the scene
public void setInstanceLists(Instance[] instances,
Instance[] infinite)
instances - regular instancesinfinite - infinite instances (no bounds)public void setLightList(LightSource[] lights)
lights - array of light source objects
public void setShaderOverride(Shader shader,
boolean photonOverride)
shader - shader to run over all surfaces, or null to
disable overridingphotonOverride - true to override photon scattering
with this shader or false to run the regular
shaderspublic void setBakingInstance(Instance instance)
null, lightmap baking will be
disabled and normal rendering will occur.
instance - instance to bake
public ShadingState getRadiance(IntersectionState istate,
float rx,
float ry,
double lensU,
double lensV,
double time,
int instance)
istate - intersection state for ray tracingrx - pixel x coordinatery - pixel y coordinatelensU - DOF sampling variablelensV - DOF sampling variabletime - motion blur sampling variableinstance - QMC instance seed
null if nothing is seen through the specifieFd
pointpublic BoundingBox getBounds()
public void render(Options options,
ImageSampler sampler,
Display display)
options - rendering options objectsampler - image samplerdisplay - display to send the final image to, a default display will
be created if null
public boolean calculatePhotons(PhotonStore map,
java.lang.String type,
int seed)
PhotonStore.
map - object that will recieve shot photonstype - type of photons being shotseed - QMC seed parameter
true upon success
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||