|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.display3d.simple3d.Element org.opensourcephysics.display3d.simple3d.AbstractTile
public abstract class AbstractTile
This is the basic class for all Elements which consist of a sequence of 3D colored tiles: Ellipsoid, Cylinder, Box, ... A tile is basically a collection of rectangles. NOT YET FINISHED!!!!!
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.opensourcephysics.display3d.core.Element |
---|
Element.Loader |
Field Summary | |
---|---|
protected double[][][] |
corners
|
protected int |
numberOfTiles
|
Fields inherited from class org.opensourcephysics.display3d.simple3d.Element |
---|
targetPosition, targetSize |
Fields inherited from interface org.opensourcephysics.display3d.core.Element |
---|
TARGET_POSITION, TARGET_SIZE |
Constructor Summary | |
---|---|
AbstractTile()
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.opensourcephysics.display3d.simple3d.Element |
---|
addInteractionListener, getAxesMode, getDrawingPanel3D, 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int numberOfTiles
protected double[][][] corners
Constructor Detail |
---|
public AbstractTile()
Method Detail |
---|
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
- int
protected abstract void computeCorners()
protected void setCorners(double[][][] _data)
protected void projectPoints()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |