com.esri.arcgis.analyst3d
Interface IScene

All Superinterfaces:
Serializable
All Known Implementing Classes:
Globe, Scene

public interface IScene
extends Serializable

Provides access to members that control the scene.

Example:

public void clearLayers(ILayer layer) throws IOException, AutomationException
{
IScene pScene;
ILayer pLayer;

//get IScene ......

pScene.clearLayers();
}

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.


Method Summary
 void addLayer(ILayer pLayer, boolean autoArrange)
          Adds a layer to the scene.
 void addLayers(IEnumLayer layers, boolean autoArrange)
          Adds multiple layers to the scene, optionally arranging them automatically.
 boolean applies(Object object)
          Indicates if the given object is supported by the scene.
 void clearLayers()
          Removes all layers from the scene.
 void clearSelection()
          Clears the scene's selection.
 void delayEvents(boolean delay)
          Used to batch operations together in order to minimize system notifications.
 void deleteLayer(ILayer layer)
          Deletes a layer from the scene.
 ILayer getActiveGraphicsLayer()
          The active graphics layer.
 IEnvelope getAreaOfInterest()
          The area of interest for the scene.
 IGraphicsLayer getBasicGraphicsLayer()
          The basic graphics layer.
 void getDefaultBackgroundColor(float[] red, float[] green, float[] blue)
          Returns the default background color.
 String getDescription()
          The description of the scene.
 double getExaggerationFactor()
          The vertical exaggeration of the scene.
 IEnvelope getExtent()
          The extent of the scene.
 ISelection getFeatureSelection()
          The scene's feature selection.
 ILayer getLayer(int index)
          The layer corresponding to a given index.
 int getLayerCount()
          The number of layers in the scene.
 IEnumLayer getLayers(IUID uid, boolean recursive)
          The layers in the scene of the type specified in the UID.
 String getName()
          The name of the scene.
 ISceneGraph getSceneGraph()
          The scene's scenegraph.
 int getSelectionCount()
          The number of selected features.
 ISpatialReference getSpatialReference()
          The spatial reference of the scene.
 void moveLayer(ILayer layer, int toIndex)
          Moves a layer to another position within the Table Of Contents.
 void proposeSpatialReference(ISpatialReference pProposedSR, boolean[] pbChanged)
          Proposes a spatial reference for the scene.
 void recalculateExtent()
          Forces the scene's extent to be recalculated.
 void selectByShape(IGeometry shape, ISelectionEnvironment env, boolean justOne)
          Selects features in the scene given a shape and an optional selection environment.
 void selectFeature(ILayer layer, IFeature pFeature)
          Selects a feature.
 void setActiveGraphicsLayerByRef(ILayer ppLayer)
          The active graphics layer.
 void setAreaOfInterest(IEnvelope aoi)
          The area of interest for the scene.
 void setDefaultBackgroundColor(float red, float green, float blue)
          Sets the default background color.
 void setDescription(String descr)
          The description of the scene.
 void setExaggerationFactor(double exaggerationFactor)
          The vertical exaggeration of the scene.
 void setFeatureSelectionByRef(ISelection selection)
          The scene's feature selection.
 void setName(String name)
          The name of the scene.
 void setSpatialReferenceByRef(ISpatialReference spatialRef)
          The spatial reference of the scene.
 void suggestExaggerationFactor(double aspectRatio, double[] exaggerationFactor)
          Returns the vertical exaggeration factor that achieves the aspect ratio for the scene's extent.
 

Method Detail

getExtent

IEnvelope getExtent()
                    throws IOException,
                           AutomationException
The extent of the scene.

Remarks

The returned envelope represents the extent of the scene in X, Y, and Z.

The ZMin and ZMax of the envelope take into consideration the 3D properties of the scene's layers (base heights, extrusion, etc.).

The ZMin and ZMax of the envelope do not take into consideration the scene's vertical exaggeration.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

suggestExaggerationFactor

void suggestExaggerationFactor(double aspectRatio,
                               double[] exaggerationFactor)
                               throws IOException,
                                      AutomationException
