MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / TerrainEditor

Method TerrainEditor

Engine/source/gui/worldEditor/terrainEditor.cpp:666–748  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

664}
665
666TerrainEditor::TerrainEditor() :
667 mActiveTerrain(0),
668 mMousePos(0,0,0),
669 mMouseBrush(0),
670 mInAction(false),
671 mGridUpdateMin( S32_MAX, S32_MAX ),
672 mUndoSel(0),
673 mGridUpdateMax( 0, 0 ),
674 mNeedsGridUpdate( false ),
675 mMaxBrushSize(256,256),
676 mNeedsMaterialUpdate( false ),
677 mMouseDown( false )
678{
679 VECTOR_SET_ASSOCIATION(mActions);
680
681 //
682 resetCurrentSel();
683
684 //
685 mBrushPressure = 1.0f;
686 mBrushSize.set(1,1);
687 mBrushSoftness = 1.0f;
688 mBrushChanged = true;
689 mMouseBrush = new BoxBrush(this);
690 mMouseDownSeq = 0;
691 mIsDirty = false;
692 mIsMissionDirty = false;
693 mPaintIndex = -1;
694
695 // add in all the actions here..
696 mActions.push_back(new SelectAction(this));
697 mActions.push_back(new DeselectAction(this));
698 mActions.push_back(new ClearAction(this));
699 mActions.push_back(new SoftSelectAction(this));
700 mActions.push_back(new OutlineSelectAction(this));
701 mActions.push_back(new PaintMaterialAction(this));
702 mActions.push_back(new ClearMaterialsAction(this));
703 mActions.push_back(new RaiseHeightAction(this));
704 mActions.push_back(new LowerHeightAction(this));
705 mActions.push_back(new SetHeightAction(this));
706 mActions.push_back(new SetEmptyAction(this));
707 mActions.push_back(new ClearEmptyAction(this));
708 mActions.push_back(new ScaleHeightAction(this));
709 mActions.push_back(new BrushAdjustHeightAction(this));
710 mActions.push_back(new AdjustHeightAction(this));
711 mActions.push_back(new FlattenHeightAction(this));
712 mActions.push_back(new SmoothHeightAction(this));
713 mActions.push_back(new SmoothSlopeAction(this));
714 mActions.push_back(new PaintNoiseAction(this));
715 //mActions.push_back(new ThermalErosionAction(this));
716
717
718 // set the default action
719 mCurrentAction = mActions[0];
720 mRenderBrush = mCurrentAction->useMouseBrush();
721
722 // persist data defaults
723 mRenderBorder = true;

Callers

nothing calls this directly

Calls 4

setMethod · 0.45
push_backMethod · 0.45
useMouseBrushMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected