edu.illinois.ncsa.versus.adapter.impl
Class MeshAdapter

java.lang.Object
  extended by edu.illinois.ncsa.versus.adapter.impl.MeshAdapter
All Implemented Interfaces:
Adapter, FileLoader, HasFaces, HasMesh, HasVertices

public class MeshAdapter
extends java.lang.Object
implements HasVertices, HasFaces, HasMesh, FileLoader

Adapter for NCSA 3DUtilities Mesh class.

Author:
Kenton McHenry

Field Summary
private static org.apache.commons.logging.Log log
           
private  edu.ncsa.model.Mesh mesh
           
 
Constructor Summary
MeshAdapter()
           
MeshAdapter(edu.ncsa.model.Mesh mesh)
          Adapter for NCSA 3DUtilities Mesh.
 
Method Summary
 int[] getFace(int index)
          Get one face at a time.
 java.util.Vector<int[]> getFaces()
          Get faces.
 edu.ncsa.model.Mesh getMesh()
          Get the mesh.
 java.lang.String getName()
          Pretty name of adapter.
 double[] getVertex(int index)
          Get one vertex at a time.
 java.util.Vector<double[]> getVertices()
          Get vertices.
 void load(java.io.File file)
          Load a file from disk in the data structure specific to the adapter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mesh

private edu.ncsa.model.Mesh mesh

log

private static org.apache.commons.logging.Log log
Constructor Detail

MeshAdapter

public MeshAdapter()

MeshAdapter

public MeshAdapter(edu.ncsa.model.Mesh mesh)
Adapter for NCSA 3DUtilities Mesh.

Parameters:
image -
Method Detail

getName

public java.lang.String getName()
Description copied from interface: Adapter
Pretty name of adapter.

Specified by:
getName in interface Adapter
Returns:
pretty name

getVertices

public java.util.Vector<double[]> getVertices()
Description copied from interface: HasVertices
Get vertices.

Specified by:
getVertices in interface HasVertices
Returns:
a collection of vertices

getVertex

public double[] getVertex(int index)
Description copied from interface: HasVertices
Get one vertex at a time.

Specified by:
getVertex in interface HasVertices
Parameters:
index - the index of the vertex
Returns:
the vertex at the given index

getFaces

public java.util.Vector<int[]> getFaces()
Description copied from interface: HasFaces
Get faces.

Specified by:
getFaces in interface HasFaces
Returns:
a collection of faces referencing vertices.

getFace

public int[] getFace(int index)
Description copied from interface: HasFaces
Get one face at a time.

Specified by:
getFace in interface HasFaces
Parameters:
index - the index of the face
Returns:
the face at the given index

getMesh

public edu.ncsa.model.Mesh getMesh()
Description copied from interface: HasMesh
Get the mesh.

Specified by:
getMesh in interface HasMesh
Returns:
a mesh

load

public void load(java.io.File file)
          throws java.io.IOException
Description copied from interface: FileLoader
Load a file from disk in the data structure specific to the adapter.

Specified by:
load in interface FileLoader
Parameters:
file - file to load
Throws:
java.io.IOException