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
-
Field Summary
Modifier and TypeFieldDescriptionstatic final LightDistribution.Type
static final SCOType.Field
static final SCOType.Field
static final SCOType.Field
static final SCOType.Field
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Vector2f
cartesian2map
(Vector3f direction) double
getDensityAt
(Vector3f direction) double[][]
int
double[]
double
getPower()
int
getWidth()
static Vector3f
map2cartesian
(float r1, float r2) static void
map2cartesian
(Tuple3f out, float r1, float r2) double
map2direction
(Vector3f outDirection, Tuple2d inPoint) void
setDistribution
(double[][] lipdf) void
setDistributionEx
(double[][] lipdf) void
setPower
(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:
getManageableType
in interfaceManageable
-
getWidth
public int getWidth()- Specified by:
getWidth
in interfaceLightDistributionIF
-
getHeight
public int getHeight()- Specified by:
getHeight
in interfaceLightDistributionIF
-
getDistribution
public double[][] getDistribution()- Specified by:
getDistribution
in interfaceLightDistributionIF
-
getLinearCDF
public double[] getLinearCDF()- Specified by:
getLinearCDF
in interfaceLightDistributionIF
-
setDistribution
public void setDistribution(double[][] lipdf) - Specified by:
setDistribution
in interfaceLightDistributionIF
-
setDistributionEx
public void setDistributionEx(double[][] lipdf) - Specified by:
setDistributionEx
in interfaceLightDistributionIF
-
getPower
public double getPower()- Specified by:
getPower
in interfaceLightDistributionIF
-
setPower
public void setPower(double power) - Specified by:
setPower
in interfaceLightDistributionIF
-
getDensityAt
- Specified by:
getDensityAt
in interfaceLightDistributionIF
-
map2direction
- Specified by:
map2direction
in interfaceLightDistributionIF
-
map2cartesian
-
map2cartesian
-
cartesian2map
-