|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--Metafile
Abstract class which represents 3-D drawings defined by polygon meshes. Derived classes must minimally override the read() method to read the metafile data from a stream.
read(java.io.Reader)| Field Summary | |
protected WindowBoundaries |
boundaries
The window view coordinates. |
private Map |
coorsys
A set of named CoorSys objects in (String,CoorSys) pairs. |
private Map |
lights
A set of named Light objects in (String,Light) pairs. |
private Map |
meshes
A set of named Mesh objects in (String,Mesh) pairs. |
protected int |
renderMode
the rendering mode, one of RENDERMODE_xxx |
static int |
RENDERMODE_FLAT
Render constant-shade |
static int |
RENDERMODE_GOURAUD
Render Guraud |
static int |
RENDERMODE_PHONG
Render Phong |
static int |
RENDERMODE_WIREFRAME
Render wireframe |
private Map |
transformations
A set of named transformation objects in (String,Transformation) pairs |
protected ViewPlane |
view
The active viewplane. |
protected int |
viewMode
the view projection mode, one of VIEWMODE_xxx |
static int |
VIEWMODE_PARALLEL
Parallel viewing mode. |
static int |
VIEWMODE_PERSPECT
Perspective viewing mode. |
protected ViewPlane |
viewPlane
The view plane. |
| Constructor Summary | |
Metafile()
Constructs the metafile object. |
|
| Method Summary | |
protected void |
clear()
Clears the metafile data already in the object. |
Set |
getCoorSys()
Returns all of the names of the coordinate systems. |
CoorSys |
getCoorSys(String name)
Returns a coordinate system. |
Set |
getLight()
Returns all the names of the lights. |
Light |
getLight(String name)
Returns a Light. |
Set |
getMesh()
Returns all the names of the meshes. |
Mesh |
getMesh(String name)
Returns a mesh. |
int |
getRenderMode()
Returns the rendering mode, one of RENDERMODE_xxxx |
Transformation |
getTransformation(String name)
Returns a named transformation. |
int |
getViewMode()
Returns the viewing mode, one of VIEWMODE_xxxx |
ViewPlane |
getViewPlane()
Returns the view plane of the metafile |
WindowBoundaries |
getWindowBoundaries()
Returns the window boundaries as specified in the metafile. |
abstract void |
read(Reader in)
Reads metafile data into the object. |
void |
setCoorSys(String name,
CoorSys cs)
Sets a coordinate system into the metafile. |
void |
setLight(String name,
Light l)
Sets a light into the metafile. |
void |
setMesh(String name,
Mesh m)
Sets a mesh into the metafile. |
void |
setTransformation(String name,
Transformation t)
Sets a transformation into the metafile. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
protected ViewPlane viewPlane
private Map transformations
private Map lights
private Map meshes
private Map coorsys
protected WindowBoundaries boundaries
protected ViewPlane view
protected int viewMode
protected int renderMode
public static final int VIEWMODE_PERSPECT
public static final int VIEWMODE_PARALLEL
public static final int RENDERMODE_WIREFRAME
public static final int RENDERMODE_FLAT
public static final int RENDERMODE_GOURAUD
public static final int RENDERMODE_PHONG
| Constructor Detail |
public Metafile()
| Method Detail |
protected void clear()
public abstract void read(Reader in)
throws IOException
in - the metafile data file.public CoorSys getCoorSys(String name)
name - the name of the coordinate system.public Set getCoorSys()
public Mesh getMesh(String name)
name - the name of the mesh.public Set getMesh()
public Set getLight()
public Light getLight(String name)
name - the name of the light.public Transformation getTransformation(String name)
name - the name of the transformation.
public void setMesh(String name,
Mesh m)
name - the name of the mesh.m - the mesh object.
public void setTransformation(String name,
Transformation t)
name - the name of the transformationt - the transformation object.
public void setCoorSys(String name,
CoorSys cs)
name - the name of the coordinate system.cs - the coordinate system.
public void setLight(String name,
Light l)
name - the name of the mesh.l - the light object.public WindowBoundaries getWindowBoundaries()
public ViewPlane getViewPlane()
public int getViewMode()
public int getRenderMode()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||