AGI STK Esri Display 11 Send comments on this topic.
GetRenderer Method (IAgEsri3dRendererFactory)
See Also  Example
SceneID
ID of the scene for which to retrieve the associated renderer.





Description

Get the renderer associated with the specified 3d scene.

Syntax

[Visual Basic .NET]
Public Function GetRenderer( _
   ByVal SceneID As Integer _
) As AgEsri3dRenderer

[C#]
public AgEsri3dRenderer GetRenderer(
int SceneID
);

[Managed C++]
public: AgEsri3dRenderer GetRenderer(
int SceneID
);

[Java]
public AgEsri3dRenderer getRenderer(
int SceneID
);

[Unmanaged C++]
public: HRESULT GetRenderer(
long SceneID,
AgEsri3dRenderer * ReturnValue
);

Parameters

SceneID
ID of the scene for which to retrieve the associated renderer.

Return Type

Returns the renderer that exposes the GIS capabilities for the specified scene.

Remarks

When used in a custom application, instantiate the factory in the User Interface thread, and then call this method passing in the identifier for the scene.

When used from automation, the factory first needs to be instantiated in the STK process using the CreateObject method on the STK application,  and then call this method passing in the identifier for the scene.

Example

Demonstrates how to retrieve the renderer for the first scene within a custom application embedding the STK/X globe control.
[C#] Copy Code
AgEsri3dRendererFactory f = new AgEsri3dRendererFactory(); 
AgEsri3dRenderer renderer = f.GetRenderer(1); 

Demonstrates how to retrieve the renderer for the specified scene from an external application automating STK.
[C#] Copy Code
public IAgEsri3dRenderer GetRenderer(int sceneId) 

    object app = Marshal.GetActiveObject("STK.Application"); 
 
    object[] args = new object[2]; 
    args[0] = "STKesriDisplay11.AgEsri3dRendererFactory"
    args[1] = ""
 
    object factoryObject = app.GetType().InvokeMember("CreateObject", BindingFlags.InvokeMethod, null, m_app, args); 
 
    AGI.STKesriDisplay.IAgEsri3dRendererFactory factory = factoryObject as AGI.STKesriDisplay.IAgEsri3dRendererFactory; 
    return factory.GetRenderer(sceneId); 
}

See Also

© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1