Used in DumpCatesianGridTreeNodeScript.
Inheritance: Script
        private SceneObject GetCatesianGridObj(CatesianGrid grid, List <GridBlockProperty> gridProperties, string fileName)
        {
            CatesianGridRenderer renderer = CatesianGridRenderer.Create(
                -grid.DataSource.Position, grid, this.scientificCanvas.ColorPalette.Sampler);

            //string caseFileName = System.IO.Path.GetFileName(fileName);
            renderer.WorldPosition = -grid.DataSource.Position;
            renderer.Initialize();
            SceneObject gridObj = renderer.WrapToSceneObject(
                new ModelScaleScript(),
                new DumpCatesianGridTreeNodeScript());

            {
                BoundingBoxRenderer boxRenderer = renderer.GetBoundingBoxRenderer();
                SceneObject         boxObj      = boxRenderer.WrapToSceneObject(
                    new ModelScaleScript());
                gridObj.Children.Add(boxObj);
            }

            foreach (GridBlockProperty gbp in gridProperties)
            {
                var script = new ScientificModelScript(gridObj, gbp, this.scientificCanvas.ColorPalette);
                gridObj.Scripts.Add(script);
            }
            return(gridObj);
        }
        private SceneObject GetCatesianGridObj(CatesianGrid grid, List<GridBlockProperty> gridProperties, string fileName)
        {
            CatesianGridRenderer renderer = CatesianGridRenderer.Create(
                -grid.DataSource.Position, grid, this.scientificCanvas.ColorPalette.Sampler);
            //string caseFileName = System.IO.Path.GetFileName(fileName);
            renderer.WorldPosition = -grid.DataSource.Position;
            renderer.Initialize();
            SceneObject gridObj = renderer.WrapToSceneObject(
                new ModelScaleScript(),
                new DumpCatesianGridTreeNodeScript());
            {
                BoundingBoxRenderer boxRenderer = renderer.GetBoundingBoxRenderer();
                SceneObject boxObj = boxRenderer.WrapToSceneObject(
                    new ModelScaleScript());
                gridObj.Children.Add(boxObj);
            }

            foreach (GridBlockProperty gbp in gridProperties)
            {
                var script = new ScientificModelScript(gridObj, gbp, this.scientificCanvas.ColorPalette);
                gridObj.Scripts.Add(script);
            }
            return gridObj;
        }
Exemple #3
0
 public PropertyTreeNode(ScientificModelScript script)
 {
     this.script = script;
 }
 public PropertyTreeNode(ScientificModelScript script)
 {
     this.script = script;
 }