Exemplo n.º 1
0
        /// <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);
        }
Exemplo n.º 2
0
        /// <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;
        }
Exemplo n.º 3
0
        /// <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;
        }
Exemplo n.º 4
0
        /// <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;
        }