public final class VectorPrimitive extends Primitive implements IDisposable
| Constructor and Description |
|---|
VectorPrimitive(ReferenceFrame sys,
Vector dir,
GraphicsFont font)
Initializes a vector primitive with the specified ISystem
sys as its source and pointing in direction dir. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
dispose(boolean disposing) |
protected void |
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
BoundingSphere |
getBoundingSphere()
Gets the bounding sphere that encompasses the primitive.
|
boolean |
getDisplayLabel()
Gets or Sets whether the vector's label is displayed.
|
boolean |
getDisplayLines()
Gets or Sets whether persistence lines are displayed.
|
boolean |
getDisplayMagnitude()
Gets or Sets whether the vector's magnitude is displayed.
|
boolean |
getDisplayRADec()
Gets or Sets whether the vector's RA-Dec is displayed.
|
boolean |
getDisplaySweep()
Gets or Sets whether the persistence sweep (triangles) is displayed.
|
boolean |
getDisplayTrace()
Gets or Sets whether the persistence trace (points) is displayed.
|
boolean |
getFadePersistence()
Gets or Sets whether the persistence path should fade over time.
|
String |
getLabel()
Gets or Sets the a user-defined label.
|
double |
getLength()
Gets or Sets the vector's source-to-arrow-tip length.
|
boolean |
getLighting()
Gets or Sets whether the primitive is lit.
|
double |
getPersistenceDuration()
Gets or Sets the maximum length (in seconds) of the persistence path.
|
double |
getPersistenceWidth()
Gets or Sets persistence point/line width.
|
boolean |
getTrueScale()
Gets or Sets whether vector's "true scale" length (based on how the primitive was created) should be used.
|
double |
getWidth()
Gets or Sets the vector's width in pixels.
|
void |
setColor(Color value)
Sets the primitive's color.
|
void |
setDisplay(boolean value)
Sets if the primitive should be
rendered.
|
void |
setDisplayCondition(DisplayCondition value)
Sets the display condition that determines if the primitive should be
rendered.
|
void |
setDisplayLabel(boolean value)
Gets or Sets whether the vector's label is displayed.
|
void |
setDisplayLines(boolean value)
Gets or Sets whether persistence lines are displayed.
|
void |
setDisplayMagnitude(boolean value)
Gets or Sets whether the vector's magnitude is displayed.
|
void |
setDisplayRADec(boolean value)
Gets or Sets whether the vector's RA-Dec is displayed.
|
void |
setDisplaySweep(boolean value)
Gets or Sets whether the persistence sweep (triangles) is displayed.
|
void |
setDisplayTrace(boolean value)
Gets or Sets whether the persistence trace (points) is displayed.
|
void |
setFadePersistence(boolean value)
Gets or Sets whether the persistence path should fade over time.
|
void |
setLabel(String text)
Gets or Sets the a user-defined label.
|
void |
setLength(double length)
Gets or Sets the vector's source-to-arrow-tip length.
|
void |
setLighting(boolean value)
Gets or Sets whether the primitive is lit.
|
void |
setPersistenceDuration(double value)
Gets or Sets the maximum length (in seconds) of the persistence path.
|
void |
setPersistenceWidth(double persistenceLineWidth)
Gets or Sets persistence point/line width.
|
void |
setTranslucency(float value)
Sets the primitive's translucency.
|
void |
setTrueScale(boolean value)
Gets or Sets whether vector's "true scale" length (based on how the primitive was created) should be used.
|
void |
setWidth(double thickness)
Gets or Sets the vector's width in pixels.
|
dispose, getAutomaticallyComputeBoundingSphere, getColor, getDisplay, getDisplayCondition, getReferenceFrame, getTag, getTranslucency, setAutomaticallyComputeBoundingSphere, setBoundingSphere, setReferenceFrame, setTagclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, disposepublic VectorPrimitive(ReferenceFrame sys, Vector dir, GraphicsFont font)
sys as its source and pointing in direction dir.
The primitive's properties are initialized to the following values:
agi.foundation.graphics.primitive.ReferenceFrame: sysagi.foundation.graphics.primitive.Translucency: 0.0f
Once the primitive is constructed, it must be added to
Primitives (get) before it will be rendered.
protected void finalize()
throws Throwable
java.lang.Objectfinalize method to dispose of
system resources or to perform other cleanup.
The general contract of finalize is that it is invoked
if and when the Java™ virtual
machine has determined that there is no longer any
means by which this object can be accessed by any thread that has
not yet died, except as a result of an action taken by the
finalization of some other object or class which is ready to be
finalized. The finalize method may take any action, including
making this object available again to other threads; the usual purpose
of finalize, however, is to perform cleanup actions before
the object is irrevocably discarded. For example, the finalize method
for an object that represents an input/output connection might perform
explicit I/O transactions to break the connection before the object is
permanently discarded.
The finalize method of class Object performs no
special action; it simply returns normally. Subclasses of
Object may override this definition.
The Java programming language does not guarantee which thread will
invoke the finalize method for any given object. It is
guaranteed, however, that the thread that invokes finalize will not
be holding any user-visible synchronization locks when finalize is
invoked. If an uncaught exception is thrown by the finalize method,
the exception is ignored and finalization of that object terminates.
After the finalize method has been invoked for an object, no
further action is taken until the Java virtual machine has again
determined that there is no longer any means by which this object can
be accessed by any thread that has not yet died, including possible
actions by other objects or classes which are ready to be finalized,
at which point the object may be discarded.
The finalize method is never invoked more than once by a Java
virtual machine for any given object.
Any exception thrown by the finalize method causes
the finalization of this object to be halted, but is otherwise
ignored.
finalize in class ObjectThrowable - the Exception raised by this methodWeakReference,
PhantomReferencepublic final boolean getLighting()
public final void setLighting(boolean value)
public final String getLabel()
DisplayLabel,
DisplayMagnitude,
DisplayRADecpublic final void setLabel(String text)
DisplayLabel,
DisplayMagnitude,
DisplayRADecpublic final boolean getDisplayLabel()
Label,
DisplayMagnitude,
DisplayRADecpublic final void setDisplayLabel(boolean value)
Label,
DisplayMagnitude,
DisplayRADecpublic final boolean getDisplayMagnitude()
DisplayLabel,
Label,
DisplayRADecpublic final void setDisplayMagnitude(boolean value)
DisplayLabel,
Label,
DisplayRADecpublic final boolean getDisplayRADec()
DisplayLabel,
Label,
DisplayMagnitudepublic final void setDisplayRADec(boolean value)
DisplayLabel,
Label,
DisplayMagnitudepublic final boolean getDisplayTrace()
DisplaySweep,
DisplayLines,
PersistenceWidth,
FadePersistence,
PersistenceDurationpublic final void setDisplayTrace(boolean value)
DisplaySweep,
DisplayLines,
PersistenceWidth,
FadePersistence,
PersistenceDurationpublic final boolean getDisplaySweep()
DisplayTrace,
DisplayLines,
FadePersistence,
PersistenceDurationpublic final void setDisplaySweep(boolean value)
DisplayTrace,
DisplayLines,
FadePersistence,
PersistenceDurationpublic final boolean getDisplayLines()
DisplayTrace,
DisplaySweep,
FadePersistence,
PersistenceWidth,
PersistenceDurationpublic final void setDisplayLines(boolean value)
DisplayTrace,
DisplaySweep,
FadePersistence,
PersistenceWidth,
PersistenceDurationpublic final double getPersistenceWidth()
DisplayTrace,
DisplayLinespublic final void setPersistenceWidth(double persistenceLineWidth)
DisplayTrace,
DisplayLinespublic final boolean getFadePersistence()
DisplayTrace,
DisplaySweep,
DisplayLines,
PersistenceDurationpublic final void setFadePersistence(boolean value)
DisplayTrace,
DisplaySweep,
DisplayLines,
PersistenceDurationpublic final double getPersistenceDuration()
DisplayTrace,
DisplaySweep,
DisplayLines,
FadePersistencepublic final void setPersistenceDuration(double value)
DisplayTrace,
DisplaySweep,
DisplayLines,
FadePersistencepublic final double getLength()
TrueScale,
Widthpublic final void setLength(double length)
TrueScale,
Widthpublic final double getWidth()
Lengthpublic final void setWidth(double thickness)
Lengthpublic final boolean getTrueScale()
Lengthpublic final void setTrueScale(boolean value)
Lengthpublic void setColor(Color value)
Primitivepublic BoundingSphere getBoundingSphere()
PrimitiveReferenceFrame.getBoundingSphere in class Primitivepublic void setDisplayCondition(DisplayCondition value)
PrimitiveDisplay must evaluate to true for
the primitive to be rendered.
When DisplayCondition is null, no display condition is
evaluated before the primitive is rendered.
setDisplayCondition in class PrimitiveDisplayCondition,
Displaypublic void setDisplay(boolean value)
PrimitiveDisplayCondition must evaluate to true for
the primitive to be rendered.
A primitive must be added to the
PrimitiveManager
before it is rendered. Once in the manager, setting this
property to false is more efficient than removing the primitive
from the manager. Although, it is recommended to remove the primitive
from the manager if the primitive will be hidden for a long period of time.
For more control over when a primitive is rendered, see DisplayCondition.
setDisplay in class PrimitivePrimitiveManager,
DisplayConditionpublic void setTranslucency(float value)
PrimitiveTranslucency is between 0 and 1,
where 0 is opaque and 1 is transparent.setTranslucency in class Primitive