Class ErioMetafile

java.lang.Object
  |
  +--Metafile
        |
        +--ErioMetafile
Direct Known Subclasses:
ErioMetafile2

public class ErioMetafile
extends Metafile

Represents Erio's 3D mesh metafile. File format:

3DInput = <Header><\n><Data><\n>END; <Header>= <Window><\n><View><\n><Mode>; <Window> = <xmin><tab><ymin><tab><xmax><tab><ymax>; <View> = <Position><tab><LookAt><tab><VUP>; <Position>:= <X value ><tab><Y value ><tab><Z value>; <LookAt> := <X value ><tab><Y value ><tab><Z value>; <VUP> := <X value ><tab><Y value ><tab><Z value>; <Mode> = <ViewMode><tab><RenderMode>; <ViewMode> = "PERSPEKTIF" | " PARALLEL" <RenderMode> = "WIREFRAME" <Data> = <Object><\n>+; <Object> = <Name><tab><Type><\n><data>; <Type> = "MESH" | "TRANSFORMATION" | "COORSYS"; untuk "MESH" <data> =<PolHead><\n><Point><\n>+<Polygon><\n>+ <PolHead> = <CoorName><tab><numberOfPoint><tab><numberOfPolygon> | <numberOfPoint><tab><numberOfPolygon>; <CoorName> = Coordinat Name, jika tidak ada gunakan RealWorld; <Point> = <X><tab><Y><tab><Z> <Polygon> = <num of Point in Polygon><tab><PointIndex>+ untuk "TRANSFORMATION" <data> = <TransHead><\n><TransData>; <TransHead> = <number of Transformation> <TransData> = <Transformation><\n>+; <Transformation> = <TransformationType><tab><Tdata>; <TransformationType> = "TRANSLATE" | "ROTATEX | "ROTATEY" |"ROTATEZ" "SCALE" | "ALREADYDEFINE"; untuk "TRANSLATE" | "SCALE" <Tdata> = <X><tab><Y><tab><Z> untuk "ROTATEX" | ROTATEY | ROTATEZ <Tdata> = <Angle> ( in degree ) untuk "ALREADYDEFINE" <Tdata> = <transformation Name > untuk "COORSYS" <data> = <transformation Name >; Contoh : spasi == tab 0 0 300 300 0 0 0 100 100 100 0 1 0 PARALLEL WIREFRAME rotasi TRANSFORMATION 3 ROTATEX 30 ROTATEY 30 ROTATEZ 30 mix TRANSFORMATION 3 TRANSLATE 10 0 0 ALREADYDEFINE rotasi TRANSLATE -10 0 0 tempat COORSYS mix KOTAK MESH tempat 8 6 1 1 0 -1 1 0 -1 -1 0 1 -1 0 1 1 1 -1 1 1 -1 -1 1 1 -1 1 4 0 1 2 3 4 0 1 4 5 4 1 2 5 6 4 4 5 6 7 4 3 0 7 4 4 2 3 6 7 END

Author:
Sasmito Adibowo - 1299000029.

Fields inherited from class Metafile
boundaries, coorsys, lights, meshes, renderMode, RENDERMODE_FLAT, RENDERMODE_GOURAUD, RENDERMODE_PHONG, RENDERMODE_WIREFRAME, transformations, view, viewMode, VIEWMODE_PARALLEL, VIEWMODE_PERSPECT, viewPlane
 
Constructor Summary
ErioMetafile()
           
 
Method Summary
protected  void clear()
          Clears the contents of the object.
 void read(Reader in)
          reads an Erio's 3D metafile.
protected  void readCoorSys(LineNumberReader in, String name)
          Reads a COORSYS section from the metafile.
protected  void readHeader(LineNumberReader in)
          Reads header data.
protected  void readMesh(LineNumberReader in, String name)
          Reads a MESH section from the metafile.
protected  void readTransformation(LineNumberReader in, String name)
          Reads a TRANSFORMATION section in the metafile
 
Methods inherited from class Metafile
getCoorSys, getCoorSys, getLight, getLight, getMesh, getMesh, getRenderMode, getTransformation, getViewMode, getViewPlane, getWindowBoundaries, setCoorSys, setLight, setMesh, setTransformation
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

ErioMetafile

public ErioMetafile()
Method Detail

clear

protected void clear()
Clears the contents of the object.
Overrides:
clear in class Metafile

read

public void read(Reader in)
          throws IOException
reads an Erio's 3D metafile.
Overrides:
read in class Metafile
Parameters:
in - the metafile data.

readHeader

protected void readHeader(LineNumberReader in)
                   throws IOException
Reads header data.
Parameters:
in - the metafile data.

readMesh

protected void readMesh(LineNumberReader in,
                        String name)
                 throws IOException
Reads a MESH section from the metafile.
Parameters:
in - the stream input representing the metafile.
name - the name of the mesh.

readTransformation

protected void readTransformation(LineNumberReader in,
                                  String name)
                           throws IOException
Reads a TRANSFORMATION section in the metafile
Parameters:
in - the stream input representing the metafile.
name - the name of the transformation.

readCoorSys

protected void readCoorSys(LineNumberReader in,
                           String name)
                    throws IOException
Reads a COORSYS section from the metafile.
Parameters:
name - the name of the coordinate system.
in - the stream input.