|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IScene
Provides access to members that control the scene.
public void clearLayers(ILayer layer) throws IOException, AutomationException
{
IScene pScene;
ILayer pLayer;//get IScene ......
pScene.clearLayers();
}
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 |
---|
IEnvelope getExtent() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void suggestExaggerationFactor(double aspectRatio, double[] exaggerationFactor) throws IOException, AutomationException
aspectRatio
- The aspectRatio (in)exaggerationFactor
- The exaggerationFactor (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.double getExaggerationFactor() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setExaggerationFactor(double exaggerationFactor) throws IOException, AutomationException
exaggerationFactor
- The exaggerationFactor (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean applies(Object object) throws IOException, AutomationException
The Applies member is used to determine whether the passed Layer, DatasetName, or GxLayer is supported.
object
- A reference to another Object (IUnknown) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.String getName() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setName(String name) throws IOException, AutomationException
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.String getDescription() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setDescription(String descr) throws IOException, AutomationException
descr
- The descr (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IEnvelope getAreaOfInterest() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setAreaOfInterest(IEnvelope aoi) throws IOException, AutomationException
aoi
- A reference to a com.esri.arcgis.geometry.IEnvelope (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getLayerCount() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ILayer getLayer(int index) throws IOException, AutomationException
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IEnumLayer getLayers(IUID uid, boolean recursive) throws IOException, AutomationException
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addLayer(ILayer pLayer, boolean autoArrange) throws IOException, AutomationException
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.
pLayer
- A reference to a com.esri.arcgis.carto.ILayer (in)autoArrange
- The autoArrange (in, optional, pass false if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addLayers(IEnumLayer layers, boolean autoArrange) throws IOException, AutomationException
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.
layers
- A reference to a com.esri.arcgis.carto.IEnumLayer (in)autoArrange
- The autoArrange (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void deleteLayer(ILayer layer) throws IOException, AutomationException
public void deleteLayer(ILayer layer) {
IScene pScene;
ILayer pLayer;
// get IScene ...
if (pScene.LayerCount > 0) {
pLayer = pScene.getLayer(0);
pScene.deleteLayer(pLayer);
}
}
<PRE>
public void deleteLayer(ILayer layer) {
IScene pScene;
ILayer pLayer;
// get IScene ......
if (pScene.LayerCount > 0) {
pLayer = pScene.getLayer(0);
pScene.deleteLayer(pLayer);
}
}
</PRE>
layer
- A reference to a com.esri.arcgis.carto.ILayer (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void moveLayer(ILayer layer, int toIndex) throws IOException, AutomationException
layer
- A reference to a com.esri.arcgis.carto.ILayer (in)toIndex
- The toIndex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void clearLayers() throws IOException, AutomationException
public void clearLayers(ILayer layer) throws IOException, AutomationException
{
IScene pScene;
ILayer pLayer;//get IScene ......
pScene.clearLayers();
}
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>
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISpatialReference getSpatialReference() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setSpatialReferenceByRef(ISpatialReference spatialRef) throws IOException, AutomationException
spatialRef
- A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void proposeSpatialReference(ISpatialReference pProposedSR, boolean[] pbChanged) throws IOException, AutomationException
pProposedSR
- A reference to a com.esri.arcgis.geometry.ISpatialReference (in)pbChanged
- The pbChanged (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IGraphicsLayer getBasicGraphicsLayer() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ILayer getActiveGraphicsLayer() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setActiveGraphicsLayerByRef(ILayer ppLayer) throws IOException, AutomationException
ppLayer
- A reference to a com.esri.arcgis.carto.ILayer (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void delayEvents(boolean delay) throws IOException, AutomationException
delay
- The delay (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getSelectionCount() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void selectFeature(ILayer layer, IFeature pFeature) throws IOException, AutomationException
layer
- A reference to a com.esri.arcgis.carto.ILayer (in)pFeature
- A reference to a com.esri.arcgis.geodatabase.IFeature (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void clearSelection() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISelection getFeatureSelection() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setFeatureSelectionByRef(ISelection selection) throws IOException, AutomationException
selection
- A reference to a com.esri.arcgis.carto.ISelection (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void selectByShape(IGeometry shape, ISelectionEnvironment env, boolean justOne) throws IOException, AutomationException
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void recalculateExtent() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISceneGraph getSceneGraph() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setDefaultBackgroundColor(float red, float green, float blue) throws IOException, AutomationException
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.
red
- The red (in)green
- The green (in)blue
- The blue (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void getDefaultBackgroundColor(float[] red, float[] green, float[] blue) throws IOException, AutomationException
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.
red
- The red (out: use single element array)green
- The green (out: use single element array)blue
- The blue (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |