de.grogra.gpuflux.tracer
public class FluxLightModelTracer extends ShareableBase implements ProgressMonitor
| Modifier and Type | Class and Description |
|---|---|
static class |
FluxLightModelTracer.MeasureMode |
static class |
FluxLightModelTracer.Type |
| Modifier and Type | Field and Description |
|---|---|
static FluxLightModelTracer.Type |
$TYPE |
static SCOType.Field |
cutoffPower$FIELD |
static SCOType.Field |
depth$FIELD |
static SCOType.Field |
dispersion$FIELD |
static SCOType.Field |
enableSensors$FIELD |
static SCOType.Field |
flatness$FIELD |
static SCOType.Field |
importanceCurve$FIELD |
static SCOType.Field |
measureMode$FIELD |
static SCOType.Field |
measureObjectFilter$FIELD |
static SCOType.Field |
minLambda$FIELD |
static SCOType.Field |
minPower$FIELD |
static SCOType.Field |
randomseed$FIELD |
static SCOType.Field |
rayCount$FIELD |
static SCOType.Field |
sensitivityCurves$FIELD |
static SCOType.Field |
spectralBuckets$FIELD |
static SCOType.Field |
targetVariance$FIELD |
static SCOType.Field |
visibleLayers$FIELD |
DONE_PROGRESS, INDETERMINATE_PROGRESS| Constructor and Description |
|---|
FluxLightModelTracer()
Creates a default light model with 30.000 rays per computation
and a ray depth of 10.
|
FluxLightModelTracer(int rayCount,
int depth,
double cutoffPower,
boolean enableSensors)
Creates a light model
|
| Modifier and Type | Method and Description |
|---|---|
void |
build()
(Re-)builds a scene from the current graph.
|
void |
compute() |
void |
compute(boolean forceCompute,
boolean forceRebuild)
(Re-)computes the light distribution in the current graph.
|
Experiment |
getAbsorbedPower()
Returns the experiment data on absorbed power, computed during the last call to
compute() |
Spectrum3d |
getAbsorbedPower(Node node)
Deprecated.
|
Measurement |
getAbsorbedPowerMeasurement(Node node)
Returns the power absorbed by a node during the last call to
compute() |
double |
getCutoffPower() |
int |
getDepth() |
float |
getFlatness() |
SpectralCurve |
getImportanceCurve() |
ManageableType |
getManageableType() |
int |
getMaxLambda() |
FluxLightModelTracer.MeasureMode |
getMeasureMode() |
ObjectFilter |
getMeasureObjectFilter() |
int |
getMinLambda() |
double |
getMinPower() |
int |
getRandomseed() |
int |
getRayCount() |
Experiment |
getSensedIrradiance()
Returns the experiment data on sensed irradiance, computed during the last call to
compute() |
Spectrum3d |
getSensedIrradiance(Node node)
Deprecated.
|
Measurement |
getSensedIrradianceMeasurement(Node node)
Returns the irradiance sensed by a node during the last call to
compute() |
SpectralCurve[] |
getSensitivityCurves() |
int |
getSpectralBuckets() |
double |
getTargetVariance() |
boolean[] |
getVisibleLayers() |
boolean |
isDispersion() |
boolean |
isEnableSensors() |
double |
sampleCountToVariance(java.util.AbstractList<Light> lights,
double minPower,
int sampleCount)
Returns the variance for a given sample count for one computation
|
void |
setCutoffPower(double minPower) |
void |
setDepth(int depth) |
void |
setDispersion(boolean dispersion) |
void |
setEnableSensors(boolean enableSensors) |
void |
setFlatness(float flatness) |
void |
setImportanceCurve(SpectralCurve importanceCurve) |
void |
setLayerVisible(int layer,
boolean visible) |
void |
setMeasureMode(FluxLightModelTracer.MeasureMode measureMode) |
void |
setMeasureObjectFilter(ObjectFilter measureObjectFilter) |
void |
setProgress(java.lang.String text,
float progress)
This method is invoked by the renderer to monitor its progress.
|
void |
setRandomseed(int seed) |
void |
setRayCount(int rayCount) |
void |
setSensitivityCurves(SpectralCurve[] sensitivityCurves) |
void |
setSpectralBuckets(int spectralBuckets) |
void |
setSpectralRange(int minLambda,
int maxLambda) |
void |
setTargetVariance(double minPower,
double targetVariance) |
void |
showMessage(java.lang.String message)
This method is invoked by the renderer to show a message, e.g.,
the statistics after rendering has completed.
|
int |
varianceToSampleCount(java.util.AbstractList<Light> lights,
double minPower,
double targetVariance)
Returns the estimated sample count, required to achieve a given target variance for one computation
|
addReference, appendReferencesTo, fieldModified, getProvider, getStamp, initProvider, manageableReadResolve, manageableWriteReplace, removeReferencepublic static final FluxLightModelTracer.Type $TYPE
public static final SCOType.Field cutoffPower$FIELD
public static final SCOType.Field depth$FIELD
public static final SCOType.Field dispersion$FIELD
public static final SCOType.Field enableSensors$FIELD
public static final SCOType.Field flatness$FIELD
public static final SCOType.Field importanceCurve$FIELD
public static final SCOType.Field measureMode$FIELD
public static final SCOType.Field measureObjectFilter$FIELD
public static final SCOType.Field minLambda$FIELD
public static final SCOType.Field minPower$FIELD
public static final SCOType.Field randomseed$FIELD
public static final SCOType.Field rayCount$FIELD
public static final SCOType.Field sensitivityCurves$FIELD
public static final SCOType.Field spectralBuckets$FIELD
public static final SCOType.Field targetVariance$FIELD
public static final SCOType.Field visibleLayers$FIELD
public FluxLightModelTracer()
public FluxLightModelTracer(int rayCount,
int depth,
double cutoffPower,
boolean enableSensors)
rayCount - the number of samples per computationdepth - the maximum ray depthcutoffPower - the maximum neglectable power quantumenableSensors - sensors are simulated if truepublic void build()
#conputepublic void compute()
public void compute(boolean forceCompute,
boolean forceRebuild)
getSensedIrradiance(de.grogra.graph.impl.Node) and getAbsorbedPower(de.grogra.graph.impl.Node)
to return correct values.forceRebuild - true forces rebuilding of the scene, otherwise the last build is reusedforceRebuild2 - lights - list of lights for which the light distribution is computed. If null, the light distribution is computed for all lights in the scene.public Experiment getAbsorbedPower()
compute()@Deprecated public Spectrum3d getAbsorbedPower(Node node)
public Measurement getAbsorbedPowerMeasurement(Node node)
compute()node - node for which the absorbed power is returnedpublic double getCutoffPower()
public int getDepth()
public float getFlatness()
public SpectralCurve getImportanceCurve()
public ManageableType getManageableType()
getManageableType in interface Manageablepublic int getMaxLambda()
public FluxLightModelTracer.MeasureMode getMeasureMode()
public ObjectFilter getMeasureObjectFilter()
public int getMinLambda()
public double getMinPower()
public int getRandomseed()
public int getRayCount()
public Experiment getSensedIrradiance()
compute()@Deprecated public Spectrum3d getSensedIrradiance(Node node)
public Measurement getSensedIrradianceMeasurement(Node node)
compute()node - node for which the absorbed power is returnedpublic SpectralCurve[] getSensitivityCurves()
public int getSpectralBuckets()
public double getTargetVariance()
public boolean[] getVisibleLayers()
public boolean isDispersion()
public boolean isEnableSensors()
public double sampleCountToVariance(java.util.AbstractList<Light> lights, double minPower, int sampleCount)
lights - the list of light sourcesminPower - the smallest measurable power quantumsampleCount - the number of samplespublic void setCutoffPower(double minPower)
public void setDepth(int depth)
public void setDispersion(boolean dispersion)
public void setEnableSensors(boolean enableSensors)
public void setFlatness(float flatness)
public void setImportanceCurve(SpectralCurve importanceCurve)
public void setLayerVisible(int layer,
boolean visible)
public void setMeasureMode(FluxLightModelTracer.MeasureMode measureMode)
public void setMeasureObjectFilter(ObjectFilter measureObjectFilter)
public void setProgress(java.lang.String text,
float progress)
ProgressMonitorsetProgress in interface ProgressMonitortext - short text to displayprogress - state of progress from 0 to 1, or one of the
constants ProgressMonitor.INDETERMINATE_PROGRESS, ProgressMonitor.DONE_PROGRESSpublic void setRandomseed(int seed)
public void setRayCount(int rayCount)
public void setSensitivityCurves(SpectralCurve[] sensitivityCurves)
public void setSpectralBuckets(int spectralBuckets)
public void setSpectralRange(int minLambda,
int maxLambda)
public void setTargetVariance(double minPower,
double targetVariance)
public void showMessage(java.lang.String message)
ProgressMonitorshowMessage in interface ProgressMonitormessage - message to displaypublic int varianceToSampleCount(java.util.AbstractList<Light> lights, double minPower, double targetVariance)
lights - the list of light sourcesminPower - the smallest measurable power quantumtargetVariance - the target variance on the smallest measurable power quantum