idx3d
Class idx3d_Lightmap
java.lang.Object
idx3d.idx3d_Lightmap
public final class idx3d_Lightmap
- extends java.lang.Object
Lightmap for faster rendering, assuming static light sources.
- Version:
- 3.3 2006-02-22 Werner Randelshofer: Avoid unecessary object creation.
3.2 2003-12-18 Werner Randelshofer: Changed type of variable cos in
method rebuildLightMap from int to float. This greatly reduces band effects
of the specular map.
Added support for different resolutions. Dependency note: This change
also requires changes in class idx3d_Rasterizer.
|
Method Summary |
int |
getIndex(int nx,
int ny)
Returns an index in the diffuse or specular map for the specified
coordinates. |
void |
rebuildLightmap()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
idx3d_Lightmap
public idx3d_Lightmap(idx3d_Scene scene)
idx3d_Lightmap
public idx3d_Lightmap(idx3d_Scene scene,
int xResolution,
int yResolution)
- Creates a new light map of the specified horizontal and vertical
resolution.
The resolution must be a power of two.
getIndex
public int getIndex(int nx,
int ny)
- Returns an index in the diffuse or specular map for the specified
coordinates.
The coordinates are always given for a virtual map of size 2^24*2^24.
- Parameters:
nx - An value between -2^23 and +2^23.ny - A value between -2^23 and +2^23.
rebuildLightmap
public void rebuildLightmap()