artisynth.core.femmodels
Class UCDReader

java.lang.Object
  extended by artisynth.core.femmodels.UCDReader

public class UCDReader
extends java.lang.Object

A class to read an FEM described as Unstructured Cell Data with a uniform density. The UCD data format is described in Appendix E of the AVS Developer's Guide.


Constructor Summary
UCDReader()
           
 
Method Summary
static void read(FemModel3d model, java.io.Reader reader, double density, Vector3d scale)
          Creates an FemModel with uniform density based on UCD data read from a Reader.
static void read(FemModel3d model, java.lang.String fileName, double density)
          Creates an FemModel with uniform density based on UCD data contained in a specified file.
static void read(FemModel3d model, java.lang.String fileName, double density, double scale)
          Creates an FemModel with uniform density based on UCD data contained in a specified file.
static void read(FemModel3d model, java.lang.String fileName, double density, Vector3d scale)
          Creates an FemModel with uniform density based on UCD data contained in a specified file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UCDReader

public UCDReader()
Method Detail

read

public static void read(FemModel3d model,
                        java.lang.String fileName,
                        double density)
                 throws java.io.IOException
Creates an FemModel with uniform density based on UCD data contained in a specified file.

Parameters:
model - FEM model to be populated by UCD data
fileName - path name of the UCD file
density - density of the model
Throws:
java.io.IOException - if this is a problem reading the file

read

public static void read(FemModel3d model,
                        java.lang.String fileName,
                        double density,
                        double scale)
                 throws java.io.IOException
Creates an FemModel with uniform density based on UCD data contained in a specified file. The node coordinate data is scaled by a scale factor.

Parameters:
model - FEM model to be populated by UCD data
fileName - path name of the UCD file
density - density of the model
scale - factor by which node coordinate data should be scaled
Throws:
java.io.IOException - if this is a problem reading the file

read

public static void read(FemModel3d model,
                        java.lang.String fileName,
                        double density,
                        Vector3d scale)
                 throws java.io.IOException
Creates an FemModel with uniform density based on UCD data contained in a specified file. The node coordinate data can be scaled non-uniformly using an optional parameter giving scale values about the x, y, and z axes.

Parameters:
model - FEM model to be populated by UCD data
fileName - path name of the UCD file
density - density of the model
scale - if non-null, gives scaling about the x, y, and z axes
Throws:
java.io.IOException - if this is a problem reading the file

read

public static void read(FemModel3d model,
                        java.io.Reader reader,
                        double density,
                        Vector3d scale)
                 throws java.io.IOException
Creates an FemModel with uniform density based on UCD data read from a Reader. The node coordinate data can be scaled non-uniformly using an optional parameter giving scale values about the x, y, and z axes.

Parameters:
model - FEM model to be populated by UCD data
reader - reader from which to read UCD data
density - density of the model
scale - if non-null, gives scaling about the x, y, and z axes
Throws:
java.io.IOException - if this is a problem reading the file