JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart3d
Class ProcessGrid

java.lang.Object
  |
  +--com.klg.jclass.chart3d.ProcessGrid
All Implemented Interfaces:
Serializable

public class ProcessGrid
extends Object
implements Serializable

Class that controls the drawing order for a grid data set.

See Also:
Serialized Form

Field Summary
protected  com.klg.jclass.chart3d.DrawGrid drawGrid
          Parent DrawGrid object
protected  com.klg.jclass.chart3d.Facet facet
          The facet processing object
static int MAX_POINTS
          The max number of points to be drawn at one time during a fast mesh draw
 
Constructor Summary
ProcessGrid()
          Null constructor.
ProcessGrid(com.klg.jclass.chart3d.DrawGrid drawGrid)
          Constructor that specifies the parent DrawGrid object.
 
Method Summary
protected  void drawFastMesh(Graphics gc)
          Draws the mesh as fast as possible.
protected  void flushLines(com.klg.jclass.chart3d.ScreenPoint[] pts, int n, Graphics gc)
          Draws the list of lines represented by the given point list.
protected  com.klg.jclass.chart3d.DrawGrid getDrawGrid()
          Get the parent DrawGrid object
protected  com.klg.jclass.chart3d.Facet getFacet()
          Get the facet processing object
protected  void processGrid(int iFirst, int iLast, int iDelta, int jFirst, int jLast, int jDelta, int edges)
          Process the rectangular portion of the grid region defined by the first and last indices in either X major or Y major order.
 void processGridRegion(com.klg.jclass.chart3d.GridRegion gridRegion)
          Process facets in the grid based on the order specified by gridRegion (@see GridRegion).
protected  void processX(int j0, int iFirst, int iLast, int iDelta, int edges)
          Process an X range for a fixed Y grid value
protected  void processXY(int iFirst, int iLast, int iDelta, int jFirst, int jLast, int jDelta, int edges)
          Process the grid in X major order.
protected  void processY(int i0, int jFirst, int jLast, int jDelta, int edges)
          Process an Y range for a fixed X grid value
protected  void processYX(int iFirst, int iLast, int iDelta, int jFirst, int jLast, int jDelta, int edges)
          Process the grid in Y major order.
protected  void setDrawGrid(com.klg.jclass.chart3d.DrawGrid drawGrid)
          Set the parent DrawGrid object
 void setFacet(com.klg.jclass.chart3d.Facet facet)
          Set the facet processing object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_POINTS

public static final int MAX_POINTS
The max number of points to be drawn at one time during a fast mesh draw

See Also:
Constant Field Values

drawGrid

protected com.klg.jclass.chart3d.DrawGrid drawGrid
Parent DrawGrid object


facet

protected com.klg.jclass.chart3d.Facet facet
The facet processing object

Constructor Detail

ProcessGrid

public ProcessGrid()
Null constructor. Parent is null!


ProcessGrid

public ProcessGrid(com.klg.jclass.chart3d.DrawGrid drawGrid)
Constructor that specifies the parent DrawGrid object.

Parameters:
drawGrid - The parent DrawGrid object
Method Detail

getDrawGrid

protected com.klg.jclass.chart3d.DrawGrid getDrawGrid()
Get the parent DrawGrid object

Returns:
The current parent DrawGrid object

setDrawGrid

protected void setDrawGrid(com.klg.jclass.chart3d.DrawGrid drawGrid)
Set the parent DrawGrid object

Parameters:
drawGrid - The new parent DrawGrid object

getFacet

protected com.klg.jclass.chart3d.Facet getFacet()
Get the facet processing object

Returns:
The current facet processing object

setFacet

public void setFacet(com.klg.jclass.chart3d.Facet facet)
Set the facet processing object

Parameters:
facet - The new facet processing object

processGridRegion

public void processGridRegion(com.klg.jclass.chart3d.GridRegion gridRegion)
Process facets in the grid based on the order specified by gridRegion (@see GridRegion). Process the four corners first, then the four side strips, and then the center (the eye). Note that regions can be null which results in no facets being processed for that region. In fact, the entire grid could be one corner region.

Parameters:
gridRegion - The object which defines how the grid is split up into drawing regions.

processXY

protected void processXY(int iFirst,
                         int iLast,
                         int iDelta,
                         int jFirst,
                         int jLast,
                         int jDelta,
                         int edges)
Process the grid in X major order.

Parameters:
iFirst - The index of the first facet of the region in the X direction
iLast - The index of the last facet of the region in the X direction
iDelta - The X increment (could be 1 or -1)
jFirst - The index of the first facet of the region in the Y direction
jLast - The index of the last facet of the region in the Y direction
jDelta - The Y increment (could be 1 or -1)
edges - The grid region that the facet is in.

processYX

protected void processYX(int iFirst,
                         int iLast,
                         int iDelta,
                         int jFirst,
                         int jLast,
                         int jDelta,
                         int edges)
Process the grid in Y major order.

Parameters:
iFirst - The index of the first facet of the region in the X direction
iLast - The index of the last facet of the region in the X direction
iDelta - The X increment (could be 1 or -1)
jFirst - The index of the first facet of the region in the Y direction
jLast - The index of the last facet of the region in the Y direction
jDelta - The Y increment (could be 1 or -1)
edges - The grid region that the facet is in.

processGrid

protected void processGrid(int iFirst,
                           int iLast,
                           int iDelta,
                           int jFirst,
                           int jLast,
                           int jDelta,
                           int edges)
Process the rectangular portion of the grid region defined by the first and last indices in either X major or Y major order.

Parameters:
iFirst - The index of the first facet of the region in the X direction
iLast - The index of the last facet of the region in the X direction
iDelta - The X increment (could be 1 or -1)
jFirst - The index of the first facet of the region in the Y direction
jLast - The index of the last facet of the region in the Y direction
jDelta - The Y increment (could be 1 or -1)
edges - The grid region that the facet is in.

processX

protected void processX(int j0,
                        int iFirst,
                        int iLast,
                        int iDelta,
                        int edges)
Process an X range for a fixed Y grid value

Parameters:
j0 - The fixed X grid value
iFirst - The index of the first facet of the region in the X direction
iLast - The index of the last facet of the region in the X direction
iDelta - The X increment (could be 1 or -1)
edges - The grid region that the facet is in.

processY

protected void processY(int i0,
                        int jFirst,
                        int jLast,
                        int jDelta,
                        int edges)
Process an Y range for a fixed X grid value

Parameters:
i0 - The fixed X grid value
jFirst - The index of the first facet of the region in the Y direction
jLast - The index of the last facet of the region in the Y direction
jDelta - The Y increment (could be 1 or -1)
edges - The grid region that the facet is in.

flushLines

protected void flushLines(com.klg.jclass.chart3d.ScreenPoint[] pts,
                          int n,
                          Graphics gc)
Draws the list of lines represented by the given point list.

Parameters:
pts - The list of points
n - The number of points within the list to draw
gc - The graphics object used to draw

drawFastMesh

protected void drawFastMesh(Graphics gc)
Draws the mesh as fast as possible. The bottom and top mesh colors are the same, and hidden lines are being drawn, so we can just blast 'em!

Parameters:
gc - The graphics object used to draw

Copyright © 2004 Quest Software Inc..
All rights reserved.