示例#1
0
        public MarchingCubesJob(NativeArray <int> edgeTable,
                                NativeArray <int> triTable,
                                NativeArray <Vector3> corners,
                                NativeCollections.NativeCounter.Concurrent vertexCounter,
                                NativeCollections.NativeCounter.Concurrent triangleCounter,
                                NativeArray <Voxel> voxels,
                                NativeArray <float> alphamaps,
                                Out o,
                                Vector3 scale,
                                Vector2 uvScale,
                                Vector3 chunkWorldPosition,
                                int lod,
                                int2 alphamapOrigin,
                                int2 alphamapsSize,
                                int3 localAlphamapsSize,
                                TerrainMaterialType materialType)
        {
            this.edgeTable       = edgeTable;
            this.triTable        = triTable;
            this.corners         = corners;
            this.vertexCounter   = vertexCounter;
            this.triangleCounter = triangleCounter;
            this.voxels          = voxels;
            this.alphamaps       = alphamaps;

            this.outVertices  = o.outVertices;
            this.outNormals   = o.outNormals;
            this.outInfos     = o.outInfos;
            this.outTriangles = o.outTriangles;
            this.outUV1s      = o.outUV1s;
            this.outColors    = o.outColors;
            this.outUV2s      = o.outUV2s;
            this.outUV3s      = o.outUV3s;
            this.outUV4s      = o.outUV4s;

            this.SizeVox            = 0;
            this.SizeVox2           = 0;
            this.Isovalue           = 0;
            this.AlteredOnly        = 1;
            this.FullOutput         = 1;
            this.scale              = scale;
            this.lod                = lod;
            this.alphamapsSize      = alphamapsSize;
            this.localAlphamapsSize = localAlphamapsSize;
            this.uvScale            = uvScale;
            this.alphamapOrigin     = alphamapOrigin;
            this.chunkWorldPosition = chunkWorldPosition;
            this.materialType       = materialType;
        }
示例#2
0
		public static Terrain.MaterialType ToUnityTerrMatType (TerrainMaterialType src)
		{
			if (src==TerrainMaterialType.RTP) return Terrain.MaterialType.Custom;
			else return (Terrain.MaterialType)src;
		}