示例#1
0
        public VoxelGeometry build(VoxelData[] datas, GameObject obj = null)
        {
            if (obj == null)
            {
                obj = this.gameObject;
            }

            VoxelProduct product = new VoxelProduct();

            begin_.init();
            begin_.setup(datas);
            begin_.build(product);


            for (int i = 0; i < list_.Count; ++i)
            {
                list_ [i].init();
                list_[i].build(product);
            }



            VoxelGeometry geometry = new VoxelGeometry();

            geometry.draw("Mesh", product, obj, this._material);
            return(geometry);
        }
示例#2
0
        private Task task_(string name, VoxelData[] datas, GeometryResult cb)
        {
            if (list_.Count == 0)
            {
                init();
            }

            VoxelProduct product = new VoxelProduct();

            begin_.setup(datas);

            TaskList tl = new TaskList();


            tl.push(begin_.task(product));
            for (int i = 0; i < list_.Count; ++i)
            {
                tl.push(list_[i].task(product));
            }

            TaskManager.PushBack(tl, delegate {
                VoxelGeometry geometry = new VoxelGeometry();
                geometry.draw(name, product, this.gameObject, this._material);;
                cb(geometry);
            });
            return(tl);
        }
示例#3
0
		public void build (VoxelData[] datas)
		{
			if (empty) {

				this._product = new VoxelProduct();

				VoxelData2Point vd2p = new VoxelData2Point(datas);
				vd2p.build(this._product);

				VoxelShadowBuild vsb = new VoxelShadowBuild ();
				vsb.build(this._product);


				VoxelMeshBuild vmb = new VoxelMeshBuild ();
				vmb.build(this._product);

				VoxelRemoveSameVertices rsv = new VoxelRemoveSameVertices ();
				rsv.build(this._product);

				//VoxelRemoveFace vrf = new VoxelRemoveFace ();
				//vrf.build(this._product);

				/*
				VoxelRemoveFace vrf = new VoxelRemoveFace ();
				vrf.build(this._product);
				*/

				_geometry = new VoxelGeometry();
				_geometry.draw (this._product, this.gameObject, this._material);
			}

		}
示例#4
0
        public VoxelGeometry build(VoxelData[] datas, GameObject obj = null)
        {
            if (obj == null) {
                obj = this.gameObject;
            }

            VoxelProduct product = new VoxelProduct();
            begin_.init ();
            begin_.setup (datas);
            begin_.build(product);

            for (int i = 0; i < list_.Count; ++i) {
                list_ [i].init ();
                list_[i].build (product);
            }

            VoxelGeometry geometry = new VoxelGeometry();
            geometry.draw ("Mesh", product, obj, this._material);
            return geometry;
        }
示例#5
0
        private Task task_(string name, VoxelData[] datas, GeometryResult cb)
        {
            if (list_.Count == 0) {
                init ();
            }

            VoxelProduct product = new VoxelProduct ();

            begin_.setup (datas);

            TaskList tl = new TaskList ();

            tl.push(begin_.task (product));
            for (int i = 0; i < list_.Count; ++i) {

                tl.push(list_[i].task (product));
            }

            TaskManager.PushBack (tl, delegate {
                VoxelGeometry geometry = new VoxelGeometry ();
                geometry.draw (name, product, this.gameObject, this._material);;
                cb(geometry);
            });
            return tl;
        }