Esempio n. 1
0
        protected CompressedMarchingCubeChunk CreateChunkWithProperties(Vector3Int pos, int lodPower, int chunkSizePower, bool allowOverride, out MeshData data, Action <ComputeBuffer> WorkOnNoise = null)
        {
            CompressedMarchingCubeChunk chunk = GetThreadedChunkObjectAt(pos, lodPower, chunkSizePower, allowOverride);

            data = BuildChunkMeshData(chunk, WorkOnNoise);
            return(chunk);
        }
Esempio n. 2
0
 public ChunkNeighbourTask(CompressedMarchingCubeChunk chunk, MeshData meshData)
 {
     this.chunk            = chunk;
     this.meshData         = meshData;
     maxEntityIndexPerAxis = chunk.MaxEntitiesIndexPerAxis;
 }
Esempio n. 3
0
        //TODO:Check if collider can be removed from most chunks.
        //Collision can be approximated by calling noise function for lowest point of object and checking if its noise is larger than surface value

        protected CompressedMarchingCubeChunk CreateChunkAt(Vector3 pos, out MeshData data, bool allowOverride = false)
        {
            GetSizeAndLodPowerForChunkPosition(pos, out int chunkSizePower, out int lodPower);
            return(CreateChunkWithProperties(VectorExtension.ToVector3Int(pos), lodPower, chunkSizePower, allowOverride, out data));
        }