public bool Initialize() { _actionReceiver = new NodeAction("DynamicLoadManager"); _actionReceiver.OnAction += ActionReceiver_OnAction; _zflipMatrix = new Matrix4x4(new Vector4(1, 0, 0), new Vector4(0, 1, 0), new Vector4(0, 0, -1), new Vector4(0, 0, 0, 1)); GizmoSDK.GizmoBase.Message.Send("SceneManager", MessageLevel.DEBUG, "Loading Graph"); GizmoSDK.Gizmo3D.Platform.Initialize(); NodeLock.WaitLockEdit(); _native_camera = new PerspCamera("Test"); _native_camera.RoiPosition = true; _controller.Camera = _native_camera; _native_scene = new Scene("TestScene"); _native_context = new Context(); //native_camera.Debug(native_context); _native_traverse_action = new CullTraverseAction(); DynamicLoader.OnDynamicLoad += DynamicLoader_OnDynamicLoad; _native_camera.Scene = _native_scene; NodeLock.UnLock(); DbManager.Initialize(); return(true); }
public bool InitializeInternal() { _actionReceiver = new NodeAction("DynamicLoadManager"); _actionReceiver.OnAction += ActionReceiver_OnAction; _zflipMatrix = new Matrix4x4(new Vector4(1, 0, 0), new Vector4(0, 1, 0), new Vector4(0, 0, -1), new Vector4(0, 0, 0, 1)); GizmoSDK.GizmoBase.Message.Send("SceneManager", MessageLevel.DEBUG, "Loading Graph"); NodeLock.WaitLockEdit(); try // We are now locked in edit { _native_camera = new PerspCamera("Test"); _native_camera.RoiPosition = true; MapControl.SystemMap.Camera = _native_camera; _native_scene = new Scene("TestScene"); _native_context = new Context(); #if DEBUG_CAMERA _native_camera.Debug(_native_context); // Enable to debug view #endif // DEBUG_CAMERA _native_traverse_action = new CullTraverseAction(); DynamicLoader.OnDynamicLoad += DynamicLoader_OnDynamicLoad; _native_camera.Scene = _native_scene; } finally { NodeLock.UnLock(); } DynamicLoader.UsePreCache(true); // Enable use of mipmap creation on dynamic loading DynamicLoaderManager.SetNumberOfActiveLoaders(4); // Lets start with 4 parallell threads DynamicLoaderManager.StartManager(); return(true); }
static public void UnInitializeFactories() { Node.UnInitializeFactory(); Group.UnInitializeFactory(); Transform.UnInitializeFactory(); Lod.UnInitializeFactory(); State.UnInitializeFactory(); Geometry.UnInitializeFactory(); Scene.UnInitializeFactory(); PerspCamera.UnInitializeFactory(); DynamicLoader.UnInitializeFactory(); CullTraverseAction.UnInitializeFactory(); NodeAction.UnInitializeFactory(); Context.UnInitializeFactory(); Texture.UnInitializeFactory(); Roi.UnInitializeFactory(); RoiNode.UnInitializeFactory(); ExtRef.UnInitializeFactory(); }
static public void InitializeFactories() { Node.InitializeFactory(); Group.InitializeFactory(); Transform.InitializeFactory(); Lod.InitializeFactory(); State.InitializeFactory(); Geometry.InitializeFactory(); Scene.InitializeFactory(); PerspCamera.InitializeFactory(); DynamicLoader.InitializeFactory(); CullTraverseAction.InitializeFactory(); NodeAction.InitializeFactory(); Context.InitializeFactory(); Texture.InitializeFactory(); Roi.InitializeFactory(); RoiNode.InitializeFactory(); ExtRef.InitializeFactory(); Crossboard.InitializeFactory(); }
public bool InitializeInternal() { // Initialize streamer APIs if (!GizmoSDK.Gizmo3D.Platform.Initialize()) { return(false); } // Initialize formats DbManager.Initialize(); GizmoSDK.GizmoBase.Message.Send("SceneManager", MessageLevel.DEBUG, "Initialize Graph Streaming"); // Add builder for registered types AddDefaultBuilders(); // Setup internal subscription events _actionReceiver = new NodeAction("DynamicLoadManager"); _actionReceiver.OnAction += ActionReceiver_OnAction; DynamicLoader.OnDynamicLoad += DynamicLoader_OnDynamicLoad; NodeLock.WaitLockEdit(); try // We are now locked in edit { // Camera setup _native_camera = new PerspCamera("Test"); _native_camera.RoiPosition = true; MapControl.SystemMap.Camera = _native_camera; // Top scene _native_scene = new Scene("Scene"); _native_camera.Scene = _native_scene; // Top context _native_context = new Context(); #if DEBUG_CAMERA // If we want to visualize debug 3D _native_camera.Debug(_native_context); // Enable to debug view #endif // DEBUG_CAMERA // Default travrser _native_traverse_action = new CullTraverseAction(); // _native_traverse_action.SetOmniTraverser(true); // To skip camera cull and use LOD in omni directions } finally { NodeLock.UnLock(); } // Set up dynamic loading DynamicLoader.UsePreCache(true); // Enable use of mipmap creation on dynamic loading DynamicLoaderManager.SetNumberOfActiveLoaders(Settings.DynamicLoaders); // Lets start with 4 parallell threads DynamicLoaderManager.StartManager(); // Start coroutines for asset loading StartCoroutine(AssetLoader()); return(true); }