+
+
+ [ProtoAfterDeserialization]
+ private void PostProcess( )
+ {
+ if (this.HeightMap == null) this.HeightMap = new ushort[ChunkSize, ChunkSize];
+
+ if (_flattened_HeightMap != null) {
+ int col, row;
+
+ BitVector32 bitMasker = new BitVector32(0);
+ var rowSection = BitVector32.CreateSection(ChunkSize);
+ var colSection = BitVector32.CreateSection(ChunkSize, rowSection);
+
+ for (uint rowcol = 0; rowcol < (ChunkSize * ChunkSize); rowcol++) {
+ bitMasker = new BitVector32(data: ( int )rowcol);
+ row = bitMasker[rowSection];
+ col = bitMasker[colSection];
+ HeightMap[col, row] = _flattened_HeightMap[rowcol];
+ }
+
+ }
+
+ }
+
+