public class WavefrontReader extends MeshReaderBase
Modifier and Type | Class and Description |
---|---|
static class |
WavefrontReader.Curve
A simple container class to hold all the info for a Wavefront curve
specification.
|
static class |
WavefrontReader.Surface
A simple container class to hold all the info for a Wavefront curve
specification.
|
Modifier and Type | Field and Description |
---|---|
static int |
BEZIER |
static int |
BMATRIX |
static int |
BSPLINE |
static int |
CARDINAL |
static java.lang.String |
DEFAULT_GROUP |
static int |
TAYLOR |
Constructor and Description |
---|
WavefrontReader(java.io.File file) |
WavefrontReader(java.io.Reader reader) |
WavefrontReader(ReaderTokenizer rtok) |
WavefrontReader(java.lang.String fileName) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
equals(java.lang.Object obj)
For testing ...
|
java.util.ArrayList<WavefrontReader.Curve> |
getCurveList() |
int[][] |
getFaceIndices() |
java.util.ArrayList<maspack.geometry.io.WavefrontReader.Face> |
getFaceList() |
int[][] |
getGlobalFaceIndicesAndVertices(java.util.ArrayList<Point3d> vtxList) |
int[][] |
getGlobalLineIndicesAndVertices(java.util.ArrayList<Point3d> vtxList) |
int[] |
getGlobalNormalIndicesAndVertices(java.util.ArrayList<Vector3d> nrmList) |
int[] |
getGlobalTextureIndicesAndVertices(java.util.ArrayList<Vector3d> vtxList) |
java.lang.String[] |
getGroupNames() |
RenderProps |
getGroupRenderProps(java.lang.String groupName) |
Vector4d[] |
getHomogeneousPoints() |
int[][] |
getLineIndices() |
java.util.ArrayList<maspack.geometry.io.WavefrontReader.Line> |
getLineList() |
int[][] |
getLocalFaceIndicesAndVertices(java.util.ArrayList<Point3d> vtxList) |
int[][] |
getLocalLineIndicesAndVertices(java.util.ArrayList<Point3d> vtxList) |
int[] |
getLocalNormalIndicesAndVertices(java.util.ArrayList<Vector3d> nrmList) |
int[] |
getLocalTextureIndicesAndVertices(java.util.ArrayList<Vector3d> vtxList) |
RenderProps |
getMaterial(java.lang.String matName) |
java.lang.String[] |
getMaterialNames() |
java.util.ArrayList<Vector3d> |
getNormalList() |
java.lang.String[] |
getPolyhedralGroupNames() |
java.lang.String[] |
getPolylineGroupNames() |
RenderProps |
getRenderProps() |
java.util.ArrayList<WavefrontReader.Surface> |
getSurfaceList() |
int[][] |
getTextureIndices() |
java.util.ArrayList<Vector3d> |
getTextureVertexList() |
java.util.ArrayList<Vector4d> |
getVertexList() |
int[][] |
getVertexNormalIndices() |
Vector3d[] |
getVertexNormals() |
Point3d[] |
getVertexPoints() |
boolean |
getZeroIndexed() |
boolean |
hasGroup(java.lang.String name) |
boolean |
isVerbose() |
void |
parse() |
static MeshBase |
read(java.io.File file) |
static MeshBase |
read(java.lang.String fileName) |
static PolygonalMesh |
readFromString(java.lang.String input) |
static PolygonalMesh |
readFromString(java.lang.String input,
boolean zeroIndexed) |
PolygonalMesh |
readMesh() |
MeshBase |
readMesh(MeshBase mesh) |
void |
setGroup(java.lang.String name) |
void |
setMesh(PointMesh mesh) |
void |
setMesh(PointMesh mesh,
java.lang.String groupName) |
void |
setMesh(PolygonalMesh mesh) |
void |
setMesh(PolygonalMesh mesh,
java.lang.String groupName) |
void |
setMesh(PolylineMesh mesh) |
void |
setMesh(PolylineMesh mesh,
java.lang.String groupName) |
void |
setParentPath(java.lang.String pathname) |
void |
setVerbose(boolean verb) |
void |
setZeroIndexed(boolean enable) |
java.lang.String |
toString()
For testing ...
|
close
public static final java.lang.String DEFAULT_GROUP
public static final int BEZIER
public static final int BMATRIX
public static final int BSPLINE
public static final int CARDINAL
public static final int TAYLOR
public WavefrontReader(ReaderTokenizer rtok)
public WavefrontReader(java.io.Reader reader)
public WavefrontReader(java.io.File file) throws java.io.IOException
java.io.IOException
public WavefrontReader(java.lang.String fileName) throws java.io.IOException
java.io.IOException
public boolean getZeroIndexed()
public void setZeroIndexed(boolean enable)
public boolean hasGroup(java.lang.String name)
public void setGroup(java.lang.String name)
public java.lang.String[] getPolyhedralGroupNames()
public java.lang.String[] getPolylineGroupNames()
public java.lang.String[] getGroupNames()
public void setParentPath(java.lang.String pathname)
public void clear()
public RenderProps getMaterial(java.lang.String matName)
public java.lang.String[] getMaterialNames()
public void parse() throws java.io.IOException
java.io.IOException
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public RenderProps getRenderProps()
public RenderProps getGroupRenderProps(java.lang.String groupName)
public int[][] getLocalFaceIndicesAndVertices(java.util.ArrayList<Point3d> vtxList) throws java.io.IOException
java.io.IOException
public int[][] getLocalLineIndicesAndVertices(java.util.ArrayList<Point3d> vtxList) throws java.io.IOException
java.io.IOException
public int[] getLocalNormalIndicesAndVertices(java.util.ArrayList<Vector3d> nrmList) throws java.io.IOException
java.io.IOException
public int[] getLocalTextureIndicesAndVertices(java.util.ArrayList<Vector3d> vtxList) throws java.io.IOException
java.io.IOException
public int[][] getGlobalFaceIndicesAndVertices(java.util.ArrayList<Point3d> vtxList) throws java.io.IOException
java.io.IOException
public int[][] getGlobalLineIndicesAndVertices(java.util.ArrayList<Point3d> vtxList) throws java.io.IOException
java.io.IOException
public int[] getGlobalNormalIndicesAndVertices(java.util.ArrayList<Vector3d> nrmList) throws java.io.IOException
java.io.IOException
public int[] getGlobalTextureIndicesAndVertices(java.util.ArrayList<Vector3d> vtxList) throws java.io.IOException
java.io.IOException
public Point3d[] getVertexPoints()
public Vector3d[] getVertexNormals()
public Vector4d[] getHomogeneousPoints()
public int[][] getFaceIndices()
public int[][] getLineIndices()
public int[][] getTextureIndices()
public int[][] getVertexNormalIndices()
public java.util.ArrayList<Vector4d> getVertexList()
public java.util.ArrayList<Vector3d> getTextureVertexList()
public java.util.ArrayList<Vector3d> getNormalList()
public java.util.ArrayList<maspack.geometry.io.WavefrontReader.Face> getFaceList()
public java.util.ArrayList<maspack.geometry.io.WavefrontReader.Line> getLineList()
public java.util.ArrayList<WavefrontReader.Curve> getCurveList()
public java.util.ArrayList<WavefrontReader.Surface> getSurfaceList()
public boolean isVerbose()
public void setVerbose(boolean verb)
public void setMesh(PolygonalMesh mesh) throws java.io.IOException
java.io.IOException
public void setMesh(PolygonalMesh mesh, java.lang.String groupName) throws java.io.IOException
java.io.IOException
public MeshBase readMesh(MeshBase mesh) throws java.io.IOException
java.io.IOException
public PolygonalMesh readMesh() throws java.io.IOException
readMesh
in class MeshReaderBase
java.io.IOException
public void setMesh(PointMesh mesh) throws java.io.IOException
java.io.IOException
public void setMesh(PointMesh mesh, java.lang.String groupName) throws java.io.IOException
java.io.IOException
public void setMesh(PolylineMesh mesh) throws java.io.IOException
java.io.IOException
public void setMesh(PolylineMesh mesh, java.lang.String groupName) throws java.io.IOException
java.io.IOException
public static MeshBase read(java.io.File file) throws java.io.IOException
java.io.IOException
public static MeshBase read(java.lang.String fileName) throws java.io.IOException
java.io.IOException
public static PolygonalMesh readFromString(java.lang.String input, boolean zeroIndexed)
public static PolygonalMesh readFromString(java.lang.String input)