public final class ProjectedRaster extends Primitive implements IDisposable
Primitive
which projects
a Raster
onto
the terrain
or surface of the CentralBody
.
The ProjectedRaster
can also be used with RasterStream
and
ProjectionStream
to stream
video
and other raster data to a projection
that moves with time.Constructor and Description |
---|
ProjectedRaster(CentralBody projectionCentralBody)
Initializes a new instance.
|
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.
|
Color |
getBorderColor()
Gets the color of the
Projection's border. |
float |
getBorderTranslucency()
Gets the translucency of the
Projection's border. |
float |
getBorderWidth()
Gets the width of the
Projection's border. |
Color |
getColor()
This method is not supported by ProjectedRaster.
|
BaseCollection<UnitCartesian> |
getDirections()
Gets the direction vectors in the projection's reference frame that define the
Projection's frustum. |
float |
getFarPlaneTranslucency()
Gets the translucency of the
Projection's far plane. |
Color |
getFrustumColor()
Gets the color of the
Projection's frustum. |
float |
getFrustumTranslucency()
Gets the translucency of the
Projection's frustum. |
Projection |
getProjection()
Gets the
Projection that projects
the raster. |
Raster |
getRaster()
Gets the
Raster that is
projected. |
ReferenceFrame |
getReferenceFrame()
Gets the reference frame that the
Projection
is defined in. |
ProjectedRasterRenderPass |
getRenderPass()
Gets the pass during which the projected raster is rendered.
|
Color |
getShadowColor()
Gets the color of projection shadows.
|
float |
getShadowTranslucency()
Gets the translucency of the projection shadows.
|
boolean |
getShowFarPlane()
Gets whether to show the far plane of the
Projection . |
boolean |
getShowFrustum()
Gets whether to show the frustum of the
Projection . |
boolean |
getShowShadows()
Gets whether to show shadows or not.
|
static boolean |
getSupported()
Gets whether or not the video card supports the
ProjectedRaster . |
float |
getTranslucency()
Gets the translucency of the
Projection . |
void |
setBorderColor(Color value)
Sets the color of the
Projection's border. |
void |
setBorderTranslucency(float value)
Sets the translucency of the
Projection's border. |
void |
setBorderWidth(float value)
Sets the width of the
Projection's border. |
void |
setColor(Color value)
This method is not supported by ProjectedRaster.
|
void |
setFarPlaneTranslucency(float value)
Sets the translucency of the
Projection's far plane. |
void |
setFrustumColor(Color value)
Sets the color of the
Projection's frustum. |
void |
setFrustumTranslucency(float value)
Sets the translucency of the
Projection's frustum. |
void |
setProjection(Projection value)
Sets the
Projection that projects
the raster. |
void |
setRaster(Raster value)
Sets the
Raster that is
projected. |
void |
setReferenceFrame(ReferenceFrame value)
Sets the reference frame that the
Projection
is defined in. |
void |
setRenderPass(ProjectedRasterRenderPass renderPass)
Sets the pass during which the projected raster is rendered.
|
void |
setShadowColor(Color value)
Sets the color of projection shadows.
|
void |
setShadowTranslucency(float value)
Sets the translucency of the projection shadows.
|
void |
setShowFarPlane(boolean value)
Sets whether to show the far plane of the
Projection . |
void |
setShowFrustum(boolean value)
Sets whether to show the frustum of the
Projection . |
void |
setShowShadows(boolean value)
Sets whether to show shadows or not.
|
void |
setTranslucency(float value)
Sets the translucency of the
Projection . |
dispose, getAutomaticallyComputeBoundingSphere, getBoundingSphere, getDisplay, getDisplayCondition, getTag, setAutomaticallyComputeBoundingSphere, setBoundingSphere, setDisplay, setDisplayCondition, setTag
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, dispose
public ProjectedRaster(CentralBody projectionCentralBody)
projectionCentralBody
- The central body that the raster will project onto.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 ReferenceFrame getReferenceFrame()
Projection
is defined in.getReferenceFrame
in class Primitive
ArgumentNullException
- ReferenceFrame
is null
.IllegalStateException
- Cannot modify ReferenceFrame
once the primitive is added to the
primitive manager or a composite primitive. Remove the primitive from
the manager or composite before modifying ReferenceFrame
.public void setReferenceFrame(ReferenceFrame value)
Projection
is defined in.setReferenceFrame
in class Primitive
ArgumentNullException
- ReferenceFrame
is null
.IllegalStateException
- Cannot modify ReferenceFrame
once the primitive is added to the
primitive manager or a composite primitive. Remove the primitive from
the manager or composite before modifying ReferenceFrame
.public final Projection getProjection()
Projection
that projects
the raster.
public final void setProjection(Projection value)
Projection
that projects
the raster.
public final boolean getShowFrustum()
Projection
.public final void setShowFrustum(boolean value)
Projection
.public final boolean getShowFarPlane()
Projection
.
If this is set to true, you will see the projected Raster
even when it does not intersect terrain or the central body.public final void setShowFarPlane(boolean value)
Projection
.
If this is set to true, you will see the projected Raster
even when it does not intersect terrain or the central body.public final boolean getShowShadows()
Raster
will only be projected onto parts of the terrain
visible from the Projection's
position.
When false, the Raster
will project onto any terrain inside the
Projection's
view frustum. Shadows are more
realistic, but are slower to render.public final void setShowShadows(boolean value)
Raster
will only be projected onto parts of the terrain
visible from the Projection's
position.
When false, the Raster
will project onto any terrain inside the
Projection's
view frustum. Shadows are more
realistic, but are slower to render.public Color getColor()
getColor
in class Primitive
UnsupportedOperationException
- This method is not supported by ProjectedRaster.public void setColor(Color value)
setColor
in class Primitive
UnsupportedOperationException
- This method is not supported by ProjectedRaster.public final Color getFrustumColor()
Projection's
frustum.public final void setFrustumColor(Color value)
Projection's
frustum.public final Color getShadowColor()
public final void setShadowColor(Color value)
public final Color getBorderColor()
Projection's
border.public final void setBorderColor(Color value)
Projection's
border.public final float getBorderWidth()
Projection's
border.public final void setBorderWidth(float value)
Projection's
border.public float getTranslucency()
Projection
.
Translucency
is between 0
and 1
,
where 0
is opaque and 1
is transparent.getTranslucency
in class Primitive
ArgumentOutOfRangeException
- Translucency
must be between 0
and 1
.public void setTranslucency(float value)
Projection
.
Translucency
is between 0
and 1
,
where 0
is opaque and 1
is transparent.setTranslucency
in class Primitive
ArgumentOutOfRangeException
- Translucency
must be between 0
and 1
.public final float getFrustumTranslucency()
Projection's
frustum.
Translucency
is between 0
and 1
,
where 0
is opaque and 1
is transparent.ArgumentOutOfRangeException
- Translucency
must be between 0
and 1
.public final void setFrustumTranslucency(float value)
Projection's
frustum.
Translucency
is between 0
and 1
,
where 0
is opaque and 1
is transparent.ArgumentOutOfRangeException
- Translucency
must be between 0
and 1
.public final float getFarPlaneTranslucency()
Projection's
far plane.
Translucency
is between 0
and 1
,
where 0
is opaque and 1
is transparent.ArgumentOutOfRangeException
- Translucency
must be between 0
and 1
.public final void setFarPlaneTranslucency(float value)
Projection's
far plane.
Translucency
is between 0
and 1
,
where 0
is opaque and 1
is transparent.ArgumentOutOfRangeException
- Translucency
must be between 0
and 1
.public final float getBorderTranslucency()
Projection's
border.
Translucency
is between 0
and 1
,
where 0
is opaque and 1
is transparent.ArgumentOutOfRangeException
- Translucency
must be between 0
and 1
.public final void setBorderTranslucency(float value)
Projection's
border.
Translucency
is between 0
and 1
,
where 0
is opaque and 1
is transparent.ArgumentOutOfRangeException
- Translucency
must be between 0
and 1
.public float getShadowTranslucency()
Translucency
is between 0
and 1
,
where 0
is opaque and 1
is transparent.ArgumentOutOfRangeException
- Translucency
must be between 0
and 1
.public void setShadowTranslucency(float value)
Translucency
is between 0
and 1
,
where 0
is opaque and 1
is transparent.ArgumentOutOfRangeException
- Translucency
must be between 0
and 1
.public final BaseCollection<UnitCartesian> getDirections()
Projection's
frustum.
The collection contains the direction vector down the center of the projection, and the bottom left, bottom right, upper right, and upper left corner direction vectors, in that order.
If no direction can be calculated, Cartesian.Zero is returned.public static final boolean getSupported()
ProjectedRaster
.true
if the video card supports ProjectedRaster
;
otherwise, false
.public final ProjectedRasterRenderPass getRenderPass()
RenderPass
is useful when trying to set the rendering order of a projected raster against other primitives in a
OrderedCompositePrimitive
. Ordering with SurfaceMeshPrimitive
requires a render pass of ProjectedRasterRenderPassCentralBodyClipped
.
Ordering against all other primitives requires a render pass of
ProjectedRasterRenderPassTranslucent
.UnsupportedCaseException
- RenderPass
must be a valid value in ProjectedRasterRenderPass
.public final void setRenderPass(ProjectedRasterRenderPass renderPass)
RenderPass
is useful when trying to set the rendering order of a projected raster against other primitives in a
OrderedCompositePrimitive
. Ordering with SurfaceMeshPrimitive
requires a render pass of ProjectedRasterRenderPassCentralBodyClipped
.
Ordering against all other primitives requires a render pass of
ProjectedRasterRenderPassTranslucent
.UnsupportedCaseException
- RenderPass
must be a valid value in ProjectedRasterRenderPass
.