|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.drawing3d.Element org.opensourcephysics.drawing3d.ElementTrail
public class ElementTrail
Title: ElementTrail
Description: A single (and simple) trail of 3D points
Nested Class Summary | |
---|---|
static class |
ElementTrail.TrailPoint
|
Field Summary | |
---|---|
static int |
LINE_CONNECTION
The next point will be connected to the previous one by a segment |
static int |
NO_CONNECTION
The next point will not be connected to the previous one |
Fields inherited from class org.opensourcephysics.drawing3d.Element |
---|
CHANGE_COLOR, CHANGE_GROUP, CHANGE_INTERACTION_POINTS, CHANGE_NONE, CHANGE_POSITION, CHANGE_POSITION_AND_SIZE, CHANGE_PROJECTION, CHANGE_RESOLUTION, CHANGE_SHAPE, CHANGE_SIZE, CHANGE_TRANSFORMATION, CHANGE_VISIBILITY, STD_CENTERED_END, STD_CENTERED_ORIGIN, STD_END, STD_ORIGIN, TARGET_POSITION, TARGET_SIZE, TO_RADIANS, X_UNIT_VECTOR, Y_UNIT_VECTOR, Z_UNIT_VECTOR |
Constructor Summary | |
---|---|
ElementTrail()
|
Method Summary | |
---|---|
void |
addPoint(double[] _point)
|
void |
addPoint(double _x,
double _y,
double _z)
|
void |
addPoint(double _x,
double _y,
double _z,
int _type)
Adds a new point to the trace |
void |
addPoint(ElementTrail.TrailPoint trailPoint)
|
void |
clear()
Clears all points from the trail. |
void |
closeTrail(int _type)
Closes the trail by adding the ghost point, if not null |
java.lang.String[] |
getColumnNames()
The column names to be used in the data display tool |
double[] |
getData1D()
|
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. |
java.util.List<ElementTrail.TrailPoint> |
getDisplayPoints()
Returns the actual display points, including the ghost point, if any. |
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 |
int |
getMaximum()
|
void |
processChanges(int _cummulativeChange)
Process all the changes (usually prior to use them) Usually, visible elements will be asked to process changes |
void |
setGhostPoint(ElementTrail.TrailPoint _point)
Sets a temporary point used only for display, but that is not meant to stay in the trail |
void |
setID(int id)
Sets the ID number of this Data |
void |
setLabels(java.lang.String[] _labels)
|
void |
setMaximumPoints(int maximum)
Sets the maximum number of points for the trail. |
void |
setXLabel(java.lang.String _label)
|
void |
setYLabel(java.lang.String _label)
|
void |
setZLabel(java.lang.String _label)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.opensourcephysics.display.Data |
---|
getName |
Field Detail |
---|
public static final int NO_CONNECTION
public static final int LINE_CONNECTION
Constructor Detail |
---|
public ElementTrail()
Method Detail |
---|
public void setMaximumPoints(int maximum)
maximum
- intpublic void clear()
public void setLabels(java.lang.String[] _labels)
public void setXLabel(java.lang.String _label)
public void setYLabel(java.lang.String _label)
public void setZLabel(java.lang.String _label)
public void addPoint(double _x, double _y, double _z, int _type)
_x
- double The X coordinate of the new point_y
- double The Y coordinate of the new point_z
- double The Z coordinate of the new point_type
- int The type of connection. One of:
public void addPoint(double _x, double _y, double _z)
public void addPoint(double[] _point)
public void addPoint(ElementTrail.TrailPoint trailPoint)
public void setGhostPoint(ElementTrail.TrailPoint _point)
_point
- public void closeTrail(int _type)
public void processChanges(int _cummulativeChange)
Element
processChanges
in class Element
_cummulativeChange
- int the cummulativeChange produced by changes in parent groupspublic 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 java.util.List<ElementTrail.TrailPoint> getDisplayPoints()
public 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[] getData1D()
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 int getMaximum()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |