public final class Scene extends Object implements IDisposable
Scene
provides properties and functionality that are reflected in the
rendering of the Insight3D
control that it is associated with.
An Insight3D
control's Scene
is available from the
Insight3D.Scene
(get
) property. Any changes
that are made to a Scene
will only affect the rendering of the particular Insight3D
control it is associated with. The static SceneManager
class
provides global properties and functionality that apply to all Scenes
and thus affect
the rendering of every Insight3D
control. A
Scene
has a Camera
, and various properties for
changing the visual state of the scene and its CentralBodies
, including changes to Lighting
.
To render a particular Scene
, use the Render
method. To render all Scenes, use
use the SceneManager.Render
method.SceneManager
,
Insight3D
Modifier and Type | Method and Description |
---|---|
void |
addRendering(EventHandler<RenderingEventArgs> value)
Adds a handler for an event that is raised when either
Render is called on the scene or
SceneManager.render() is called on the
SceneManager . |
void |
dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting
unmanaged resources.
|
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.
|
AntiAliasing |
getAntiAliasing()
Gets the multisample anti-aliasing (MSAA) option for this scene.
|
Color |
getBackgroundColor()
Gets the background color of the scene.
|
Camera |
getCamera()
Gets the
Camera
associated with the scene, which affects the view that is rendered by the scene. |
CentralBodyGraphicsIndexer |
getCentralBodies()
Gets the
CentralBodyGraphics for a
specified CentralBody . |
Clouds |
getClouds()
Gets the
Clouds for the scene. |
double |
getFogDensity()
Gets the density of atmospheric fog drawn around the
CentralBody when
the Camera is close to the ground. |
SceneGlobeOverlaySettings |
getGlobeOverlaySettings()
Gets the
SceneGlobeOverlaySettings for the scene. |
Lighting |
getLighting()
Gets the
Lighting
associated with the scene. |
boolean |
getShadeSkyBasedOnAltitude()
Gets whether the sky will be shaded based on
Camera altitude. |
boolean |
getShowAtmosphere()
Gets whether the atmosphere will be drawn around the
CentralBody . |
boolean |
getShowStars()
Gets whether stars are shown or hidden in the scene.
|
boolean |
getShowSunshine()
Gets whether sunshine is rendered by the Sun
CentralBody . |
boolean |
getShowWaterSurface()
Gets whether water surface on earth is shown or hidden in the scene.
|
VisualEffects |
getVisualEffects()
Gets the
Visual Effects
associated with the scene. |
BaseCollection<PickResult> |
pick(int x,
int y)
Executes a pick at the given x, y and returns a depth sorted collection of
picked objects . |
BaseCollection<PickResult> |
pickRectangular(int left,
int bottom,
int right,
int top)
Executes a pick in the given rectangular region and returns a depth sorted collection of
picked objects . |
BaseCollection<ScreenOverlayPickResult> |
pickScreenOverlays(int x,
int y)
Executes a pick on
screen overlays at the given x, y
and returns a front to back sorted collection of picked overlays . |
void |
removeRendering(EventHandler<RenderingEventArgs> value)
Removes a handler for an event that is raised when either
Render is called on the scene or
SceneManager.render() is called on the
SceneManager . |
void |
render()
Renders the scene.
|
void |
setAntiAliasing(AntiAliasing antiAliasing)
Sets the multisample anti-aliasing (MSAA) option for this scene.
|
void |
setBackgroundColor(Color value)
Sets the background color of the scene.
|
void |
setFogDensity(double value)
Sets the density of atmospheric fog drawn around the
CentralBody when
the Camera is close to the ground. |
void |
setShadeSkyBasedOnAltitude(boolean value)
Sets whether the sky will be shaded based on
Camera altitude. |
void |
setShowAtmosphere(boolean value)
Sets whether the atmosphere will be drawn around the
CentralBody . |
void |
setShowStars(boolean value)
Sets whether stars are shown or hidden in the scene.
|
void |
setShowSunshine(boolean value)
Sets whether sunshine is rendered by the Sun
CentralBody . |
void |
setShowWaterSurface(boolean value)
Sets whether water surface on earth is shown or hidden in the scene.
|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
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 void dispose()
IDisposable
dispose
in interface IDisposable
protected void dispose(boolean disposing)
public final Camera getCamera()
Camera
associated with the scene, which affects the view that is rendered by the scene.public final VisualEffects getVisualEffects()
Visual Effects
associated with the scene.public final boolean getShowSunshine()
CentralBody
.
Sunshine renders a halo effect around the sun when it is viewed in the scene.public final void setShowSunshine(boolean value)
CentralBody
.
Sunshine renders a halo effect around the sun when it is viewed in the scene.public final CentralBodyGraphicsIndexer getCentralBodies()
CentralBodyGraphics
for a
specified CentralBody
.public final Color getBackgroundColor()
public final void setBackgroundColor(Color value)
public final boolean getShadeSkyBasedOnAltitude()
Camera
altitude.
When ShadeSkyBasedOnAltitude
is set to true, the sky
will become more blue as the Camera gets closer to the surface of the
CentralBody
.public final void setShadeSkyBasedOnAltitude(boolean value)
Camera
altitude.
When ShadeSkyBasedOnAltitude
is set to true, the sky
will become more blue as the Camera gets closer to the surface of the
CentralBody
.public final boolean getShowAtmosphere()
CentralBody
.public final void setShowAtmosphere(boolean value)
CentralBody
.public final double getFogDensity()
CentralBody
when
the Camera
is close to the ground.
Values range from 0 (no fog) to 1 (full fog).public final void setFogDensity(double value)
CentralBody
when
the Camera
is close to the ground.
Values range from 0 (no fog) to 1 (full fog).public final boolean getShowStars()
public final void setShowStars(boolean value)
public final SceneGlobeOverlaySettings getGlobeOverlaySettings()
SceneGlobeOverlaySettings
for the scene.public final boolean getShowWaterSurface()
public final void setShowWaterSurface(boolean value)
public final AntiAliasing getAntiAliasing()
public final void setAntiAliasing(AntiAliasing antiAliasing)
public void addRendering(EventHandler<RenderingEventArgs> value)
Render
is called on the scene or
SceneManager.render()
is called on the
SceneManager
.
The event occurs immediately prior to rendering the scene.value
- The event handler.public void removeRendering(EventHandler<RenderingEventArgs> value)
Render
is called on the scene or
SceneManager.render()
is called on the
SceneManager
.
The event occurs immediately prior to rendering the scene.value
- The event handler.public final void render()
SceneManager.Render
method.public final BaseCollection<PickResult> pick(int x, int y)
picked objects
.
The coordinate origin is top, left. To pick screen overlays
, use the
PickScreenOverlays
method.x
- The x coordinate of the Insight3D
control.y
- The y coordinate of the Insight3D
control.PickResults
public final BaseCollection<PickResult> pickRectangular(int left, int bottom, int right, int top)
picked objects
.
The coordinate origin is top, left. To pick screen overlays
, use the
PickScreenOverlays
method.left
- The left x coordinate of the rectangle in the Insight3D
control.bottom
- The bottom y coordinate of the rectangle in the Insight3D
control.right
- The right x coordinate of the rectangle in the Insight3D
control.top
- The top y coordinate of the rectangle in the Insight3D
control.PickResults
public final BaseCollection<ScreenOverlayPickResult> pickScreenOverlays(int x, int y)
screen overlays
at the given x, y
and returns a front to back sorted collection of picked overlays
.
The coordinate origin is top, left. To pick other objects in the scene,
use the Pick
method.x
- The x coordinate of the Insight3D
control.y
- The y coordinate of the Insight3D
control.ScreenOverlayPickResults.