Class ErioMetafile2

java.lang.Object
  |
  +--Metafile
        |
        +--ErioMetafile
              |
              +--ErioMetafile2

public class ErioMetafile2
extends ErioMetafile

Class to load the second version of Erio's 3D metafile.

Author:
Sasmito Adibowo - 1299000029

Field Summary
private static Map colorNames
          A set of (String,Color) pairs which contains the available named colors.
 
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
ErioMetafile2()
           
 
Method Summary
(package private) static void ()
           
static Color parseColor(String str)
          Translates a color string into a Color object.
 void read(Reader in)
          reads an Erio's 3D metafile.
protected  void readLight(LineNumberReader reader, String name)
          reads a LIGHT section from the metafile.
protected  void readMesh(LineNumberReader in, String name)
          Reads a MESH section from the metafile.
 
Methods inherited from class ErioMetafile
clear, readCoorSys, readHeader, readTransformation
 
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
 

Field Detail

colorNames

private static final Map colorNames
A set of (String,Color) pairs which contains the available named colors.
Constructor Detail

ErioMetafile2

public ErioMetafile2()
Method Detail

read

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

readLight

protected void readLight(LineNumberReader reader,
                         String name)
                  throws IOException
reads a LIGHT section from the metafile.

readMesh

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

parseColor

public static final Color parseColor(String str)
                              throws NumberFormatException
Translates a color string into a Color object.
Parameters:
str - the color string,case-insensitive. Must be in the #RRGGBB format or one of:
  • black
  • blue
  • cyan
  • darkgray
  • gray
  • green
  • lightgray
  • magenta
  • orange
  • pink
  • red
  • white
  • yellow
Returns:
the Color object.

static void ()