Class Mesh

java.lang.Object
  |
  +--Mesh

public class Mesh
extends java.lang.Object


Constructor Summary
Mesh(java.lang.String filename, int width, int height, int alpha)
          Constructor for creating a mesh object.
 
Method Summary
 void computeColors(int alpha)
          Compute the colors to be used for each data point.
static int depthToRGB(float depth, float minDepth, float maxDepth, int alpha)
          Convert a depth value to a normalized rgb value.
 float getMaximumDepth()
          Get the maximum depth.
 float getMinimumDepth()
          Get the minimum depth.
 void readData(java.lang.String filename)
          Read in the mesh depth data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mesh

public Mesh(java.lang.String filename,
            int width,
            int height,
            int alpha)
     throws java.io.IOException
Constructor for creating a mesh object.
Parameters:
filename - name of the file containg the depth data
width - the width of the depth matrix
height - the height of the depth matrix
Throws:
java.io.IOException - if the data cannot be read
Method Detail

readData

public void readData(java.lang.String filename)
              throws java.io.IOException
Read in the mesh depth data.
Parameters:
filename - the filename of the mesh data file
Throws:
java.io.IOException - if the data cannot be read

getMaximumDepth

public float getMaximumDepth()
Get the maximum depth.

getMinimumDepth

public float getMinimumDepth()
Get the minimum depth.

computeColors

public void computeColors(int alpha)
Compute the colors to be used for each data point.

depthToRGB

public static final int depthToRGB(float depth,
                                   float minDepth,
                                   float maxDepth,
                                   int alpha)
Convert a depth value to a normalized rgb value.
Parameters:
depth - the depth value
minDepth - the minimum depth value
maxDepth - the maximum depth value