jwo.landserf.gui3d
Class SurfNormals
java.lang.Object
|
+--jwo.landserf.gui3d.SurfNormals
- public class SurfNormals
- extends Object
Calculates the surface normals of a gridded array.
Adapted from Appendix F in the OpenGL Programming Guide
('the red book'), Neider, Davis and Woo (1993).
- Version:
- 1.8.0, 24th January, 1999.
- Author:
- Jo Wood
Method Summary |
static float[][][] |
findNormals(float[][] rast,
int nRows,
int nCols,
float zScale)
Finds the normals of a given raster surface. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SurfNormals
public SurfNormals()
findNormals
public static float[][][] findNormals(float[][] rast,
int nRows,
int nCols,
float zScale)
- Finds the normals of a given raster surface.
- Parameters:
rast
- Raster to calculate normals from.nRows
- Number of rows in the raster.nCols
- Number of columns in the raster.zScale
- Relative scale of z values in planimetric units.
- Returns:
- normal Matrix containing the 3 normal components for each raster cell.