Пример #1
0
        /*
         * Generate a NodeGraph for a single Component using VoxelStrategy
         */
        public static NodeGraph GenerateNodeGraph(Component component)
        {
            VoxelGrid voxelGrid = new VoxelGrid(component);

            voxelGrid.FillInternalVolume(component);

            return(GenerateNodeGraph(voxelGrid));
        }
Пример #2
0
        public static double outerLayerLimit        = 0d; // Controls how much of the grids approximate radius is considered external as percentage of diameter. (50% diameter == 100% radius)

        /*
         * Generate a NodeGraph for an entire Structure using VoxelStrategy
         */
        public static NodeGraph GenerateNodeGraph(Structure structure)
        {
            VoxelGrid voxelGrid = new VoxelGrid(structure, plane1Normal: Vect3.Right, plane2Normal: Vect3.Up, plane3Normal: Vect3.Forward);

            voxelGrid.FillInternalVolume(structure);

            return(GenerateNodeGraph(voxelGrid));
        }