JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart3d
Class SurfaceFacet

java.lang.Object
  |
  +--com.klg.jclass.chart3d.FacetAbstract
        |
        +--com.klg.jclass.chart3d.SurfaceFacet
All Implemented Interfaces:
Facet, Serializable

public class SurfaceFacet
extends FacetAbstract

Draws facets for charts of type surface.

See Also:
Serialized Form

Field Summary
protected  com.klg.jclass.chart3d.DrawFacet drawFacet
           
static int FP_0_CODE
           
static int FP_1_CODE
           
static int FP_2_CODE
           
static int FP_3_CODE
           
static int FP_A_CODE
           
static int FP_B_CODE
           
static int FP_C_CODE
           
static int FP_D_CODE
           
static int FP_H_CODE
           
static int FP_S_CODE
           
 
Fields inherited from class com.klg.jclass.chart3d.FacetAbstract
data, drawGrid, xPoints, yPoints
 
Constructor Summary
SurfaceFacet(com.klg.jclass.chart3d.DrawGrid drawGrid, com.klg.jclass.chart3d.DrawFacet drawFacet)
          Constructor that stores the parent DrawGrid object and sets the drawFacet.
 
Method Summary
protected  void drawBottomOfSkirt(int xBegin, int xEnd, int yBegin, int yEnd)
          Draws the portion of the skirt that is on the bottom of the cube (i.e.
protected  void drawCornerRegionFacet(com.klg.jclass.chart3d.ScreenPoint[] spts, int i, int j, int k, int l, int holeCode, int x, int y)
          Draws a facet that is in one of the four corner regions.
protected  void drawEdgeRegionFacet(com.klg.jclass.chart3d.ScreenPoint[] spts, int i, int j, int k, int l, int holeCode, int x, int y)
          Draws facets that are part of the four edge regions.
protected  void drawFacetFromScreenPoints(com.klg.jclass.chart3d.ScreenPoint[] spts, int holeCode, int x, int y)
          Setup integer arrays for drawing from a ScreenPoint array
protected  void drawSolid(com.klg.jclass.chart3d.GridRegion gridRegion)
          Draws the solid portion of the graph (if specified) by drawing the appropriate x and y skirt and finally the bottom of the skirt.
protected  void drawXSkirt(int y, int yp, int xBegin, int xEnd)
          Draws a skirt along the X axis.
protected  void drawYSkirt(int x, int xp, int yBegin, int yEnd)
          Draws a skirt along the Y axis.
protected  void dropSkirt(int x1, int y1, int x2, int y2)
          Draws interior skirt between (x1,y1) and (x2,y2)
protected  int isOdd(int i)
          Is the passed in parameter odd?
protected  com.klg.jclass.chart3d.ScreenPoint makeZMinPoint(int x, int y)
          Makes a point that is at the current gric point but has a z value that is at the z axis min.
protected  int neighbourTest(int fCode, int x, int y)
          Tests the neighbouring cells for holes which might affect the sides of this cell.
 void processFacet(int x, int y, int edges)
          Draws the facet for (x, y) based on the region passed in thru "edges".
protected  com.klg.jclass.chart3d.ScreenPoint quadCenter(int x, int y)
          Returns the screen point of the center point of the quad.
protected  boolean testSelfOcclude(long x1, long y1, long x2, long y2, long x3, long y3, long x4, long y4)
          Does this facet occlude itself?
 
Methods inherited from class com.klg.jclass.chart3d.FacetAbstract
fillPointArrays, getDrawGrid, getScreenPoint, setDrawGrid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FP_0_CODE

public static final int FP_0_CODE
See Also:
Constant Field Values

FP_1_CODE

public static final int FP_1_CODE
See Also:
Constant Field Values

FP_2_CODE

public static final int FP_2_CODE
See Also:
Constant Field Values

FP_3_CODE

public static final int FP_3_CODE
See Also:
Constant Field Values

FP_H_CODE

public static final int FP_H_CODE
See Also:
Constant Field Values

FP_A_CODE

public static final int FP_A_CODE
See Also:
Constant Field Values

FP_B_CODE

public static final int FP_B_CODE
See Also:
Constant Field Values

FP_C_CODE

public static final int FP_C_CODE
See Also:
Constant Field Values

FP_D_CODE

public static final int FP_D_CODE
See Also:
Constant Field Values

FP_S_CODE

public static final int FP_S_CODE
See Also:
Constant Field Values

drawFacet

protected com.klg.jclass.chart3d.DrawFacet drawFacet
Constructor Detail

SurfaceFacet

public SurfaceFacet(com.klg.jclass.chart3d.DrawGrid drawGrid,
                    com.klg.jclass.chart3d.DrawFacet drawFacet)
Constructor that stores the parent DrawGrid object and sets the drawFacet.

Parameters:
drawGrid - The parent DrawGrid object
drawFacet -
Method Detail

drawFacetFromScreenPoints

protected void drawFacetFromScreenPoints(com.klg.jclass.chart3d.ScreenPoint[] spts,
                                         int holeCode,
                                         int x,
                                         int y)
Setup integer arrays for drawing from a ScreenPoint array

Parameters:
spts -
holeCode -
x -
y -

processFacet

public void processFacet(int x,
                         int y,
                         int edges)
Draws the facet for (x, y) based on the region passed in thru "edges".

Specified by:
processFacet in interface Facet
Specified by:
processFacet in class FacetAbstract
Parameters:
x -
y -
edges -

isOdd

protected int isOdd(int i)
Is the passed in parameter odd?

Parameters:
i -

drawEdgeRegionFacet

protected void drawEdgeRegionFacet(com.klg.jclass.chart3d.ScreenPoint[] spts,
                                   int i,
                                   int j,
                                   int k,
                                   int l,
                                   int holeCode,
                                   int x,
                                   int y)
Draws facets that are part of the four edge regions.

Parameters:
spts -
i -
j -
k -
l -
holeCode -
x -
y -

drawCornerRegionFacet

protected void drawCornerRegionFacet(com.klg.jclass.chart3d.ScreenPoint[] spts,
                                     int i,
                                     int j,
                                     int k,
                                     int l,
                                     int holeCode,
                                     int x,
                                     int y)
Draws a facet that is in one of the four corner regions.

Parameters:
spts -
i -
j -
k -
l -
holeCode -
x -
y -

quadCenter

protected com.klg.jclass.chart3d.ScreenPoint quadCenter(int x,
                                                        int y)
Returns the screen point of the center point of the quad.

Parameters:
x -
y -

makeZMinPoint

protected com.klg.jclass.chart3d.ScreenPoint makeZMinPoint(int x,
                                                           int y)
Makes a point that is at the current gric point but has a z value that is at the z axis min. This is used for the bottom of the skirts.

Parameters:
x -
y -

testSelfOcclude

protected boolean testSelfOcclude(long x1,
                                  long y1,
                                  long x2,
                                  long y2,
                                  long x3,
                                  long y3,
                                  long x4,
                                  long y4)
Does this facet occlude itself?

Parameters:
x1 -
y1 -
x2 -
y2 -
x3 -
y3 -
x4 -
y4 -

neighbourTest

protected int neighbourTest(int fCode,
                            int x,
                            int y)
Tests the neighbouring cells for holes which might affect the sides of this cell. We don't want to draw cell walls (ha, ha) all by themselves.

Parameters:
fCode -
x -
y -

dropSkirt

protected void dropSkirt(int x1,
                         int y1,
                         int x2,
                         int y2)
Draws interior skirt between (x1,y1) and (x2,y2)

Parameters:
x1 -
y1 -
x2 -
y2 -

drawXSkirt

protected void drawXSkirt(int y,
                          int yp,
                          int xBegin,
                          int xEnd)
Draws a skirt along the X axis.

Parameters:
y -
yp -
xBegin -
xEnd -

drawYSkirt

protected void drawYSkirt(int x,
                          int xp,
                          int yBegin,
                          int yEnd)
Draws a skirt along the Y axis.

Parameters:
x -
xp -
yBegin -
yEnd -

drawBottomOfSkirt

protected void drawBottomOfSkirt(int xBegin,
                                 int xEnd,
                                 int yBegin,
                                 int yEnd)
Draws the portion of the skirt that is on the bottom of the cube (i.e. at the z axis min).

Parameters:
xBegin -
xEnd -
yBegin -
yEnd -

drawSolid

protected void drawSolid(com.klg.jclass.chart3d.GridRegion gridRegion)
Draws the solid portion of the graph (if specified) by drawing the appropriate x and y skirt and finally the bottom of the skirt. Note that skirts for holes are drawn separately.

Parameters:
gridRegion -

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