de.grogra.ray2.photonmap
public class PhotonMap extends java.lang.Object
| Constructor and Description |
|---|
PhotonMap(double photonArea)
Creates a new Photon Map.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getEntryCount()
Returns the number of photon map entries.
|
void |
insertPhoton(Color3f col,
Point3d pos,
Vector3f dir)
Inserts a new Photon into this map.
|
void |
sumPhotons(Point3d point,
Vector3f normal,
Tuple3d color)
Calculates the color for the given point.
|
float |
traceRay(Intersection desc,
Tuple3d color)
This is only a debug function.
|
public PhotonMap(double photonArea)
photonArea - the scanning area.public int getEntryCount()
public void insertPhoton(Color3f col, Point3d pos, Vector3f dir)
col - The Photon color.pos - The Photon position.dir - The Photon impact direction.public void sumPhotons(Point3d point, Vector3f normal, Tuple3d color)
point - the impact point.normal - the impact normal vector.color - output - the calculated colorpublic float traceRay(Intersection desc, Tuple3d color)
desc - the intersection descriptioncolor - output - the calculated color