java.lang.Object
de.grogra.ray2.tracing.RadiationModel
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
LightModelProcessor
,LightModelProcessorD
,ParallelRadiationModel
,ParallelRadiationModelD
Abstract base class for radiation model.
- Author:
- Ole Kniemeyer
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionRadiationModel
(Spectrum spectrumFactory, ObjectList<Spectrum> radiantPowerSum, ObjectList<Spectrum> absorbedPowerSum, ObjectList<Spectrum> reflectedPowerSum, ObjectList<Spectrum> transmittedPowerSum, ObjectList<Spectrum> sensedIrradianceSum, int[] idToGroup, ObjectList<ObjectList<RadiationModel.RayPoint>> rays, IntList hitCounterSum) Create a new radiation model that adds collected radiation values to the lists.RadiationModel
(Spectrum spectrumFactory, ObjectList<ObjectList<Spectrum>> radiantPowerSumD, ObjectList<ObjectList<Spectrum>> absorbedPowerSumD, ObjectList<ObjectList<Spectrum>> reflectedPowerSumD, ObjectList<ObjectList<Spectrum>> transmittedPowerSumD, ObjectList<ObjectList<Spectrum>> sensedIrradianceSumD, int[] idToGroup, ObjectList<ObjectList<RadiationModel.RayPoint>> rays, ObjectList<IntList> hitCounterSumD) -
Method Summary
Modifier and TypeMethodDescriptionabstract void
compute
(long rayCount, long seed, ProgressMonitor progress, int depth, double minPower) getAbsorbedPower
(int volumeIndex) Obtain the radiation power that was absorbed by a volume.getAbsorbedPowerCollector
(int volumeIndex) Spectrum[]
getAbsorbedPowerD
(int volumeIndex) Obtain the radiation power that was absorbed by a volume.int
getHitCount
(int volumeIndex) Returns the number of rays which is hit the surface of the volume of the givennode
.int[]
getHitCountD
(int volumeIndex) Returns the number of rays which is hit the surface of the volume of the givennode
.getReceivedPower
(int volumeIndex) Obtain the radiation power that was received by a volume.Spectrum[]
getReceivedPowerD
(int volumeIndex) Obtain the radiation power that was received by a volume.getReflectedPower
(int volumeIndex) Obtain the radiation power that was reflected by a volume.Spectrum[]
getReflectedPowerD
(int volumeIndex) Obtain the radiation power that was reflected by a volume.getSensedIrradiance
(int volumeIndex) Obtain the irradiance that was sensed by a volume.getSensedIrradianceCollector
(int volumeIndex) Spectrum[]
getSensedIrradianceD
(int volumeIndex) Obtain the irradiance that was sensed by a volume.getTransmittedPower
(int volumeIndex) Obtain the radiation power that was transmitted by a volume.Spectrum[]
getTransmittedPowerD
(int volumeIndex) Obtain the radiation power that was transmitted by a volume.
-
Constructor Details
-
RadiationModel
public RadiationModel(Spectrum spectrumFactory, ObjectList<Spectrum> radiantPowerSum, ObjectList<Spectrum> absorbedPowerSum, ObjectList<Spectrum> reflectedPowerSum, ObjectList<Spectrum> transmittedPowerSum, ObjectList<Spectrum> sensedIrradianceSum, int[] idToGroup, ObjectList<ObjectList<RadiationModel.RayPoint>> rays, IntList hitCounterSum) Create a new radiation model that adds collected radiation values to the lists.- Parameters:
spectrumFactory
- factory to create spectraradiantPowerSum
- list to which absorbed radiant powers are addedabsorbedPowerSum
- list to which received radiant powers are addedreflectedPowerSum
- list to which reflected radiant powers are addedtransmittedPowerSum
- list to which transmitted radiant powers are addedsensedIrradianceSum
- list to which sensed irradiances are addedidToGroup
- mapping from volume id to group indexrays
- for debugging purposes, the traced rays will be added to the list. Use null if this is not neededhit
- counter list to which the number of hitting rays are added
-
RadiationModel
public RadiationModel(Spectrum spectrumFactory, ObjectList<ObjectList<Spectrum>> radiantPowerSumD, ObjectList<ObjectList<Spectrum>> absorbedPowerSumD, ObjectList<ObjectList<Spectrum>> reflectedPowerSumD, ObjectList<ObjectList<Spectrum>> transmittedPowerSumD, ObjectList<ObjectList<Spectrum>> sensedIrradianceSumD, int[] idToGroup, ObjectList<ObjectList<RadiationModel.RayPoint>> rays, ObjectList<IntList> hitCounterSumD)
-
-
Method Details
-
compute
public abstract void compute(long rayCount, long seed, ProgressMonitor progress, int depth, double minPower) -
getHitCount
public int getHitCount(int volumeIndex) 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
-
getReceivedPower
Obtain the radiation power that was received by a volume.- Parameters:
volumeIndex
- index intoidToGroup
- Returns:
-
getTransmittedPower
Obtain the radiation power that was transmitted by a volume.- Parameters:
volumeIndex
- index intoidToGroup
- Returns:
-
getAbsorbedPower
Obtain the radiation power that was absorbed by a volume.- Parameters:
volumeIndex
- index intoidToGroup
- Returns:
-
getReflectedPower
Obtain the radiation power that was reflected by a volume.- Parameters:
volumeIndex
- index intoidToGroup
- Returns:
-
getSensedIrradiance
Obtain the irradiance that was sensed by a volume.- Parameters:
volumeIndex
- index intoidToGroup
- Returns:
-
getHitCountD
public int[] getHitCountD(int volumeIndex) 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
-
getReceivedPowerD
Obtain the radiation power that was received by a volume.- Parameters:
volumeIndex
- index intoidToGroup
- Returns:
-
getTransmittedPowerD
Obtain the radiation power that was transmitted by a volume.- Parameters:
volumeIndex
- index intoidToGroup
- Returns:
-
getAbsorbedPowerD
Obtain the radiation power that was absorbed by a volume.- Parameters:
volumeIndex
- index intoidToGroup
- Returns:
-
getReflectedPowerD
Obtain the radiation power that was reflected by a volume.- Parameters:
volumeIndex
- index intoidToGroup
- Returns:
-
getSensedIrradianceD
Obtain the irradiance that was sensed by a volume.- Parameters:
volumeIndex
- index intoidToGroup
- Returns:
-
getSensedIrradianceCollector
-
getAbsorbedPowerCollector
-
getTracedRays
-