java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.gpuflux.imp3d.objects.LightDistribution
- All Implemented Interfaces:
LightDistributionIF,Manageable,Shareable
- Direct Known Subclasses:
LightDistributionResource
- Author:
- Dietger van Antwerpen This object holds a discretized 2D light distribution over unit hemisphere It is used for computing the cumulative probability distribution for importance sampling The object uses the following mapping from 2D (u,v) coordinates in the discetized unit square [0,1]^2 to spherical coordinates (theta,phi) theta = u * PI phi = v * 2 * PI - PI
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LightDistribution.Typestatic final SCOType.Fieldstatic final SCOType.Fieldstatic final SCOType.Fieldstatic final SCOType.Field -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Vector2fcartesian2map(Vector3f direction) doublegetDensityAt(Vector3f direction) double[][]intdouble[]doublegetPower()intgetWidth()static Vector3fmap2cartesian(float r1, float r2) static voidmap2cartesian(Tuple3f out, float r1, float r2) doublemap2direction(Vector3f outDirection, Tuple2d inPoint) voidsetDistribution(double[][] lipdf) voidsetDistributionEx(double[][] lipdf) voidsetPower(double power) Methods inherited from class de.grogra.persistence.ShareableBase
addReference, appendReferencesTo, fieldModified, getProvider, getStamp, initProvider, manageableReadResolve, manageableWriteReplace, removeReference
-
Field Details
-
$TYPE
-
width$FIELD
-
height$FIELD
-
lipdf$FIELD
-
licdf$FIELD
-
-
Constructor Details
-
LightDistribution
public LightDistribution() -
LightDistribution
public LightDistribution(double[][] lipdf)
-
-
Method Details
-
getManageableType
- Specified by:
getManageableTypein interfaceManageable
-
getWidth
public int getWidth()- Specified by:
getWidthin interfaceLightDistributionIF
-
getHeight
public int getHeight()- Specified by:
getHeightin interfaceLightDistributionIF
-
getDistribution
public double[][] getDistribution()- Specified by:
getDistributionin interfaceLightDistributionIF
-
getLinearCDF
public double[] getLinearCDF()- Specified by:
getLinearCDFin interfaceLightDistributionIF
-
setDistribution
public void setDistribution(double[][] lipdf) - Specified by:
setDistributionin interfaceLightDistributionIF
-
setDistributionEx
public void setDistributionEx(double[][] lipdf) - Specified by:
setDistributionExin interfaceLightDistributionIF
-
getPower
public double getPower()- Specified by:
getPowerin interfaceLightDistributionIF
-
setPower
public void setPower(double power) - Specified by:
setPowerin interfaceLightDistributionIF
-
getDensityAt
- Specified by:
getDensityAtin interfaceLightDistributionIF
-
map2direction
- Specified by:
map2directionin interfaceLightDistributionIF
-
map2cartesian
-
map2cartesian
-
cartesian2map
-