de.grogra.imp3d.objects
Class LightDistribution
java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.imp3d.objects.LightDistribution
- All Implemented Interfaces:
- Manageable, Shareable
- Direct Known Subclasses:
- LightDistributionResource
public class LightDistribution
- extends ShareableBase
- 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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
$TYPE
public static final LightDistribution.Type $TYPE
height$FIELD
public static final SCOType.Field height$FIELD
licdf$FIELD
public static final SCOType.Field licdf$FIELD
lipdf$FIELD
public static final SCOType.Field lipdf$FIELD
width$FIELD
public static final SCOType.Field width$FIELD
LightDistribution
public LightDistribution()
LightDistribution
public LightDistribution(double[][] lipdf)
cartesian2map
public static Vector2f cartesian2map(Vector3f direction)
getDensityAt
public double getDensityAt(Vector3f direction)
getDistribution
public double[][] getDistribution()
getHeight
public int getHeight()
getLinearCDF
public double[] getLinearCDF()
getManageableType
public ManageableType getManageableType()
getPower
public double getPower()
getWidth
public int getWidth()
map2cartesian
public static Vector3f map2cartesian(float r1,
float r2)
map2cartesian
public static void map2cartesian(Tuple3f out,
float r1,
float r2)
map2direction
public double map2direction(Vector3f outDirection,
Tuple2d inPoint)
setDistribution
public void setDistribution(double[][] lipdf)
setDistributionEx
public void setDistributionEx(double[][] lipdf)
setPower
public void setPower(double power)