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, setTag
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, dispose
public 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.Object
finalize
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 Object
Throwable
- the Exception
raised by this methodWeakReference
,
PhantomReference
public final boolean getLighting()
public final void setLighting(boolean value)
public final String getLabel()
DisplayLabel
,
DisplayMagnitude
,
DisplayRADec
public final void setLabel(String text)
DisplayLabel
,
DisplayMagnitude
,
DisplayRADec
public final boolean getDisplayLabel()
Label
,
DisplayMagnitude
,
DisplayRADec
public final void setDisplayLabel(boolean value)
Label
,
DisplayMagnitude
,
DisplayRADec
public final boolean getDisplayMagnitude()
DisplayLabel
,
Label
,
DisplayRADec
public final void setDisplayMagnitude(boolean value)
DisplayLabel
,
Label
,
DisplayRADec
public final boolean getDisplayRADec()
DisplayLabel
,
Label
,
DisplayMagnitude
public final void setDisplayRADec(boolean value)
DisplayLabel
,
Label
,
DisplayMagnitude
public final boolean getDisplayTrace()
DisplaySweep
,
DisplayLines
,
PersistenceWidth
,
FadePersistence
,
PersistenceDuration
public final void setDisplayTrace(boolean value)
DisplaySweep
,
DisplayLines
,
PersistenceWidth
,
FadePersistence
,
PersistenceDuration
public final boolean getDisplaySweep()
DisplayTrace
,
DisplayLines
,
FadePersistence
,
PersistenceDuration
public final void setDisplaySweep(boolean value)
DisplayTrace
,
DisplayLines
,
FadePersistence
,
PersistenceDuration
public final boolean getDisplayLines()
DisplayTrace
,
DisplaySweep
,
FadePersistence
,
PersistenceWidth
,
PersistenceDuration
public final void setDisplayLines(boolean value)
DisplayTrace
,
DisplaySweep
,
FadePersistence
,
PersistenceWidth
,
PersistenceDuration
public final double getPersistenceWidth()
DisplayTrace
,
DisplayLines
public final void setPersistenceWidth(double persistenceLineWidth)
DisplayTrace
,
DisplayLines
public final boolean getFadePersistence()
DisplayTrace
,
DisplaySweep
,
DisplayLines
,
PersistenceDuration
public final void setFadePersistence(boolean value)
DisplayTrace
,
DisplaySweep
,
DisplayLines
,
PersistenceDuration
public final double getPersistenceDuration()
DisplayTrace
,
DisplaySweep
,
DisplayLines
,
FadePersistence
public final void setPersistenceDuration(double value)
DisplayTrace
,
DisplaySweep
,
DisplayLines
,
FadePersistence
public final double getLength()
TrueScale
,
Width
public final void setLength(double length)
TrueScale
,
Width
public final double getWidth()
Length
public final void setWidth(double thickness)
Length
public final boolean getTrueScale()
Length
public final void setTrueScale(boolean value)
Length
public void setColor(Color value)
Primitive
public BoundingSphere getBoundingSphere()
Primitive
ReferenceFrame
.getBoundingSphere
in class Primitive
public void setDisplayCondition(DisplayCondition value)
Primitive
Display
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 Primitive
DisplayCondition
,
Display
public void setDisplay(boolean value)
Primitive
DisplayCondition
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 Primitive
PrimitiveManager
,
DisplayCondition
public void setTranslucency(float value)
Primitive
Translucency
is between 0
and 1
,
where 0
is opaque and 1
is transparent.setTranslucency
in class Primitive