public class ElementTrail extends Element implements ElementTrail
Title: ElementSegment
Description: A Segment using the painter's algorithm
Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList |
list |
targetPosition, targetSize
TARGET_POSITION, TARGET_SIZE
Constructor and Description |
---|
ElementTrail() |
Modifier and Type | Method and Description |
---|---|
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)
Returns the extreme points of a box that contains the element.
|
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.
|
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
addInteractionListener, getInteractionTarget, removeInteractionListener
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)
Element
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()