|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vmm.ode.OrbitPoints3D
public class OrbitPoints3D
This class really just represents a list of 3D points that can be drawn as dots or a connected sequence of line segments. It is possible to add points and have those points show up in a View3D without redrawing the entire contents of the View. (The new points are just added to the existing bitmap in the View.) This class is meant for storing the points on the soltion curve of an ODE in three dimensions.
Field Summary | |
---|---|
static int |
DOTS
A constant fof selecting whether the points should be drawn as individual dots or should be connectined by lines. |
static int |
LINES
A constant fof selecting whether the points should be drawn as individual dots or should be connectined by lines. |
Constructor Summary | |
---|---|
OrbitPoints3D()
|
Method Summary | |
---|---|
boolean |
addNow(View3D view,
Vector3D pt)
Adds a point to the list, and show the new point in the specified view. |
boolean |
addNow(View3D view,
Vector3D[] pts)
Adds an array full of specified points to the list, and shows them in the specfied view. |
void |
addPoint(Vector3D pt)
Adds a specified point to the end of the list. |
void |
addPoints(Vector3D[] pts)
Adds all the points from an array to the curve by calling addPoint(Vector3D) for
each element in the array. |
void |
clear()
Removes all points from the list. |
void |
draw(java.awt.Graphics2D g,
View3D view,
Transform transform)
Draws the entire list of points. |
void |
drawPoint(View3D view,
int index)
Draws the point at the specified index, with a connecting line to the preceding point if appropriate. |
java.awt.Color |
getColor()
Get the color that will be used to draw the points. |
double |
getDotDiameter()
Returns the diameter of the dots that are used to draw points, when the draw style is DOTS . |
Vector3D |
getPoint(int i)
Gets the i-th point from the list. |
int |
getPointCount()
Returns the number of points currently in the list. |
int |
getStyle()
Get the style used to draw the points, either OrbitPoint3D.LINES or OrbitPoint3D.DOTS. |
void |
setColor(java.awt.Color color)
Set the color that will be used to draw the points. |
void |
setDotDiameter(double dotDiameter)
Sets diameter of the dots that are used to draw points, when the draw style is DOTS . |
void |
setStyle(int style)
Set the style used to draw the points, either OrbitPoint3D.LINES or OrbitPoint3D.DOTS. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LINES
public static final int DOTS
Constructor Detail |
---|
public OrbitPoints3D()
Method Detail |
---|
public int getPointCount()
public Vector3D getPoint(int i)
public java.awt.Color getColor()
public void setColor(java.awt.Color color)
public int getStyle()
public void setStyle(int style)
public double getDotDiameter()
DOTS
.
setDotDiameter(double)
public void setDotDiameter(double dotDiameter)
DOTS
. The diameter is specified in pixels. Values
less than 1 are quitely changed to 1.
public void clear()
public void addPoint(Vector3D pt)
addNow(View3D, Vector3D)
public void addPoints(Vector3D[] pts)
addPoint(Vector3D)
for
each element in the array. The value of pts must be non-null. A class that
uses this method should make sure that any View that contains the orbit is redrawn.
NOTE: Null values IN THE ARRAY will not cause an error. They will simply produce breaks in the curve.
addNow(View3D, Vector3D[])
public boolean addNow(View3D view, Vector3D pt)
view
- The view where the point is to immediately appear. If this is null, the
point is still added to the list, but no immediately visible changes are made.pt
- The point to be added. A null value is not an error; it will just cause a
gap in the curve.public boolean addNow(View3D view, Vector3D[] pts)
view
- The view where the point is to immediately appear. If this is null, the
point is still added to the list, but no immediately visible changes are made.pts
- The points to be added. The value must be non-null. A null value in this array
is not an error; it will just cause a gap in the curve.public void drawPoint(View3D view, int index)
public void draw(java.awt.Graphics2D g, View3D view, Transform transform)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |