jwo.landserf.gui3d
Class SurfNormals

java.lang.Object
  extended by 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:
2.3, 23rd November, 2003.
Author:
Jo Wood

Constructor Summary
SurfNormals()
           
 
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
 

Constructor Detail

SurfNormals

public SurfNormals()
Method Detail

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.


Copyright Jo Wood, 1996-2009, last modified, 17th April, 2009