Beispiel #1
0
		void InitSector()
		{
			int i;


			solid_geometry = new VoxelGeometry();
			transparent_geometry = new VoxelGeometry();
			custom_geometry = new VoxelGeometry();

			//Pos_x = 0; Pos_y = 0; Pos_z = 0;
			Handle_x = Handle_y = Handle_z = 0;
			ZoneType = 0;
			ZoneVersion = 0;
			GeneratorVersion = 0;
			RingNum = 65535;
#if VOXEL_CULLER
			Culling = 0;
#endif
			Data = new VoxelData( Size_x * Size_y * Size_z );

			for( int r = 0; r < 6; r++ )
			{
				near_sectors[r] = null;
			}
			Flag_Render_Dirty = true;
			Flag_HighPriorityRefresh = false;
			Flag_Void_Regular = true;
			Flag_Void_Transparent = true;
			Flag_IsVisibleAtLastRendering = false;
			Flag_DeletePending = false;
			Flag_NeedFullCulling = false;
			Flag_KeepInMemory = false;
			Flag_IsModified = ModifiedFieldFlags.NONE;
			Flag_IsSlowGeneration = false;
			Flag_IsActiveVoxels = false;
			Flag_IsActiveLowRefresh = false;
			Flag_NeedSortedRendering = false;
			PartialCulling = 0;
			RefreshWaitCount = 0;
			LowRefresh_Mask = 0x0F;
		}
Beispiel #2
0
		public VoxelSector( VoxelSector Sector )
		{
			uint DataSize;
			DataSize = Sector.DataSize;
			Data = new VoxelData( ZVOXELBLOCKCOUNT );

			for( int i = 0; i < DataSize; i++ )
			{
				Data.Data[i] = Sector.Data.Data[i];
			}

			VoxelTypeManager = null;
			Next = Pred = GlobalList_Next = GlobalList_Pred = null;
			Handle_x = Sector.Handle_x;
			Handle_y = Sector.Handle_y;
			Handle_z = Sector.Handle_z;
			Pos_x = Sector.Pos_x;
			Pos_y = Sector.Pos_y;
			Pos_z = Sector.Pos_z;
			Size_x = Sector.Size_x;
			Size_y = Sector.Size_y;
			Size_z = Sector.Size_z;

			Flag_Void_Regular = Sector.Flag_Void_Regular;
			Flag_Void_Transparent = Sector.Flag_Void_Transparent;
			Flag_Render_Dirty = Sector.Flag_Render_Dirty;

			Flag_HighPriorityRefresh = Sector.Flag_HighPriorityRefresh;
			Flag_IsVisibleAtLastRendering = Sector.Flag_IsVisibleAtLastRendering;
			Flag_DeletePending = Sector.Flag_DeletePending;
			Flag_NeedFullCulling = Sector.Flag_NeedFullCulling;
			Flag_KeepInMemory = Sector.Flag_KeepInMemory;
			Flag_IsModified = Sector.Flag_IsModified;
			Flag_IsSlowGeneration = Sector.Flag_IsSlowGeneration;
			Flag_IsActiveVoxels = Sector.Flag_IsActiveVoxels;
			Flag_IsActiveLowRefresh = Sector.Flag_IsActiveLowRefresh;
			Flag_NotStandardSize = Sector.Flag_NotStandardSize;
			Flag_NeedSortedRendering = Sector.Flag_NeedSortedRendering;
			PartialCulling = Sector.PartialCulling;

			RefreshWaitCount = Sector.RefreshWaitCount;
			LowRefresh_Mask = Sector.LowRefresh_Mask;
		}