All Packages This Package Class Hierarchy Class Search Index
java.lang.Object | +----jkp.geometry.mesh.BasicMesh
| Summary |
public class BasicMesh
extends java.lang.Object
{
// Fields 36
public static final double DOUBLEFUDGE;
public static final int EAST;
public static final int MODEMANDEL;
public static final int MODENONE;
public static final int MODETERRAIN;
public static final int NORTH;
public static final int SOUTH;
public static final int TRIDONE;
public static final int TRIDONW;
public static final int TRIDOSE;
public static final int TRIDOSW;
public static final int TRIE;
public static final int TRIN;
public static final int TRINE;
public static final int TRINONE;
public static final int TRINW;
public static final int TRIPOINT;
public static final int TRIS;
public static final int TRISE;
public static final int TRISW;
public static final int TRIW;
public static final int WEST;
public GridPoint center;
protected static double debugseamtolerance;
public BasicMesh e;
public BasicMesh fareast;
public BasicMesh farnorth;
public BasicMesh farsouth;
public BasicMesh farwest;
protected Grid meshgrid;
public BasicMesh n;
public BasicMesh s;
public int triflags;
protected static boolean verbose;
protected static final boolean verify;
public BasicMesh w;
// Constructors 3
public BasicMesh();
public BasicMesh(Grid);
public BasicMesh(BasicMesh);
// Methods 20
public static final String directionString(int);
public static final int fixGridSize(int);
public static final String flagString(int);
public static final boolean getVerbose();
public static final boolean isGridSizeValid(int);
public static final void setVerbose(boolean);
public static final boolean testFlag(int, int);
protected final boolean checkFlags();
protected final int countFlags();
public final int countTriangles();
protected final boolean flagError(int);
public final int getFlags();
public final Grid getGrid();
public final GridPoint getGridPoint();
public final BasicMesh getMesh(int);
public final GridPoint getPoint(int);
protected final boolean onGrid(Grid, int, int, int, int);
public final void paint(Graphics, Component);
public final boolean testFlag(int);
public final String toString();
}
| Cross Reference |
| Fields |
· DOUBLEFUDGE | Summary | Top |
public static final double DOUBLEFUDGE
A small double for floating point imprecisions.
· EAST | Summary | Top |
public static final int EAST
Heading east from parent mesh.
· MODEMANDEL | Summary | Top |
public static final int MODEMANDEL
Mandelbrot Set mode. Not used internally.
· MODENONE | Summary | Top |
public static final int MODENONE
Non-mode (mode hasn't been determined). Not used internally.
· MODETERRAIN | Summary | Top |
public static final int MODETERRAIN
Terrain elevation mode. Not used internally.
· NORTH | Summary | Top |
public static final int NORTH
Heading north from parent mesh.
· SOUTH | Summary | Top |
public static final int SOUTH
Heading south from parent mesh.
· TRIDONE | Summary | Top |
public static final int TRIDONE
The NorthEast triangle of this mesh is defined by its North and East submeshes.
· TRIDONW | Summary | Top |
public static final int TRIDONW
The NorthWest triangle of this mesh is defined by its North and West submeshes.
· TRIDOSE | Summary | Top |
public static final int TRIDOSE
The SouthEast triangle of this mesh is defined by its South and East submeshes.
· TRIDOSW | Summary | Top |
public static final int TRIDOSW
The SouthWest triangle of this mesh is defined by its South and West submeshes.
· TRIE | Summary | Top |
public static final int TRIE
Mesh contains a triangle to the East.
· TRIN | Summary | Top |
public static final int TRIN
Mesh contains a triangle to the North.
· TRINE | Summary | Top |
public static final int TRINE
Mesh contains a triangle to the NorthEast.
· TRINONE | Summary | Top |
public static final int TRINONE
Mesh has not been initialized.
· TRINW | Summary | Top |
public static final int TRINW
Mesh contains a triangle to the NorthWest.
· TRIPOINT | Summary | Top |
public static final int TRIPOINT
This mesh node represents a single point on the grid.
· TRIS | Summary | Top |
public static final int TRIS
Mesh contains a triangle to the South.
· TRISE | Summary | Top |
public static final int TRISE
Mesh contains a triangle to the SouthEast.
· TRISW | Summary | Top |
public static final int TRISW
Mesh contains a triangle to the SouthWest.
· TRIW | Summary | Top |
public static final int TRIW
Mesh contains a triangle to the West.
· WEST | Summary | Top |
public static final int WEST
Heading west from parent mesh.
· center | Summary | Top |
public GridPoint center
The point at the center of this mesh.
· debugseamtolerance | Summary | Top |
protected static double debugseamtolerance
For debugging seam fix.
· e | Summary | Top |
public BasicMesh e
Eastern submesh
· fareast | Summary | Top |
public BasicMesh fareast
The eastern most point in this mesh.
· farnorth | Summary | Top |
public BasicMesh farnorth
The northern most point in this mesh.
· farsouth | Summary | Top |
public BasicMesh farsouth
The southern most point in this mesh.
· farwest | Summary | Top |
public BasicMesh farwest
The western most point in this mesh.
· meshgrid | Summary | Top |
protected Grid meshgrid
quick reference to parent grid (for traversing)
· n | Summary | Top |
public BasicMesh n
Northern submesh
· s | Summary | Top |
public BasicMesh s
Southern submesh
· triflags | Summary | Top |
public int triflags
Flags representing the triangulation of this mesh.
· verbose | Summary | Top |
protected static boolean verbose
Print debug info?
· verify | Summary | Top |
protected static final boolean verify
Verify mesh? (for debug only)
· w | Summary | Top |
public BasicMesh w
Western submesh
| Constructors |
· BasicMesh | Summary | Top |
public BasicMesh()
Constructs a default (empty) BasicMesh.
· BasicMesh | Summary | Top |
public BasicMesh(Grid meshgrid)
Constructs a Mesh using the given grid.
Parameter Description meshgrid The grid to mesh/triangulate.
· BasicMesh | Summary | Top |
public BasicMesh(BasicMesh m)
Consructs a new BasicMesh given a preexisting BasicMesh.
Parameter Description m The mesh to copy.
| Methods |
· checkFlags | Summary | Top |
protected final boolean checkFlags()
Debug routine.
· countFlags | Summary | Top |
protected final int countFlags()
Determine how many complete triangle this mesh has.
- Returns:
- Number of triangles defined by this mesh.
· countTriangles | Summary | Top |
public final int countTriangles()
Count all triangles in the mesh and all submeshes.
- Returns:
- Total number of triangles in this mesh (including submeshes).
· directionString | Summary | Top |
public static final String directionString(int direction)
Return a string representing a direction.
Parameter Description direction The direction.
- Returns:
- The string representation.
· fixGridSize | Summary | Top |
public static final int fixGridSize(int gridsize)
Test and fix a given gridsize. If grid size == 1 + 2 ^ k, returns that. If grid size == 2 ^ k, return 1 + 2 ^ k (one larger). Otherwise, returns the largest value == 1 + 2 ^ k that is less than the grid size.
Parameter Description gridsize The suggested grid size.
- Returns:
- The repaired grid size.
· flagError | Summary | Top |
protected final boolean flagError(int tmpflag)
Debug routine.
· flagString | Summary | Top |
public static final String flagString(int flags)
Create a string representing a mesh's flags.
Parameter Description flags The mesh's flags.
- Returns:
- The string representation.
· getFlags | Summary | Top |
public final int getFlags()
Get this meshes flags.
- Returns:
- This meshes flags.
· getGrid | Summary | Top |
public final Grid getGrid()
Get the underlying grid for this mesh.
- Returns:
- The underlying grid for this mesh.
· getGridPoint | Summary | Top |
public final GridPoint getGridPoint()
Get the gridpoint at the center of this mesh.
- Returns:
- The center of this mesh.
· getMesh | Summary | Top |
public final BasicMesh getMesh(int dir)
Debug routine. Get the furthest submesh in a given direction.
Parameter Description dir Direction from this mesh for submesh.
- Returns:
- The extreme submesh (actually a point).
· getPoint | Summary | Top |
public final GridPoint getPoint(int dir)
Debug routine. Get the furthest point in a given direction.
Parameter Description dir Direction from this mesh for point.
- Returns:
- The extreme point.
· getVerbose | Summary | Top |
public static final boolean getVerbose()
Debug routine. Get the verbose mode.
- Returns:
- The verbose mode.
· isGridSizeValid | Summary | Top |
public static final boolean isGridSizeValid(int gridsize)
Test to see if a given grid size is valid for use by BasicMesh.
Parameter Description gridsize Grid size to test.
- Returns:
- true if gridsize == 1 + 2 ^ k, false otherwise.
· onGrid | Summary | Top |
protected final boolean onGrid(Grid terrain,
int ilo,
int ihi,
int jlo,
int jhi)
Test to see if the center of a set of row/column values is actually on the grid.
Parameter Description terrain The grid. ilo The min column. ihi The max column jlo The min row. jhi The max row.
- Returns:
- true if center is on the grid, false otherwise
· paint | Summary | Top |
public final void paint(Graphics g,
Component component)
Paint the flags for this mesh.
Parameter Description g The graphics context to paint to. component The component to paint on.
· setVerbose | Summary | Top |
public static final void setVerbose(boolean verbose)
Debug routine. Set the verbose mode.
Parameter Description verbose The verbose mode.
· testFlag | Summary | Top |
public final boolean testFlag(int flagcode)
Test this mesh's flags against a set of flags.
Parameter Description flagcode The flags to rest.
- Returns:
- true if any of the flags to be tested exist in this mesh's flags, false otherwise
· testFlag | Summary | Top |
public static final boolean testFlag(int flagcode,
int triflags)
Given a mesh's flags and a set of flags to test, test.
Parameter Description flagcode The flags to test. triflags A mesh's flag.
- Returns:
- true if any of the flags to be tested exist in the mesh's flags, false otherwise
· toString | Summary | Top |
public final String toString()
Creates a string representation of this mesh.
- Returns:
- The string representation of this mesh.
- Overrides:
- toString in class Object
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7