showIsosurface
Class Isosurface

java.lang.Object
  extended by showIsosurface.Isosurface

public class Isosurface
extends java.lang.Object

The Isosurface class creates the Java3D objects necessary to display an isosurface. The details of the isosurface are loaded from a VRML file that contains an IndexedFaceSet. These points and indices are used to create an IndexedTriangleArray from which the Shape3D is constructed. Methods are provided to access and control the Java3D objects.

Version:
1.1
Author:
David N. Blauch

Constructor Summary
Isosurface()
          Do not use the default constructor.
Isosurface(java.net.URL url)
          Creates an Isosurface object based upon the contents of a VRML file.
 
Method Summary
 void destroy()
          Destroys all objects
 javax.media.j3d.IndexedTriangleArray getIndexedTriangleArray()
          Provides the IndexedTriangleArray object for the isosurface
 java.lang.String getInfo()
          Returns name, version, copyright, and author information about this class.
 int getNbrCoordinates()
          Provides the number of coordinates in the geometry array.
 int getNbrIndices()
          Provides the number of coordinate indices in the geometry array.
 javax.media.j3d.Shape3D getShape3D()
          Provides the Shape3D object for the isosurface
 void setColor(javax.vecmath.Color3f diffuseC)
          Sets the diffuse color of the isosurface
 void setColor(javax.vecmath.Color3f ambientC, javax.vecmath.Color3f diffuseC, javax.vecmath.Color3f emissiveC, javax.vecmath.Color3f specularC)
          Sets the color of the isosurface
 void setTransparency(float t)
          Sets the transparency of the isosurface
 void setVisible(boolean s)
          Determines whether the isosurface is visible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Isosurface

public Isosurface()
Do not use the default constructor.


Isosurface

public Isosurface(java.net.URL url)
           throws java.io.IOException
Creates an Isosurface object based upon the contents of a VRML file.

Parameters:
url - URL of the VRML file
Throws:
java.io.FileNotFoundException
java.io.IOException
Method Detail

destroy

public void destroy()
Destroys all objects


getInfo

public java.lang.String getInfo()
Returns name, version, copyright, and author information about this class.


getIndexedTriangleArray

public javax.media.j3d.IndexedTriangleArray getIndexedTriangleArray()
Provides the IndexedTriangleArray object for the isosurface

Returns:
IndexedTriangleArray object for the isosurface

getNbrCoordinates

public int getNbrCoordinates()
Provides the number of coordinates in the geometry array.

Returns:
Number of coordinates in the IndexedTriangleArray object

getNbrIndices

public int getNbrIndices()
Provides the number of coordinate indices in the geometry array.

Returns:
Number of indices in the IndexedTriangleArray

getShape3D

public javax.media.j3d.Shape3D getShape3D()
Provides the Shape3D object for the isosurface

Returns:
Shape3D object for the isosurface

setColor

public void setColor(javax.vecmath.Color3f ambientC,
                     javax.vecmath.Color3f diffuseC,
                     javax.vecmath.Color3f emissiveC,
                     javax.vecmath.Color3f specularC)
Sets the color of the isosurface

Parameters:
ambientC - ambient color
diffuseC - diffuse color
emissiveC - emissive color
specularC - specular color

setColor

public void setColor(javax.vecmath.Color3f diffuseC)
Sets the diffuse color of the isosurface

Parameters:
diffuseC - diffuse color

setTransparency

public void setTransparency(float t)
Sets the transparency of the isosurface

Parameters:
t - transparency

setVisible

public void setVisible(boolean s)
Determines whether the isosurface is visible

Parameters:
s - State for the visibility of the Shape3D object