DXViewGet |
public SceneNode GetSceneNodeForWpfObject( Object wpfObject )
GetSceneNodeForWpfObject returns the SceneNode in DXScene that was created to represent the wpfObject.
GetSceneNodeForWpfObject should be called after SceneNodes are created from WPF 3D objects. This can be done with using the DXSceneInitialized event - for example:
MainDXViewportView.DXSceneInitialized += delegate(object sender, EventArgs args) { // Called after after SceneNodes are created and before RenderingQueus are filled (before they are rendered for the first time). if (MainDXViewportView.DXScene == null) // DXScene can be null in case of WPF rendering return; var boxSceneNode = MainDXViewportView.GetSceneNodeForWpfObject(BaseBoxVisual3D); };
TIP:
To get all the SceneNode objects created by DXEngine, you can call the MainDXViewportView.DXScene.DumpSceneNodes() method in Visual Studio's Immediate Window.
You can also use the DXEngineSnoop (in Tools folder) and in the actions menu select "Dump SceneNodes"