public class VECCGeomReader extends AbstractGeomReader
GeomReader
for reading and writing vehicle geometry from/to a VECC (Viscous
Effects on Complex Configurations) MK5 formatted geometry file. This class can also
read the related VECC GEO file.
Modified by: Joseph A. Huwaldt
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EXTENSION |
MAYBE, NO, YES
Constructor and Description |
---|
VECCGeomReader() |
Modifier and Type | Method and Description |
---|---|
int |
canReadData(java.io.File inputFile)
Method that determines if this reader can read paneled geometry from the specified
input file.
|
boolean |
canWriteData()
Returns true.
|
java.lang.String |
getExtension()
Returns the preferred file extension (not including the ".") for files of this
GeomReader's type.
|
boolean |
isUnitAware()
Returns true if this reader is unit aware and false if it is not.
|
PointVehicle |
read(java.io.File inputFile)
Reads in a VECC MK5 or GEO geometry file from the specified input file and returns
a
PointVehicle object that contains the geometry from the file. |
java.lang.String |
toString()
Returns a string representation of the object.
|
void |
write(java.io.File outputFile,
GeometryList geometry)
Writes out a VECC MK5 geometry file for the geometry contained in the supplied
PointVehicle object. |
compareTo, getWarnings, setFileUnits
public static final java.lang.String EXTENSION
public VECCGeomReader()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getExtension()
public int canReadData(java.io.File inputFile) throws java.io.IOException
canReadData
in interface GeomReader
canReadData
in class AbstractGeomReader
inputFile
- The input file containing the geometry to be read in.java.io.IOException
- If there is a problem reading from the specified
file.public boolean canWriteData()
canWriteData
in interface GeomReader
canWriteData
in class AbstractGeomReader
public PointVehicle read(java.io.File inputFile) throws java.io.IOException
PointVehicle
object that contains the geometry from the file.read
in interface GeomReader
read
in class AbstractGeomReader
inputFile
- The input file containing the geometry to be read in. May not be
null.PointVehicle
object containing the geometry read in from the
file. If the file has no geometry in it, then this list will have no
components in it (will have a size() of zero).java.io.IOException
- If there is a problem reading the specified file.AbstractGeomReader.setFileUnits(javax.measure.unit.Unit)
public void write(java.io.File outputFile, GeometryList geometry) throws java.io.IOException
PointVehicle
object.write
in interface GeomReader
write
in class AbstractGeomReader
outputFile
- The output File to which the geometry is to be written. May not
be null.geometry
- The PointVehicle
object to be written out. May not be
null.java.io.IOException
- If there is a problem writing to the specified file.public boolean isUnitAware()
setFileUnits
to set the units being used before reading from a
file of GEO format. If "canReadData" is called with either a GEO or MK5 file before
calling this method, then this method will return the correct value.AbstractGeomReader.setFileUnits(javax.measure.unit.Unit)
,
canReadData(java.io.File)