Returns the vertical exaggeration factor that achieves the aspect ratio for the scene's extent.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Parameters:
aspectRatio - The aspectRatio (in)
exaggerationFactor - The exaggerationFactor (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExaggerationFactor

double getExaggerationFactor()
                             throws IOException,
                                    AutomationException
The vertical exaggeration of the scene.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Returns:
The exaggerationFactor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setExaggerationFactor

void setExaggerationFactor(double exaggerationFactor)
                           throws IOException,
                                  AutomationException
The vertical exaggeration of the scene.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Parameters:
exaggerationFactor - The exaggerationFactor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

applies

boolean applies(Object object)
                throws IOException,
                       AutomationException
Indicates if the given object is supported by the scene.

Remarks

The Applies member is used to determine whether the passed Layer, DatasetName, or GxLayer is supported.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Parameters:
object - A reference to another Object (IUnknown) (in)
Returns:
The applies
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getName

String getName()
               throws IOException,
                      AutomationException
The name of the scene.

Remarks

The Name is in reference to the string displayed at the top of the Scene's table of contents (TOC). When setting a new name call ISxDocument.UpdateContents to refresh the TOC display so the new name becomes visible.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setName

void setName(String name)
             throws IOException,
                    AutomationException
The name of the scene.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDescription

String getDescription()
                      throws IOException,
                             AutomationException
The description of the scene.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Returns:
The descr
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDescription

void setDescription(String descr)
                    throws IOException,
                           AutomationException
The description of the scene.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Parameters:
descr - The descr (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAreaOfInterest

IEnvelope getAreaOfInterest()
                            throws IOException,
                                   AutomationException
The area of interest for the scene.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAreaOfInterest

void setAreaOfInterest(IEnvelope aoi)
                       throws IOException,
                              AutomationException
The area of interest for the scene.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Parameters:
aoi - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLayerCount

int getLayerCount()
                  throws IOException,
                         AutomationException
The number of layers in the scene.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Returns:
The pcLayers
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLayer

ILayer getLayer(int index)
                throws IOException,
                       AutomationException
The layer corresponding to a given index.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.carto.ILayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLayers

IEnumLayer getLayers(IUID uid,
                     boolean recursive)
                     throws IOException,
                            AutomationException
The layers in the scene of the type specified in the UID. If 'recursive' is true, includes layers in group layers.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Parameters:
uid - A reference to a com.esri.arcgis.system.IUID (in, optional, pass null if not required)
recursive - The recursive (in, optional, pass false if not required)
Returns:
A reference to a com.esri.arcgis.carto.IEnumLayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addLayer

void addLayer(ILayer pLayer,
              boolean autoArrange)
              throws IOException,
                     AutomationException
Adds a layer to the scene.

Remarks

The autoArrange parameter controls the ordering of the layers. If autoArrange is set to TRUE, the layer is added in the proper position as by its weight specified via ILayerPosition::LayerWeight. By default, this means that the layers are sorted by layer type - Annotation layers on top, followed by Point geometry layers, Polyline geometry layers, and at the bottom Polygon geometry layers.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Parameters:
pLayer - A reference to a com.esri.arcgis.carto.ILayer (in)
autoArrange - The autoArrange (in, optional, pass false if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addLayers

void addLayers(IEnumLayer layers,
               boolean autoArrange)
               throws IOException,
                      AutomationException
Adds multiple layers to the scene, optionally arranging them automatically.

Remarks

The autoArrange parameter controls the ordering of the layers. If autoArrange is set to TRUE, the layers are added in the proper position as by their weight specified via ILayerPosition::LayerWeight . By default, this means that the layers are sorted by layer type - Annotation layers on top, followed by Point geometry layers, Polyline geometry layers, and at the bottom Polygon geometry layers.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Parameters:
layers - A reference to a com.esri.arcgis.carto.IEnumLayer (in)
autoArrange - The autoArrange (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deleteLayer

void deleteLayer(ILayer layer)
                 throws IOException,
                        AutomationException
Deletes a layer from the scene.

Remarks


Example:

public void deleteLayer(ILayer layer) {
IScene pScene;      
ILayer pLayer;     
// get IScene ...    
if (pScene.LayerCount > 0) {
   pLayer = pScene.getLayer(0);        
   pScene.deleteLayer(pLayer);    
  }  
}

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

<PRE>

public void deleteLayer(ILayer layer) {

IScene pScene;

ILayer pLayer;

// get IScene ......

if (pScene.LayerCount > 0) {

pLayer = pScene.getLayer(0);

pScene.deleteLayer(pLayer);

}

}

</PRE>

Parameters:
layer - A reference to a com.esri.arcgis.carto.ILayer (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

moveLayer

void moveLayer(ILayer layer,
               int toIndex)
               throws IOException,
                      AutomationException
Moves a layer to another position within the Table Of Contents.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Parameters:
layer - A reference to a com.esri.arcgis.carto.ILayer (in)
toIndex - The toIndex (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clearLayers

void clearLayers()
                 throws IOException,
                        AutomationException
Removes all layers from the scene.

Example:

public void clearLayers(ILayer layer) throws IOException, AutomationException
{
IScene pScene;
ILayer pLayer;

//get IScene ......

pScene.clearLayers();
}

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

The following example shows how to remove all layers from the scene:

<PRE>

public void clearLayers(ILayer layer) throws IOException, AutomationException

{

IScene pScene;

ILayer pLayer;

//get IScene ......

pScene.clearLayers();

}

</PRE>

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSpatialReference

ISpatialReference getSpatialReference()
                                      throws IOException,
                                             AutomationException
The spatial reference of the scene.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.geometry.ISpatialReference
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSpatialReferenceByRef

void setSpatialReferenceByRef(ISpatialReference spatialRef)
                              throws IOException,
                                     AutomationException
The spatial reference of the scene.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Parameters:
spatialRef - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

proposeSpatialReference

void proposeSpatialReference(ISpatialReference pProposedSR,
                             boolean[] pbChanged)
                             throws IOException,
                                    AutomationException
Proposes a spatial reference for the scene.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Parameters:
pProposedSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
pbChanged - The pbChanged (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBasicGraphicsLayer

IGraphicsLayer getBasicGraphicsLayer()
                                     throws IOException,
                                            AutomationException
The basic graphics layer.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.carto.IGraphicsLayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getActiveGraphicsLayer

ILayer getActiveGraphicsLayer()
                              throws IOException,
                                     AutomationException
The active graphics layer. If no graphic layers exist, a basic memory graphics layer will be created.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.carto.ILayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setActiveGraphicsLayerByRef

void setActiveGraphicsLayerByRef(ILayer ppLayer)
                                 throws IOException,
                                        AutomationException
The active graphics layer. If no graphic layers exist, a basic memory graphics layer will be created.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Parameters:
ppLayer - A reference to a com.esri.arcgis.carto.ILayer (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

delayEvents

void delayEvents(boolean delay)
                 throws IOException,
                        AutomationException
Used to batch operations together in order to minimize system notifications.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Parameters:
delay - The delay (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSelectionCount

int getSelectionCount()
                      throws IOException,
                             AutomationException
The number of selected features.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

selectFeature

void selectFeature(ILayer layer,
                   IFeature pFeature)
                   throws IOException,
                          AutomationException
Selects a feature.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Parameters:
layer - A reference to a com.esri.arcgis.carto.ILayer (in)
pFeature - A reference to a com.esri.arcgis.geodatabase.IFeature (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clearSelection

void clearSelection()
                    throws IOException,
                           AutomationException
Clears the scene's selection.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFeatureSelection

ISelection getFeatureSelection()
                               throws IOException,
                                      AutomationException
The scene's feature selection.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.carto.ISelection
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFeatureSelectionByRef

void setFeatureSelectionByRef(ISelection selection)
                              throws IOException,
                                     AutomationException
The scene's feature selection.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Parameters:
selection - A reference to a com.esri.arcgis.carto.ISelection (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

selectByShape

void selectByShape(IGeometry shape,
                   ISelectionEnvironment env,
                   boolean justOne)
                   throws IOException,
                          AutomationException
Selects features in the scene given a shape and an optional selection environment.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Parameters:
shape - A reference to a com.esri.arcgis.geometry.IGeometry (in)
env - A reference to a com.esri.arcgis.carto.ISelectionEnvironment (in)
justOne - The justOne (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

recalculateExtent

void recalculateExtent()
                       throws IOException,
                              AutomationException
Forces the scene's extent to be recalculated.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSceneGraph

ISceneGraph getSceneGraph()
                          throws IOException,
                                 AutomationException
The scene's scenegraph.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.analyst3d.ISceneGraph
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDefaultBackgroundColor

void setDefaultBackgroundColor(float red,
                               float green,
                               float blue)
                               throws IOException,
                                      AutomationException
Sets the default background color.

Remarks

The values for the red, green, and blue components should fall between 0 and 1 inclusive. A value of 1 represents 100% saturation of that component.

The DefaultBackgroundColor is that used by new scenes. Only when a new scene is created will the color set here be used.

If you want to set the background color of the existing scene use ISceneGraph.SetBackgroundColor.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Parameters:
red - The red (in)
green - The green (in)
blue - The blue (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDefaultBackgroundColor

void getDefaultBackgroundColor(float[] red,
                               float[] green,
                               float[] blue)
                               throws IOException,
                                      AutomationException
Returns the default background color.

Remarks

The values for the red, green, and blue components will fall between 0 and 1 inclusive. A value of 1 represents 100% saturation of that component.

The DefaultBackgroundColor is that used by new scenes. It does not necessarilly indicate the background color of the current scene.

If you want to know the background color of the current scene use ISceneGraph.GetBackgroundColor.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Parameters:
red - The red (out: use single element array)
green - The green (out: use single element array)
blue - The blue (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.