|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensourcephysics.display3d.simple3d.Element
org.opensourcephysics.display3d.simple3d.ElementTrail
Title: ElementSegment
Description: A Segment using the painter's algorithm
Field Summary | |
protected java.util.ArrayList |
list
|
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 | |
ElementTrail()
|
Method Summary | |
void |
addPoint(double[] point)
Adds a new double[] point to the trail. |
void |
addPoint(double x,
double y,
double z)
Adds a new (x,y,z) point to the trail. |
void |
clear()
Clears all points from the trail. |
void |
getExtrema(double[] min,
double[] max)
|
static XML.ObjectLoader |
getLoader()
Returns an XML.ObjectLoader to save and load object data. |
int |
getMaximumPoints()
Returns the maximum number of points allowed for the trail |
boolean |
isConnected()
Gets the connected flag. |
void |
moveToPoint(double x,
double y,
double z)
Starts a new (x,y,z) trail segment by moving to a new point without drawing. |
void |
setConnected(boolean connected)
Sets the connected flag. |
void |
setMaximumPoints(int maximum)
Sets the maximum number of points for the trail. |
Methods inherited from class org.opensourcephysics.display3d.simple3d.Element |
addInteractionListener, getHotSpotBodyCoordinates, getInteractionTarget, getName, getSizeX, getSizeY, getSizeZ, getStyle, getTargetHit, 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 |
Methods inherited from interface org.opensourcephysics.display3d.core.Element |
getName, getSizeX, getSizeY, getSizeZ, getStyle, getTransformation, getX, getY, getZ, isVisible, loadUnmutableObjects, setName, setSizeX, setSizeXYZ, setSizeXYZ, setSizeY, setSizeZ, setTransformation, setVisible, setX, setXYZ, setXYZ, setY, setZ, toBodyFrame, toSpaceFrame |
Methods inherited from interface org.opensourcephysics.display3d.core.interaction.InteractionSource |
addInteractionListener, getInteractionTarget, removeInteractionListener |
Field Detail |
protected java.util.ArrayList list
Constructor Detail |
public ElementTrail()
Method Detail |
public void addPoint(double x, double y, double z)
ElementTrail
addPoint
in interface ElementTrail
x
- doubley
- doublez
- doublepublic void addPoint(double[] point)
ElementTrail
addPoint
in interface ElementTrail
point
- double[] The array with the coordinates of the point.
If the length of the array is 2, the coordinates are asumed to be X
and Y (Z=0). If it is 3, then X, Y, and Z (as usual).public void moveToPoint(double x, double y, double z)
ElementTrail
moveToPoint
in interface ElementTrail
x
- doubley
- doublez
- doublepublic void setMaximumPoints(int maximum)
ElementTrail
setMaximumPoints
in interface ElementTrail
maximum
- intpublic int getMaximumPoints()
ElementTrail
getMaximumPoints
in interface ElementTrail
public void setConnected(boolean connected)
ElementTrail
setConnected
in interface ElementTrail
connected
- booleanpublic boolean isConnected()
ElementTrail
isConnected
in interface ElementTrail
ElementTrail.setConnected(boolean)
public void clear()
ElementTrail
clear
in interface ElementTrail
public void getExtrema(double[] min, double[] max)
min
- double[] A previously allocated double[3] array that will hold
the minimum pointmax
- double[] A previously allocated double[3] array that will hold
the maximum pointpublic static XML.ObjectLoader getLoader()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |