Example #1
0
File: Vox.cs Project: toxicFork/vox
    public void OnEnable()
    {
//		voxelTree = new VoxelTree(Vector3.zero, Vector3.one * size);

        voxelTree.SetGameObject(gameObject);

        //                vox.octree.AddBounds(new Bounds(new Vector3(0, 0.1f, -0.4f), Vector3.one), 5, 8);
        //                vox.octree.AddBounds(new Bounds(new Vector3(0, -.75f, -0.35f), Vector3.one*0.5f), 6, 8);
        //                vox.octree.AddBounds(new Bounds(new Vector3(0.25f, -.35f, -0.93f), Vector3.one*0.7f), 7, 8);

        //                vox.octree.GetRoot().RemoveChild(OctreeNode.ChildIndex.RightAboveBack);
        voxelTree.GetRoot().AddChild(OctreeNode.ChildIndex.LeftAboveBack).SetItem(4);
        voxelTree.GetRoot().AddChild(OctreeNode.ChildIndex.RightAboveForward).SetItem(5);
        //        octree.GetRoot().AddChild(OctreeNode.ChildIndex.LeftAboveForward).SetItem(4);

        //        topFwdLeft.SetItem(4);
        //        topFwdLeft.SubDivide();
        //
        //        topFwdLeft.RemoveChild(OctreeNode.ChildIndex.RightAboveBack);

        //                topFwdLeft.SubDivide();
        voxelTree.Render();

        //        octree.ApplyToMesh(GetComponent<MeshFilter>().sharedMesh);
    }
Example #2
0
        public void Test()
        {
            var voxelTree = new VoxelTree(Vector3.zero, Vector3.one * size);

            voxelTree.GetRoot().AddChild(OctreeNode.ChildIndex.LeftAboveBack).SetItem(4);
            voxelTree.GetRoot().AddChild(OctreeNode.ChildIndex.RightAboveForward).SetItem(5);
        }
Example #3
0
        public void Test() {
            var voxelTree = new VoxelTree(Vector3.zero, Vector3.one * size);

            voxelTree.GetRoot().AddChild(OctreeNode.ChildIndex.LeftAboveBack).SetItem(4);
            voxelTree.GetRoot().AddChild(OctreeNode.ChildIndex.RightAboveForward).SetItem(5);


        }