public SceneView createSceneView(SimSubScene subScene, String name, Vector3 positon, Vector3 lookAt, int zIndex) { if (subScene.hasSimElementManagerType(typeof(OgreSceneManager))) { OgreSceneManager sceneManager = subScene.getSimElementManager <OgreSceneManager>(); OgreSceneView camControl = new OgreSceneView(name, sceneManager, OgreRenderTarget, zIndex); camControl.Translation = positon; camControl.LookAt = lookAt; return(camControl); } else { Log.Default.sendMessage("Cannot create a camera in the subscene {0} named {1} because the subscene has no OgreSceneManager.", LogLevel.Warning, OgreInterface.PluginName, subScene.Name, name); return(null); } }
public void destroySceneView(SceneView camera) { OgreSceneView ogreCam = camera as OgreSceneView; ogreCam.Dispose(); }