/// <summary> /// Update the scene root. If the root is empty then the given node /// becomes the new root. If the root already has children then the new /// node is added. /// </summary> public void _updateRoot(CadKit.OSG.Glue.Node node) { using (this.Lock.write()) { _root = CadKit.OSG.Glue.Tools.organizeScene(_root, node); } }
/// <summary> /// Clear the scene. /// </summary> private void _clearScene() { if (null != _root) { _root.clear(); _root = null; } }
/// <summary> /// Read the file. /// </summary> void CadKit.Interfaces.IFileOpen.open(string name, object caller) { using (this.Lock.write()) { // read file and create scene here. _sfGl = new SimFlowGlue(name, caller); _root = _sfGl.root(); } }
/// <summary> /// Insert the file's contents. /// </summary> public void insert(string file, object caller) { CadKit.OSG.Glue.Node node = CadKit.Plugins.Documents.SceneDocument.Document._read(file, caller); this._updateRoot(node); }