public abstract class AbstractTile extends Element
Element.Loader
Modifier and Type | Field and Description |
---|---|
protected double[][][] |
corners |
protected int |
numberOfTiles |
targetPosition, targetSize
TARGET_POSITION, TARGET_SIZE
Constructor and Description |
---|
AbstractTile() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
computeCorners()
This will be used by subclasses whenever there is a need to recompute
the actual values of the corners before drawing.
|
double |
GetDisplacementFactor()
Gets the displacement factor
|
protected InteractionTarget |
getTargetHit(int x,
int y)
Gets the target that is under the (x,y) position of the screen
|
protected void |
projectPoints() |
void |
setColorBelowWhenEqual(boolean belowWhenEqual)
Whether a value equal to one of the thresholds should be drawn using the color
below or above
|
void |
setColorOriginAndDirection(double[] origin,
double[] direction)
Sets the origin and direction of the color change.
|
void |
setColorRegions(double[] thresholds,
java.awt.Color[] colors)
Set the levels and color for regional color separation
|
protected void |
setCorners(double[][][] _data) |
void |
setDisplacementFactor(double factor)
Sets an optional displacement factor to apply to the tiles when computing
their distance to the eye.
|
void |
setDrawQuickInterior(boolean draw,
int transparency)
Draw a transparent interior when in quickDraw mode.
|
addInteractionListener, getHotSpotBodyCoordinates, getInteractionTarget, getName, getSizeX, getSizeY, getSizeZ, getStyle, getTransformation, getX, getY, getZ, isReallyVisible, isVisible, loadUnmutableObjects, removeInteractionListener, setName, setSizeX, setSizeXYZ, setSizeXYZ, setSizeY, setSizeZ, setTransformation, setVisible, setX, setXYZ, setXYZ, setY, setZ, toBodyFrame, toSpaceFrame
public void setDisplacementFactor(double factor)
factor
- the desired displacement factorpublic double GetDisplacementFactor()
#setDisplacementFactor()
public void setDrawQuickInterior(boolean draw, int transparency)
draw
- the value desiredtransparency
- the desired level of transparency (from 0=fully transparent to 255=opaque)public void setColorBelowWhenEqual(boolean belowWhenEqual)
belowWhenEqual
- true to use the color below, false to use teh color abovepublic void setColorOriginAndDirection(double[] origin, double[] direction)
origin
- double[]direction
- double[]public void setColorRegions(double[] thresholds, java.awt.Color[] colors)
thresholds
- an array on n doubles that separate the n+1 regions.
null for no region separationcolors
- an array on n+1 colors, one for each of the regionsprotected InteractionTarget getTargetHit(int x, int y)
Element
getTargetHit
in class Element
x
- inty
- intprotected abstract void computeCorners()
protected void setCorners(double[][][] _data)
protected void projectPoints()