TerrainEditor
Engine/source/gui/worldEditor/terrainEditor.h
Classes:
Private Types
Parent
Private Attributes
Vector< TerrainAction * >
bool
bool
bool
bool
bool
bool
If one of these flags when the terrainEditor goes to render an appropriate update method will be called on the terrain.
bool
bool
bool
Public Attributes
bool
bool
bool
bool
bool
Public Functions
attachTerrain(TerrainBlock * terrBlock)
collide(const Gui3DMouseEvent & event, Point3F & pos)
detachTerrain(TerrainBlock * terrBlock)
get3DCursor(GuiCursor *& cursor, bool & visible, const Gui3DMouseEvent & evt)
const char *
getActionName(U32 index)
const char *
const char *
getClientTerrain(TerrainBlock * serverTerrain)
const char *
bool
getGridInfo(const GridPoint & gPoint, GridInfo & info)
bool
getGridInfo(const Point2I & gPos, GridInfo & info, TerrainBlock * terrain)
getTerrainBlock(S32 index)
getTerrainBlocksMaterialList(Vector< StringTableEntry > & list)
getTerrainUnderWorldPoint(const Point3F & wPos)
bool
gridToCenter(const Point2I & gPos, Point2I & cPos)
bool
gridToWorld(const GridPoint & gPoint, Point3F & wPos)
bool
gridToWorld(const Point2I & gPos, Point3F & wPos, TerrainBlock * terrain)
gridUpdateComplete(bool materialChanged)
bool
isMainTile(const GridPoint & gPoint)
bool
isPointInTerrain(const GridPoint & gPoint)
lockSelection(bool lock)
lookupAction(const char * name)
mirrorTerrain(S32 mirrorIndex)
on3DMouseDown(const Gui3DMouseEvent & evt)
on3DMouseDragged(const Gui3DMouseEvent & evt)
on3DMouseMove(const Gui3DMouseEvent & evt)
on3DMouseUp(const Gui3DMouseEvent & evt)
bool
onAdd()
Called when this object is added to the scene.
onDeleteNotify(SimObject * object)
Called when the mProfile or mToolTipProfile is deleted.
bool
onInputEvent(const InputEventInfo & event)
General input handler.
onMaterialUndo(TerrainBlock * terr)
bool
onMouseWheelDown(const GuiEvent & evt)
bool
onMouseWheelUp(const GuiEvent & evt)
Do special pre-render processing.
bool
onWake()
Called when this object is asked to wake up returns true if it's actually awake at the end.
processAction(const char * sAction)
processActionTick(U32 sequence)
renderPoints(const Vector< GFXVertexPCT > & pointList)
renderScene(const RectI & updateRect)
reorderMaterial(S32 index, S32 orderPos)
Reorder material at the given index to the new position, changing the order in which it is rendered / blended.
resetSelWeights(bool clear)
setBrushPos(Point2I pos)
setBrushPressure(F32 pressure)
setBrushSize(S32 w, S32 h)
setBrushSoftness(F32 softness)
setBrushType(const char * type)
setCurrentSel(Selection * sel)
setGridInfo(const GridInfo & info, bool checkActive)
setGridInfoHeight(const GridInfo & info)
submitMaterialUndo(String actionName)
bool
bool
worldToGrid(const Point3F & wPos, GridPoint & gPoint)
bool
worldToGrid(const Point3F & wPos, Point2I & gPos, TerrainBlock * terrain)
Private Functions
getGridHeight(const GridPoint & gPoint)
getGridMaterial(const GridPoint & gPoint)
getGridMaterialGroup(const GridPoint & gPoint)
renderBrush(const Brush & brush, const LinearColorF & inColorFull, const LinearColorF & inColorNone, const LinearColorF & outColorFull, const LinearColorF & outColorNone, bool renderFill, bool renderFrame)
renderSelection(const Selection & sel, const LinearColorF & inColorFull, const LinearColorF & inColorNone, const LinearColorF & outColorFull, const LinearColorF & outColorNone, bool renderFill, bool renderFrame)
setGridMaterial(const GridPoint & gPoint, U8 index)
setGridMaterialGroup(const GridPoint & gPoint, U8 group)
submitUndo(Selection * sel)
updateBrush(Brush & brush, const Point2I & gPos)
Public Static Functions
Detailed Description
Private Types
typedef EditTSCtrl Parent
Private Attributes
Vector< TerrainAction * > mActions
TerrainBlock * mActiveTerrain
bool mBrushChanged
F32 mBrushPressure
Point2I mBrushSize
F32 mBrushSoftness
TerrainAction * mCurrentAction
Selection * mCurrentSel
Selection mDefaultSel
Point2I mGridUpdateMax
Point2I mGridUpdateMin
bool mInAction
bool mIsDirty
bool mIsMissionDirty
Brush * mMouseBrush
bool mMouseDown
U32 mMouseDownSeq
PlaneF mMousePlane
Point3F mMousePos
bool mNeedsGridUpdate
If one of these flags when the terrainEditor goes to render an appropriate update method will be called on the terrain.
This prevents unnecessary work from happening from directly within an editor event's process method.
bool mNeedsMaterialUpdate
S32 mPaintIndex
bool mRenderBrush
bool mSelectionLocked
GFXStateBlockRef mStateBlock
VectorPtr< TerrainBlock * > mTerrainBlocks
Selection * mUndoSel
Public Attributes
F32 mAdjustHeightMouseScale
F32 mAdjustHeightVal
ColorI mBorderFillColor
ColorI mBorderFrameColor
F32 mBorderHeight
bool mBorderLineMode
S32 mMaterialGroup
Point2I mMaxBrushSize
F32 mNoiseFactor
bool mProcessUsesBrush
bool mRenderBorder
bool mRenderSolidBrush
bool mRenderVertexSelection
F32 mScaleVal
bool mSelectionHidden
F32 mSetHeightVal
F32 mSlopeMaxAngle
F32 mSlopeMinAngle
F32 mSmoothFactor
StringTableEntry mSoftSelectDefaultFilter
StringTableEntry mSoftSelectFilter
F32 mSoftSelectRadius
Public Functions
TerrainEditor()
~TerrainEditor()
attachTerrain(TerrainBlock * terrBlock)
autoMaterialLayer(F32 mMinHeight, F32 mMaxHeight, F32 mMinSlope, F32 mMaxSlope, F32 mCoverage)
clearSelection()
collide(const Gui3DMouseEvent & event, Point3F & pos)
DECLARE_CONOBJECT(TerrainEditor )
detachTerrain(TerrainBlock * terrBlock)
get3DCursor(GuiCursor *& cursor, bool & visible, const Gui3DMouseEvent & evt)
Reimplemented from: EditTSCtrl
getActionName(U32 index)
getActiveTerrain()
Reimplemented from: EditTSCtrl
getBrushPos()
getBrushPressure()
getBrushSize()
getBrushSoftness()
getBrushType()
getClientTerrain(TerrainBlock * serverTerrain)
getCurrentAction()
getCurrentSel()
getGridInfo(const GridPoint & gPoint, GridInfo & info)
getGridInfo(const Point2I & gPos, GridInfo & info, TerrainBlock * terrain)
getGridInfos(const GridPoint & gPoint, Vector< GridInfo > & infos)
getMousePos()
getNumActions()
getNumTextures()
getPaintMaterialIndex()
getTerrainBlock()
getTerrainBlock(S32 index)
getTerrainBlockCount()
getTerrainBlocksMaterialList(Vector< StringTableEntry > & list)
getTerrainUnderWorldPoint(const Point3F & wPos)
getUndoSel()
gridToCenter(const Point2I & gPos, Point2I & cPos)
gridToWorld(const GridPoint & gPoint, Point3F & wPos)
gridToWorld(const Point2I & gPos, Point3F & wPos, TerrainBlock * terrain)
gridUpdateComplete(bool materialChanged)
isMainTile(const GridPoint & gPoint)
isPointInTerrain(const GridPoint & gPoint)
lockSelection(bool lock)
lookupAction(const char * name)
markEmptySquares()
materialUpdateComplete()
mirrorTerrain(S32 mirrorIndex)
on3DMouseDown(const Gui3DMouseEvent & evt)
Reimplemented from: EditTSCtrl
on3DMouseDragged(const Gui3DMouseEvent & evt)
Reimplemented from: EditTSCtrl
on3DMouseMove(const Gui3DMouseEvent & evt)
Reimplemented from: EditTSCtrl
on3DMouseUp(const Gui3DMouseEvent & evt)
Reimplemented from: EditTSCtrl
onAdd()
Reimplemented from: EditTSCtrl
onDeleteNotify(SimObject * object)
Reimplemented from: GuiControl
onInputEvent(const InputEventInfo & event)
Reimplemented from: EditTSCtrl
onMaterialUndo(TerrainBlock * terr)
onMouseWheelDown(const GuiEvent & evt)
Reimplemented from: EditTSCtrl
onMouseWheelUp(const GuiEvent & evt)
Reimplemented from: EditTSCtrl
onPreRender()
Reimplemented from: GuiTSCtrl
onSleep()
Reimplemented from: GuiTSCtrl
onWake()
Reimplemented from: GuiTSCtrl
processAction(const char * sAction)
processActionTick(U32 sequence)
renderGui(Point2I offset, const RectI & updateRect)
Reimplemented from: GuiTSCtrl
renderPoints(const Vector< GFXVertexPCT > & pointList)
renderScene(const RectI & updateRect)
Reimplemented from: EditTSCtrl
reorderMaterial(S32 index, S32 orderPos)
Reorder material at the given index to the new position, changing the order in which it is rendered / blended.
resetCurrentSel()
resetSelWeights(bool clear)
scheduleGridUpdate()
scheduleMaterialUpdate()
setAction(const char * action)
setBrushPos(Point2I pos)
setBrushPressure(F32 pressure)
setBrushSize(S32 w, S32 h)
setBrushSoftness(F32 softness)
setBrushType(const char * type)
setCurrentSel(Selection * sel)
setDirty()
setGridInfo(const GridInfo & info, bool checkActive)
setGridInfoHeight(const GridInfo & info)
setGridUpdateMinMax()
setMissionDirty()
submitMaterialUndo(String actionName)
terrainBlockValid()
updateGuiInfo()
Reimplemented from: EditTSCtrl
worldToGrid(const Point3F & wPos, GridPoint & gPoint)
worldToGrid(const Point3F & wPos, Point2I & gPos, TerrainBlock * terrain)
Private Functions
getGridHeight(const GridPoint & gPoint)
getGridMaterial(const GridPoint & gPoint)
getGridMaterialGroup(const GridPoint & gPoint)
renderBorder()
renderBrush(const Brush & brush, const LinearColorF & inColorFull, const LinearColorF & inColorNone, const LinearColorF & outColorFull, const LinearColorF & outColorNone, bool renderFill, bool renderFrame)
renderSelection(const Selection & sel, const LinearColorF & inColorFull, const LinearColorF & inColorNone, const LinearColorF & outColorFull, const LinearColorF & outColorNone, bool renderFill, bool renderFrame)
setGridHeight(const GridPoint & gPoint, const F32 height)
setGridMaterial(const GridPoint & gPoint, U8 index)
setGridMaterialGroup(const GridPoint & gPoint, U8 group)
submitUndo(Selection * sel)
updateBrush(Brush & brush, const Point2I & gPos)