public class OrthonormalTessellator extends Tessellator
OrthonormalTessellator
checks that coordinates are lying on an orthormal grid,
and is able to provide a AbstractComposite
made of Polygon
s built according to this grid
On this model, one input coordinate is represented by one Polygon
, for which each point is
a mean point between two grid ticks:
^ ^
| |
- + + + - + + +
| | *---*
- + o + >> - + | o | +
| | *---*
- + + + - + + +
| |
|---|---|---|--> |---|---|---|-->
In this figure, the representation of a coordinate ("o" on the left) is a polygon
made of mean points ("*" on the right) that require the existence of four surrounding
points (the "o" and the three "+")Modifier and Type | Field and Description |
---|---|
protected int |
findxi |
protected int |
findyj |
protected float[] |
x |
protected float[] |
y |
protected float[][] |
z |
Constructor and Description |
---|
OrthonormalTessellator() |
Modifier and Type | Method and Description |
---|---|
AbstractComposite |
build(float[] x,
float[] y,
float[] z) |
protected boolean |
find(float[] x,
float[] y,
float vx,
float vy)
Search in a couple of array a combination of values vx and vy.
|
protected Point[] |
getEstimatedQuadSurroundingPoint(int xi,
int yi) |
protected Point[] |
getRealQuadStandingOnPoint(int xi,
int yi) |
List<AbstractDrawable> |
getSquarePolygonsAroundCoordinates() |
List<AbstractDrawable> |
getSquarePolygonsAroundCoordinates(ColorMapper cmap,
Color colorFactor) |
List<AbstractDrawable> |
getSquarePolygonsOnCoordinates() |
List<AbstractDrawable> |
getSquarePolygonsOnCoordinates(ColorMapper cmap,
Color colorFactor) |
protected AbstractDrawable |
newQuad(Point[] p) |
protected void |
setData(float[] x,
float[] y,
float[] z)
Set the array of data.
|
protected float[] |
unique(float[] data)
Compute a sorted array from input, with a unique occurrence of each value.
|
protected boolean |
validZ(Point p) |
protected boolean |
validZ(Point[] points) |
build
protected float[] x
protected float[] y
protected float[][] z
protected int findxi
protected int findyj
public AbstractComposite build(float[] x, float[] y, float[] z)
build
in class Tessellator
protected void setData(float[] x, float[] y, float[] z)
11111111 y
11111111
11o11111
11111111
x
x
- list of x coordinatesy
- list of y coordinatesz
- list of z coordinatesan
- IllegalArgumentException if x, y , and z have not the same sizeprotected float[] unique(float[] data)
data
- input array.protected boolean find(float[] x, float[] y, float vx, float vy)
public List<AbstractDrawable> getSquarePolygonsOnCoordinates()
public List<AbstractDrawable> getSquarePolygonsAroundCoordinates()
public List<AbstractDrawable> getSquarePolygonsOnCoordinates(ColorMapper cmap, Color colorFactor)
public List<AbstractDrawable> getSquarePolygonsAroundCoordinates(ColorMapper cmap, Color colorFactor)
protected Point[] getRealQuadStandingOnPoint(int xi, int yi)
protected Point[] getEstimatedQuadSurroundingPoint(int xi, int yi)
protected boolean validZ(Point[] points)
protected boolean validZ(Point p)
protected AbstractDrawable newQuad(Point[] p)
Copyright © 2016. All rights reserved.