|
|||||||||
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.ElementTrail
public class ElementTrail
Title: ElementSegment
Description: A Segment using the painter's algorithm
Field Summary | |
---|---|
protected int |
datasetID
|
protected java.util.ArrayList<org.opensourcephysics.display3d.simple3d.ElementTrail.TrailPoint> |
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. |
java.lang.String[] |
getColumnNames()
The column names to be used in the data display tool |
double[][] |
getData2D()
Gets a 2D array of data. |
double[][][] |
getData3D()
Gets a 3D array of data. |
java.util.List<Data> |
getDataList()
Some Data objects (e.g., a Group) do not contain data, but a list of Data objects which do. |
java.util.ArrayList<Dataset> |
getDatasets()
Gets a list of OSP Datasets. |
void |
getExtrema(double[] min,
double[] max)
Returns the extreme points of a box that contains the element. |
java.awt.Color[] |
getFillColors()
Fill color to use for this data |
int |
getID()
Returns a unique identifier for this Data |
java.awt.Color[] |
getLineColors()
Line color to use for this data |
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 |
int |
getNumberOfPoints()
|
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 |
setGhostPoint(double[] _point,
boolean _connected)
Sets a temporary point that is displayed as the last point of the trail but is not meant to be a permanent part of the trail. |
void |
setID(int id)
Sets the ID number of this Data |
void |
setMaximumPoints(int maximum)
Sets the maximum number of points for the trail. |
void |
setXLabel(java.lang.String _label)
Sets the label of the X coordinate when the data is displayed in a table |
void |
setYLabel(java.lang.String _label)
Sets the label of the Y coordinate when the data is displayed in a table |
void |
setZLabel(java.lang.String _label)
Sets the label of the Z coordinate when the data is displayed in a table |
Methods inherited from class org.opensourcephysics.display3d.simple3d.Element |
---|
addInteractionListener, getAxesMode, getDrawingPanel3D, 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 |
---|
getDrawingPanel3D, 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 |
Methods inherited from interface org.opensourcephysics.display.Data |
---|
getName |
Field Detail |
---|
protected java.util.ArrayList<org.opensourcephysics.display3d.simple3d.ElementTrail.TrailPoint> list
protected int datasetID
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 setXLabel(java.lang.String _label)
ElementTrail
setXLabel
in interface ElementTrail
public void setYLabel(java.lang.String _label)
ElementTrail
setYLabel
in interface ElementTrail
public void setZLabel(java.lang.String _label)
ElementTrail
setZLabel
in interface ElementTrail
public int getNumberOfPoints()
public void setGhostPoint(double[] _point, boolean _connected)
ElementTrail
setGhostPoint
in interface ElementTrail
_point
- the double[3] data with the point. null if there is no such point_connected
- whether this point is connected to the previous onepublic 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 void setID(int id)
Data
setID
in interface Data
id
- the ID numberpublic int getID()
Data
getID
in interface Data
public double[][] getData2D()
Data
getData2D
in interface Data
public double[][][] getData3D()
Data
getData3D
in interface Data
public java.lang.String[] getColumnNames()
Data
getColumnNames
in interface Data
public java.awt.Color[] getLineColors()
Data
getLineColors
in interface Data
public java.awt.Color[] getFillColors()
Data
getFillColors
in interface Data
public java.util.List<Data> getDataList()
Data
getDataList
in interface Data
public java.util.ArrayList<Dataset> getDatasets()
Data
getDatasets
in interface Data
public static XML.ObjectLoader getLoader()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |