de.grogra.rgg
public class LightModel extends LightModelBase implements Options, VolumeListener
| Modifier and Type | Class and Description |
|---|---|
static class |
LightModel.Type |
| Modifier and Type | Field and Description |
|---|---|
static LightModel.Type |
$TYPE |
static SCOType.Field |
depth$FIELD |
static SCOType.Field |
minPower$FIELD |
static SCOType.Field |
rayCount$FIELD |
static SCOType.Field |
seed$FIELD |
static SCOType.Field |
spectrumFactory$FIELD |
static SCOType.Field |
threadCount$FIELD |
static SCOType.Field |
visibleLayers$FIELD |
| Constructor and Description |
|---|
LightModel()
Create a default light model with 30.000 rays per computation
and a ray depth of 10.
|
LightModel(int rayCount,
int depth) |
LightModel(int rayCount,
int depth,
double minPower) |
| Modifier and Type | Method and Description |
|---|---|
void |
beginGroup(java.lang.Object object,
boolean asNode)
This method is invoked by a
SceneVisitor when subsequent
volumes shall be grouped into a single compound object. |
void |
compute()
(Re-)computes the light distribution in the current graph.
|
void |
compute(boolean force)
(Re-)computes the light distribution in the current graph.
|
void |
compute(boolean force,
boolean collectTracedRays) |
void |
compute(Spectrum spectrumFactory)
(Re-)computes the light distribution in the current graph.
|
void |
compute(Spectrum spectrumFactory,
boolean force)
(Re-)computes the light distribution in the current graph.
|
void |
compute(Spectrum spectrumFactory,
boolean force,
boolean collectTracedRays)
(Re-)computes the light distribution in the current graph.
|
void |
endGroup()
This method is invoked by a
SceneVisitor when the current group
ends. |
java.lang.Object |
get(java.lang.String key,
java.lang.Object defaultValue)
Returns the option value for the option identified
by
key. |
Spectrum |
getAbsorbedPower(Node node)
Returns the radiant power in Watts which is absorbed by the surface
of the volume of the given
node. |
Collector |
getAbsorbedPowerCollector(Node node) |
int |
getDepth() |
int |
getHitCount(Node node)
Returns the number of rays which is hit the surface
of the volume of the given
node. |
ManageableType |
getManageableType() |
double |
getMinPower() |
int |
getRayCount() |
Spectrum |
getReceivedPower(Node node)
Returns the radiant power in Watts which is received by the surface
of the volume of the given
node. |
Spectrum |
getReflectedPower(Node node)
Returns the radiant power in Watts which is reflected by the surface
of the volume of the given
node. |
long |
getSeed() |
Spectrum |
getSensedIrradiance(Node node)
Returns the irradiance in Watts per square meter which is sensed by the
sensor attached to the volume of the given
node. |
Collector |
getSensedIrradianceCollector(Node node) |
Spectrum |
getSpectrumFactory() |
int |
getThreadCount() |
ObjectList<ObjectList<RadiationModel.RayPoint>> |
getTracedRays() |
Spectrum |
getTransmittedPower(Node node)
Returns the radiant power in Watts which is transmitted by the surface
of the volume of the given
node. |
boolean |
hasResults() |
void |
invalidateOctree()
This invalidates the octree of the SceneVisitor and forces a
complete new computation.
|
void |
setDepth(int depth) |
void |
setLayerVisible(int layer,
boolean visible)
sets the visibility of a layer
|
void |
setMinPower(double minPower) |
void |
setRayCount(int rayCount) |
void |
setSeed(long value) |
void |
setSpectrumFactory(Spectrum value) |
void |
setThreadCount(int value) |
void |
volumeCreated(java.lang.Object object,
boolean asNode,
Volume volume)
This method is invoked by a
SceneVisitor when a
volume is created as representation of the geometry
of object. |
getAbsorbedPower3d, getRadiantPower3dFor, getRadiantPowerFor, getSensedIrradiance3daddReference, appendReferencesTo, fieldModified, getProvider, getStamp, initProvider, manageableReadResolve, manageableWriteReplace, removeReferencepublic static final LightModel.Type $TYPE
public static final SCOType.Field depth$FIELD
public static final SCOType.Field minPower$FIELD
public static final SCOType.Field rayCount$FIELD
public static final SCOType.Field seed$FIELD
public static final SCOType.Field spectrumFactory$FIELD
public static final SCOType.Field threadCount$FIELD
public static final SCOType.Field visibleLayers$FIELD
public LightModel()
public LightModel(int rayCount,
int depth)
public LightModel(int rayCount,
int depth,
double minPower)
public void beginGroup(java.lang.Object object,
boolean asNode)
VolumeListenerSceneVisitor when subsequent
volumes shall be grouped into a single compound object. The group
extends until the corresponding invocation of VolumeListener.endGroup().
These invocations may be nested, i.e., there may be groups within
groups.
Each group starts at object in the graph. If
object has a geometric representation itself, the
corresponding invocation of VolumeListener.volumeCreated(java.lang.Object, boolean, de.grogra.vecmath.geom.Volume) may be either
immediately before of after beginGroup.
beginGroup in interface VolumeListenerobject - the object of the graph which represents the root
of the groupasNode - is object a node or an edge?VolumeListener.endGroup()public void compute()
LightModelBasecompute in class LightModelBasepublic void compute(boolean force)
LightModelBasecompute in class LightModelBaseforce - if true forces recomputation of the light distributionpublic void compute(boolean force,
boolean collectTracedRays)
public void compute(Spectrum spectrumFactory)
LightModelBasecompute in class LightModelBasespectrumFactory - factrory for spectrum objectspublic void compute(Spectrum spectrumFactory, boolean force)
LightModelBase.getRadiantPowerFor(de.grogra.graph.impl.Node)
to return correct values.compute in class LightModelBaseforce - if true forces recomputation of the light distributionspectrumFactory - factrory for spectrum objectspublic void compute(Spectrum spectrumFactory, boolean force, boolean collectTracedRays)
LightModelBase.getRadiantPowerFor(de.grogra.graph.impl.Node)
to return correct values.force - if true forces recomputation of the light distributioncollectTracedRays - if true the traced rays are collected and can be obtained by {}. This can be used for debugging purposes.public void endGroup()
VolumeListenerSceneVisitor when the current group
ends.endGroup in interface VolumeListenerVolumeListener.beginGroup(java.lang.Object, boolean)public java.lang.Object get(java.lang.String key,
java.lang.Object defaultValue)
Optionskey. If no special value for the option is defined,
defaultValue is returned.public Spectrum getAbsorbedPower(Node node)
node. If the node
does not define a volume, the zero spectrum is returned.getAbsorbedPower in class LightModelBasenode - a node of the graphpublic int getDepth()
public int getHitCount(Node node)
node. If the node
does not define a volume, the zero is returned.node - a node of the graphpublic ManageableType getManageableType()
getManageableType in interface Manageablepublic double getMinPower()
public int getRayCount()
public Spectrum getReceivedPower(Node node)
node. If the node
does not define a volume, the zero spectrum is returned.node - a node of the graphpublic Spectrum getReflectedPower(Node node)
node. If the node
does not define a volume, the zero spectrum is returned.node - a node of the graphpublic long getSeed()
public Spectrum getSensedIrradiance(Node node)
node.
If the node does not define a volume with a sensor,
the zero spectrum is returned.getSensedIrradiance in class LightModelBasenode - a node of the graphpublic Spectrum getSpectrumFactory()
public int getThreadCount()
public ObjectList<ObjectList<RadiationModel.RayPoint>> getTracedRays()
public Spectrum getTransmittedPower(Node node)
node. If the node
does not define a volume, the zero spectrum is returned.node - a node of the graphpublic boolean hasResults()
public void invalidateOctree()
public void setDepth(int depth)
public void setLayerVisible(int layer,
boolean visible)
LightModelBasesetLayerVisible in class LightModelBasepublic void setMinPower(double minPower)
public void setRayCount(int rayCount)
public void setSeed(long value)
public void setSpectrumFactory(Spectrum value)
public void setThreadCount(int value)
public void volumeCreated(java.lang.Object object,
boolean asNode,
Volume volume)
VolumeListenerSceneVisitor when a
volume is created as representation of the geometry
of object. By storing the information provided by the
parameters, the link from graph objects (nodes and edges) to volumes
can be established.volumeCreated in interface VolumeListenerobject - an object of the graphasNode - is object a node or an edge?volume - the volume which has been created as geometrical
representation of object