Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## igeo.io
Class IObjFileExporter

    java.lang.Object
      igeo.io.IObjFileExporter

    public class IObjFileExporter

extends java.lang.Object

Wavefront OBJ file exporter class.

Field Summary
`protected int` | `curve2DNumber`
`protected java.text.NumberFormat` | `f`
`static int` | `maxColumn`
`protected int` | `normalVertexNumber`
`protected int` | `objectNumber`
`protected int` | `parametricVertexNumber`
`protected int` | `textureVertexNumber`
`protected java.util.HashMap<IVertex,int[]>` | `vertexMap`
`protected int` | `vertexNumber`

Constructor Summary
`IObjFileExporter()`

Method Summary
`static void` | `checkTrimLoopDirection(java.util.ArrayList<java.util.ArrayList<ITrimCurveI>> trimLoops, boolean isOuter)`
`void` | `init()`
`static boolean` | `write(java.io.File file, IServerI server)` Writing the content of server out to OBJ file.
`void` | `write(java.io.PrintStream ps, IServerI server)`
`static boolean` | `write(java.lang.String filename, IServerI server)` Writing the content of server out to OBJ file.
`void` | `writeCurve(java.io.PrintStream ps, ICurveI curve)` Exports a curve object.
`void` | `writeFace(java.io.PrintStream ps, IFace face)`
`void` | `writeMesh(java.io.PrintStream ps, IMeshI mesh)` Exports a polygon mesh object.
`void` | `writePoint(java.io.PrintStream ps, IVecI point)` Exports a point object.
`void` | `writeSurface(java.io.PrintStream ps, ISurfaceI surface)` Exports a surface object.
`void` | `writeTrimCurve(java.io.PrintStream ps, ITrimCurveI trimCurve)`
`void` | `writeVertex(java.io.PrintStream ps, IVertex vertex)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### maxColumn

    public static final int maxColumn

See Also:
  Constant Field Values

### vertexNumber

    protected int vertexNumber

### parametricVertexNumber

    protected int parametricVertexNumber

### textureVertexNumber

    protected int textureVertexNumber

### normalVertexNumber

    protected int normalVertexNumber

### objectNumber

    protected int objectNumber

### curve2DNumber

    protected int curve2DNumber

### f

    protected java.text.NumberFormat f

### vertexMap

    protected java.util.HashMap<IVertex,int[]> vertexMap

Constructor Detail

### IObjFileExporter

    public IObjFileExporter()

Method Detail

### init

    public void init()

### write

    public static boolean write(java.lang.String filename,
                                IServerI server)

  Writing the content of server out to OBJ file. The main entry of the exporter class.

  Parameters:
    `filename` - An exporting file name.
    `server` - A server interface containing exporting data.
  Returns:
    Boolean true if writing is successful. Otherwise false.

### write

    public static boolean write(java.io.File file,
                                IServerI server)

  Writing the content of server out to OBJ file. The main entry of the exporter class.

  Parameters:
    `file` - An exporting file object.
    `server` - A server interface containing exporting data.
  Returns:
    Boolean true if writing is successful. Otherwise false.

### write

    public void write(java.io.PrintStream ps,
                      IServerI server)

### writePoint

    public void writePoint(java.io.PrintStream ps,
                           IVecI point)

  Exports a point object. Because OBJ file doesn't have point object, a point is exported as a line with zero length.

  Parameters:
    `ps` - PrintStream to write out.
    `point` - Point object.

### writeCurve

    public void writeCurve(java.io.PrintStream ps,
                           ICurveI curve)

  Exports a curve object.

  Parameters:
    `ps` - PrintStream to write out.
    `curve` - Curve object.

### checkTrimLoopDirection

    public static void checkTrimLoopDirection(java.util.ArrayList<java.util.ArrayList<ITrimCurveI>> trimLoops,
                                              boolean isOuter)

### writeSurface

    public void writeSurface(java.io.PrintStream ps,
                             ISurfaceI surface)

  Exports a surface object.

  Parameters:
    `ps` - PrintStream to write out.
    `surface` - Surface object.

### writeTrimCurve

    public void writeTrimCurve(java.io.PrintStream ps,
                               ITrimCurveI trimCurve)

### writeMesh

    public void writeMesh(java.io.PrintStream ps,
                          IMeshI mesh)

  Exports a polygon mesh object.

  Parameters:
    `ps` - PrintStream to write out.
    `mesh` - Polygon mesh object.

### writeVertex

    public void writeVertex(java.io.PrintStream ps,
                            IVertex vertex)

### writeFace

    public void writeFace(java.io.PrintStream ps,
                          IFace face)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD