/// <summary> /// Starts a painting process, currently used for all painting modes. Called by the mouse context /// </summary> static public void BeginUpdatePainting() { PaintingDirty = false; _pendingChangedAction = null; if (CurrentTerrain == null) { return; } CurrentTerrain.EngineTerrain.SetCurrentVegetationModel(CurrentDecorationModel); CurrentTerrain.EngineTerrain.SetCurrentDetailTexture(CurrentDetailTexture); }
/// <summary> /// Blits the brush into the detail texture channel using current cursor, position and brush. Called by mouse context. /// </summary> /// <param name="bSubtract"></param> static public void BlitDetailTextureBrush(bool bSubtract) { if (CurrentTerrain == null || CurrentBrush == null || CurrentDetailTexture == null) { return; } if (_pendingChangedAction == null) { _pendingChangedAction = new PaintDetailTextureAction(CurrentTerrain, CurrentDetailTexture); } CurrentTerrain.EngineTerrain.BlitDetailTexture(CurrentBrush, Cursor3DProperties, bSubtract); PaintingDirty = true; }
/// <summary> /// Blits the brush into the decoration luminance texture using current cursor, position and brush. Called by mouse context. /// </summary> /// <param name="bSubtract"></param> static public void BlitDecorationBrush(bool bSubtract) { if (CurrentTerrain == null || CurrentBrush == null || CurrentDecorationModel == null) { return; } if (_pendingChangedAction == null) { _pendingChangedAction = new PaintDecorationAction(CurrentTerrain, CurrentDecorationModel); } CurrentTerrain.EngineTerrain.BlitVegetationBrush(CurrentBrush, Cursor3DProperties, bSubtract); PaintingDirty = true; }
/// <summary> /// Blits the brush into the heightfield using current cursor, position and brush. Called by mouse context. /// </summary> /// <param name="mode"></param> static public void BlitHeightmapBrush(HeightmapEditMode_e mode) { if (CurrentTerrain == null || CurrentBrush == null) { return; } if (_pendingChangedAction == null) { _pendingChangedAction = new PaintHeightmapAction(CurrentTerrain); } CurrentTerrain.EngineTerrain.BlitHeightBrush(CurrentBrush, (HeightmapCursorProperties)Cursor3DProperties, mode); PaintingDirty = true; }