java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.rgg.LightModelBase
de.grogra.rgg.LightModel
de.grogra.rgg.LightModelD
- All Implemented Interfaces:
VolumeListener
,Manageable
,Shareable
,Options
Provides the same functionality as LightModelD but in addition can deliver
results for every recursion depth.
- Author:
- MH
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class de.grogra.rgg.LightModel
depth, depth$FIELD, minPower, minPower$FIELD, rayCount, rayCount$FIELD, seed, seed$FIELD, spectrumFactory, spectrumFactory$FIELD, threadCount, threadCount$FIELD, visibleLayers, visibleLayers$FIELD
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a default light model with 30.000 rays per computation and a ray depth of 10.LightModelD
(int rayCount, int depth) LightModelD
(int rayCount, int depth, double minPower) -
Method Summary
Modifier and TypeMethodDescriptionvoid
beginGroup
(Object object, boolean asNode) This method is invoked by aSceneVisitor
when subsequent volumes shall be grouped into a single compound object.protected int
checkVolumeId
(Node node) void
(Re-)computes the light distribution in the current graph.void
endGroup()
This method is invoked by aSceneVisitor
when the current group ends.getAbsorbedPower
(Node node) Returns the radiant power in Watts which is absorbed by the surface of the volume of the givennode
.getAbsorbedPower
(Node node, int idx) Returns the radiant power in Watts which is absorbed by the surface of the volume of the givennode
.Spectrum[]
getAbsorbedPowerD
(Node node) Returns the radiant power in Watts which is absorbed by the surface of the volume of the givennode
.int
getHitCount
(Node node) Returns the number of rays which is hit the surface of the volume of the givennode
.int
getHitCount
(Node node, int idx) Returns the number of rays which is hit the surface of the volume of the givennode
.int[]
getHitCountD
(Node node) Returns the number of rays which is hit the surface of the volume of the givennode
.getReceivedPower
(Node node) Returns the radiant power in Watts which is received by the surface of the volume of the givennode
.getReceivedPower
(Node node, int idx) Returns the radiant power in Watts which is received by the surface of the volume of the givennode
.Spectrum[]
getReceivedPowerD
(Node node) Returns the radiant power in Watts which is received by the surface of the volume of the givennode
.getReflectedPower
(Node node) Returns the radiant power in Watts which is reflected by the surface of the volume of the givennode
.getReflectedPower
(Node node, int idx) Returns the radiant power in Watts which is reflected by the surface of the volume of the givennode
.Spectrum[]
getReflectedPowerD
(Node node) Returns the radiant power in Watts which is reflected by the surface of the volume of the givennode
.getSensedIrradiance
(Node node) Returns the irradiance in Watts per square meter which is sensed by the sensor attached to the volume of the givennode
.getSensedIrradiance
(Node node, int idx) Returns the irradiance in Watts per square meter which is sensed by the sensor attached to the volume of the givennode
.Spectrum[]
getSensedIrradianceD
(Node node) Returns the irradiance in Watts per square meter which is sensed by the sensor attached to the volume of the givennode
.getTransmittedPower
(Node node) Returns the radiant power in Watts which is transmitted by the surface of the volume of the givennode
.getTransmittedPower
(Node node, int idx) Returns the radiant power in Watts which is transmitted by the surface of the volume of the givennode
.Spectrum[]
getTransmittedPowerD
(Node node) Returns the radiant power in Watts which is transmitted by the surface of the volume of the givennode
.void
volumeCreated
(Object object, boolean asNode, Volume volume) This method is invoked by aSceneVisitor
when avolume
is created as representation of the geometry ofobject
.Methods inherited from class de.grogra.rgg.LightModel
compute, compute, compute, compute, compute, get, getDepth, getMinPower, getRayCount, getSeed, getSpectrumFactory, getThreadCount, getTracedRays, hasResults, invalidateOctree, print, setDepth, setLayerVisible, setMinPower, setRayCount, setSeed, setSpectrumFactory, setThreadCount
Methods inherited from class de.grogra.rgg.LightModelBase
getAbsorbedPower3d, getRadiantPower3dFor, getRadiantPowerFor, getSensedIrradiance3d
Methods inherited from class de.grogra.persistence.ShareableBase
addReference, appendReferencesTo, fieldModified, getProvider, getStamp, initProvider, manageableReadResolve, manageableWriteReplace, removeReference
-
Field Details
-
$TYPE
-
-
Constructor Details
-
LightModelD
public LightModelD()Create a default light model with 30.000 rays per computation and a ray depth of 10. -
LightModelD
public LightModelD(int rayCount, int depth) -
LightModelD
public LightModelD(int rayCount, int depth, double minPower)
-
-
Method Details
-
compute
(Re-)computes the light distribution in the current graph. This method has to be invoked at first in order forLightModelBase.getRadiantPowerFor(de.grogra.graph.impl.Node)
to return correct values.- Overrides:
compute
in classLightModel
- Parameters:
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.
-
checkVolumeId
- Overrides:
checkVolumeId
in classLightModel
-
getHitCount
Returns the number of rays which is hit the surface of the volume of the givennode
. If thenode
does not define a volume, the zero is returned.- Overrides:
getHitCount
in classLightModel
- Parameters:
node
- a node of the graph- Returns:
- the number of rays which is hit the node
-
getTransmittedPower
Returns the radiant power in Watts which is transmitted by the surface of the volume of the givennode
. If thenode
does not define a volume, the zero spectrum is returned.- Overrides:
getTransmittedPower
in classLightModel
- Parameters:
node
- a node of the graph- Returns:
- the transmitted radiant power of the node
-
getReflectedPower
Returns the radiant power in Watts which is reflected by the surface of the volume of the givennode
. If thenode
does not define a volume, the zero spectrum is returned.- Overrides:
getReflectedPower
in classLightModel
- Parameters:
node
- a node of the graph- Returns:
- the reflected radiant power of the node
-
getReceivedPower
Returns the radiant power in Watts which is received by the surface of the volume of the givennode
. If thenode
does not define a volume, the zero spectrum is returned.- Overrides:
getReceivedPower
in classLightModel
- Parameters:
node
- a node of the graph- Returns:
- the received radiant power of the node
-
getAbsorbedPower
Returns the radiant power in Watts which is absorbed by the surface of the volume of the givennode
. If thenode
does not define a volume, the zero spectrum is returned.- Overrides:
getAbsorbedPower
in classLightModel
- Parameters:
node
- a node of the graph- Returns:
- the absorbed radiant power of the node
-
getSensedIrradiance
Returns the irradiance in Watts per square meter which is sensed by the sensor attached to the volume of the givennode
. If thenode
does not define a volume with a sensor, the zero spectrum is returned.- Overrides:
getSensedIrradiance
in classLightModel
- Parameters:
node
- a node of the graph- Returns:
- the sensed irradiance of the node
-
getHitCount
Returns the number of rays which is hit the surface of the volume of the givennode
. If thenode
does not define a volume, the zero is returned.- Parameters:
node
- a node of the graph- Returns:
- the number of rays which is hit the node
-
getTransmittedPower
Returns the radiant power in Watts which is transmitted by the surface of the volume of the givennode
. If thenode
does not define a volume, the zero spectrum is returned.- Parameters:
node
- a node of the graph- Returns:
- the transmitted radiant power of the node
-
getReflectedPower
Returns the radiant power in Watts which is reflected by the surface of the volume of the givennode
. If thenode
does not define a volume, the zero spectrum is returned.- Parameters:
node
- a node of the graph- Returns:
- the reflected radiant power of the node
-
getReceivedPower
Returns the radiant power in Watts which is received by the surface of the volume of the givennode
. If thenode
does not define a volume, the zero spectrum is returned.- Parameters:
node
- a node of the graph- Returns:
- the received radiant power of the node
-
getAbsorbedPower
Returns the radiant power in Watts which is absorbed by the surface of the volume of the givennode
. If thenode
does not define a volume, the zero spectrum is returned.- Parameters:
node
- a node of the graph- Returns:
- the absorbed radiant power of the node
-
getSensedIrradiance
Returns the irradiance in Watts per square meter which is sensed by the sensor attached to the volume of the givennode
. If thenode
does not define a volume with a sensor, the zero spectrum is returned.- Parameters:
node
- a node of the graph- Returns:
- the sensed irradiance of the node
-
getHitCountD
Returns the number of rays which is hit the surface of the volume of the givennode
. If thenode
does not define a volume, the zero is returned.- Parameters:
node
- a node of the graph- Returns:
- the number of rays which is hit the node
-
getTransmittedPowerD
Returns the radiant power in Watts which is transmitted by the surface of the volume of the givennode
. If thenode
does not define a volume, the zero spectrum is returned.- Parameters:
node
- a node of the graph- Returns:
- the transmitted radiant power of the node
-
getReflectedPowerD
Returns the radiant power in Watts which is reflected by the surface of the volume of the givennode
. If thenode
does not define a volume, the zero spectrum is returned.- Parameters:
node
- a node of the graph- Returns:
- the reflected radiant power of the node
-
getReceivedPowerD
Returns the radiant power in Watts which is received by the surface of the volume of the givennode
. If thenode
does not define a volume, the zero spectrum is returned.- Parameters:
node
- a node of the graph- Returns:
- the received radiant power of the node
-
getAbsorbedPowerD
Returns the radiant power in Watts which is absorbed by the surface of the volume of the givennode
. If thenode
does not define a volume, the zero spectrum is returned.- Parameters:
node
- a node of the graph- Returns:
- the absorbed radiant power of the node
-
getSensedIrradianceD
Returns the irradiance in Watts per square meter which is sensed by the sensor attached to the volume of the givennode
. If thenode
does not define a volume with a sensor, the zero spectrum is returned.- Parameters:
node
- a node of the graph- Returns:
- the sensed irradiance of the node
-
getSensedIrradianceCollector
- Overrides:
getSensedIrradianceCollector
in classLightModel
-
getAbsorbedPowerCollector
- Overrides:
getAbsorbedPowerCollector
in classLightModel
-
volumeCreated
Description copied from interface:VolumeListener
This method is invoked by aSceneVisitor
when avolume
is created as representation of the geometry ofobject
. By storing the information provided by the parameters, the link from graph objects (nodes and edges) to volumes can be established.- Specified by:
volumeCreated
in interfaceVolumeListener
- Overrides:
volumeCreated
in classLightModel
- Parameters:
object
- an object of the graphasNode
- isobject
a node or an edge?volume
- the volume which has been created as geometrical representation ofobject
-
beginGroup
Description copied from interface:VolumeListener
This method is invoked by aSceneVisitor
when subsequent volumes shall be grouped into a single compound object. The group extends until the corresponding invocation ofVolumeListener.endGroup()
. These invocations may be nested, i.e., there may be groups within groups.Each group starts at
object
in the graph. Ifobject
has a geometric representation itself, the corresponding invocation ofVolumeListener.volumeCreated(java.lang.Object, boolean, de.grogra.vecmath.geom.Volume)
may be either immediately before of afterbeginGroup
.- Specified by:
beginGroup
in interfaceVolumeListener
- Overrides:
beginGroup
in classLightModel
- Parameters:
object
- the object of the graph which represents the root of the groupasNode
- isobject
a node or an edge?- See Also:
-
endGroup
public void endGroup()Description copied from interface:VolumeListener
This method is invoked by aSceneVisitor
when the current group ends.- Specified by:
endGroup
in interfaceVolumeListener
- Overrides:
endGroup
in classLightModel
- See Also:
-
getManageableType
- Specified by:
getManageableType
in interfaceManageable
- Overrides:
getManageableType
in classLightModel
-