/// <summary> /// Helper method which toggles the timer on or off. /// </summary> /// <param name="startPoll">Boolean which indicates whether the timer should be activated.</param> /// <param name="resetTime">Boolean which indicates whether the timer should be reset.</param> public virtual void TogglePolling(bool startPoll, bool resetTime) { if (startPoll) { PollTimer.Play(); } else { PollTimer.Pause(); } if (resetTime) { PollTimer.Reset(); } }
/// <summary> /// Callback method which resets the temperature/information of the /// voxels in the voxel mesh. /// </summary> public void Reset() { UpdateCounter = 0; for (int x = 0; x < NextIterationVoxelMesh.GetLength(0); x++) { for (int y = 0; y < NextIterationVoxelMesh.GetLength(1); y++) { for (int z = 0; z < NextIterationVoxelMesh.GetLength(2); z++) { NextIterationVoxelMesh[x, y, z].ResetTemperature(InitialVoxelTemperature); NextIterationVoxelMesh[x, y, z].UpdateVoxelInfoComponent(); } } } HeatEmissionPollTimer.Reset(); }