WorldEditor

Engine/source/gui/worldEditor/worldEditor.h

More...

Classes:

Object Icons

Vector< IconObject >
bool

If true, icons fade out with distance to mouse cursor.

Distance at which to start fading out icons.

Private Types

enum
_Anonymous_ {
  Move = 0
  Rotate 
  Scale 
}
Parent 

Public Types

enum
AlignmentType {
  AlignNone = 0
  AlignPosX 
  AlignPosY 
  AlignPosZ 
  AlignNegX 
  AlignNegY 
  AlignNegZ 
}
enum
DropType {
  DropAtOrigin = 0
  DropAtCamera 
  DropAtCameraWithRot 
  DropBelowCamera 
  DropAtScreenCenter 
  DropAtCentroid 
  DropToTerrain 
  DropBelowSelection 
  DropAtGizmo 
}

Public Attributes

The objects currently in the copy buffer.

bool

Grid snap setting temporarily toggled during drag.

bool

Value of the Z offset (note: this shouldnt be changed once set)

bool

Allow soft snapping all of the time.

bool

Soft snap has been activated by the user and allowed by the current rules.

How does the snapped object align to the snapped surface.

Fraction of mSoftSnapSize for backface polys to have an influence.

The actual bounds used for the soft snap.

The point we're attempting to snap to.

bool

Activates debug rendering.

The triangle we are snapping to.

The triangles that are considered for snapping.

bool

Are we snapping?

The bounds prior to any soft snapping (used when rendering the snap bounds)

bool

Render the soft snapping bounds.

bool

Render the soft snapped triangle.

If not the selection bounds, use this size.

bool

Use the selection bounds for the size.

The triangle we are snapping to.

bool

Selection is stuck to the ground.

How does the stickied object align to the terrain.

bool

Allows the use of an offset to avoid z-fighting with flat objects on a flat terrain.

Public Static Attributes

A large hard coded distance used to test object and icon selection.

Protected Attributes

Public Functions

bool
bool
alignByBounds(S32 boundsAxis)
bool
dropAtGizmo(Selection * sel, const Point3F & gizmoPos)
dropBelowSelection(Selection * sel, const Point3F & centroid, bool useBottomBounds)
dropCurrentSelection(bool skipUndo)
hideObject(SceneObject * obj, bool hide)
hideSelection(bool hide)
lockSelection(bool lock)
bool
makeSelectionAMesh(const char * filename)
makeSelectionPrefab(const char * filename, bool dontReplaceOriginals)
bool

Called when this object is added to the scene.

Called when the editor is activated.

bool
pasteSelection(bool dropSel)
renderScene(const RectI & updateRect)
selectObject(const char * obj)
softSnapSelection(Selection * sel, U8 modifier, Point3F gizmoPos)
terrainSnapSelection(Selection * sel, U8 modifier, Point3F gizmoPos, bool forceStick)
transformSelection(bool position, Point3F & p, bool relativePos, bool rotate, EulerF & r, bool relativeRot, bool rotLocal, S32 scaleType, Point3F & s, bool sRelative, bool sLocal)

Protected Functions

get3DCursor(GuiCursor *& cursor, bool & visible, const Gui3DMouseEvent & event)
setCursor(U32 cursor)

Detailed Description

Object Icons

Vector< IconObject > mIcons 
bool mFadeIcons 

If true, icons fade out with distance to mouse cursor.

F32 mFadeIconsDist 

Distance at which to start fading out icons.

Private Types

@106

Enumerator

Move = 0
Rotate
Scale
typedef EditTSCtrl Parent 

Public Types

AlignmentType

Enumerator

AlignNone = 0
AlignPosX
AlignPosY
AlignPosZ
AlignNegX
AlignNegY
AlignNegZ
DropType

Enumerator

DropAtOrigin = 0
DropAtCamera
DropAtCameraWithRot
DropBelowCamera
DropAtScreenCenter
DropAtCentroid
DropToTerrain
DropBelowSelection
DropAtGizmo
typedef WorldEditorSelection Selection 

Public Attributes

bool mBoundingBoxCollision 
Vector< SimObjectMemento > mCopyBuffer 

The objects currently in the copy buffer.

StringTableEntry mDefaultHandle 
bool mDragGridSnapToggle 

Grid snap setting temporarily toggled during drag.

ColorI mDragRectColor 
bool mDropAtBounds 
F32 mDropAtScreenCenterMax 
F32 mDropAtScreenCenterScalar 
F32 mDropBelowCameraOffset 
S32 mDropType 
ColorI mFaceSelectColor 
bool mGridSnap 
StringTableEntry mLockedHandle 
bool mNoMouseDrag 
bool mObjectMeshCollision 
bool mObjectsUseBoxCenter 
ColorI mObjectTextColor 
ColorI mObjMouseOverColor 
ColorI mObjMouseOverSelectColor 
ColorI mObjMultiSelectColor 
ColorI mObjSelectColor 
StringTableEntry mObjTextFormat 
F32 mOffsetZValue 

Value of the Z offset (note: this shouldnt be changed once set)

bool mPerformedDragCopy 
ColorI mPopupBackgroundColor 
ColorI mPopupTextColor 
bool mRenderObjHandle 
bool mRenderObjText 
bool mRenderPopupBackground 
bool mRenderSelectionBox 
StringTableEntry mSelectHandle 
ColorI mSelectionBoxColor 
bool mSelectionLocked 
bool mShowMousePopupInfo 
bool mSoftSnap 

Allow soft snapping all of the time.

bool mSoftSnapActivated 

Soft snap has been activated by the user and allowed by the current rules.

AlignmentType mSoftSnapAlignment 

How does the snapped object align to the snapped surface.

F32 mSoftSnapBackfaceTolerance 

Fraction of mSoftSnapSize for backface polys to have an influence.

Box3F mSoftSnapBounds 

The actual bounds used for the soft snap.

Point3F mSoftSnapDebugPoint 

The point we're attempting to snap to.

bool mSoftSnapDebugRender 

Activates debug rendering.

Triangle mSoftSnapDebugSnapTri 

The triangle we are snapping to.

Vector< Triangle > mSoftSnapDebugTriangles 

The triangles that are considered for snapping.

bool mSoftSnapIsStuck 

Are we snapping?

Box3F mSoftSnapPreBounds 

The bounds prior to any soft snapping (used when rendering the snap bounds)

bool mSoftSnapRender 

Render the soft snapping bounds.

bool mSoftSnapRenderTriangle 

Render the soft snapped triangle.

F32 mSoftSnapSize 

If not the selection bounds, use this size.

bool mSoftSnapSizeByBounds 

Use the selection bounds for the size.

Triangle mSoftSnapTriangle 

The triangle we are snapping to.

bool mStickToGround 
bool mStuckToGround 

Selection is stuck to the ground.

AlignmentType mTerrainSnapAlignment 

How does the stickied object align to the terrain.

bool mTerrainSnapOffsetZ 

Allows the use of an offset to avoid z-fighting with flat objects on a flat terrain.

bool mToggleIgnoreList 
bool mUseGroupCenter 

Private Attributes

EditorTool * mActiveEditorTool 
ClassInfo mClassInfo 
ClassInfo::Entry mDefaultClassEntry 
RectI mDragRect 
bool mDragSelect 
SimObjectPtr< Selection > mDragSelected 
Point2I mDragStart 
SimObjectPtr< SceneObject > mHitObject 
bool mIsDirty 
Gui3DMouseEvent mLastMouseDownEvent 
Gui3DMouseEvent mLastMouseEvent 
bool mMouseDown 
bool mMouseDragged 
SimObjectPtr< SceneObject > mPossibleHitObject 
S32 mRedirectID 
GFXStateBlockRef mRenderObjectBoxSB 
GFXStateBlockRef mRenderObjectFaceSB 
GFXStateBlockRef mRenderSelectionBoxSB 
SimObjectPtr< Selection > mSelected 
GFXStateBlockRef mSplineSB 
bool mUsingAxisGizmo 

Public Static Attributes

F32 smProjectDistance 

A large hard coded distance used to test object and icon selection.

Signal< void(WorldEditor *)> smRenderSceneSignal 

Protected Attributes

S32 mCurrentCursor 

Public Functions

WorldEditor()

~WorldEditor()

addUndoState()

alignByAxis(S32 axis)

alignByBounds(S32 boundsAxis)

canPasteSelection()

clearIgnoreList()

clearSelection()

colladaExportSelection(const String & path)

copyCurrentSelection()

copySelection(Selection * sel)

cutCurrentSelection()

cutSelection(Selection * sel)

DECLARE_CONOBJECT(WorldEditor )

dropAtGizmo(Selection * sel, const Point3F & gizmoPos)

dropBelowSelection(Selection * sel, const Point3F & centroid, bool useBottomBounds)

dropCurrentSelection(bool skipUndo)

dropSelection(Selection * sel)

explodeSelectedPrefab()

getActiveEditorTool()

getActiveSelectionSet()

getObjectsUseBoxCenter()

getSelectionBounds()

getSelectionCentroid()

getSelectionExtent()

getSelectionRadius()

getSelectionSize()

getSelectObject(S32 index)

hideObject(SceneObject * obj, bool hide)

hideSelection(bool hide)

ignoreObjClass(U32 argc, ConsoleValueRef * argv)

lockSelection(bool lock)

makeActiveSelectionSet(Selection * sel)

makeSelectionAMesh(const char * filename)

makeSelectionPrefab(const char * filename, bool dontReplaceOriginals)

objClassIgnored(const SimObject * obj)

on3DMouseDown(const Gui3DMouseEvent & event)

Reimplemented from: EditTSCtrl

on3DMouseDragged(const Gui3DMouseEvent & event)

Reimplemented from: EditTSCtrl

on3DMouseEnter(const Gui3DMouseEvent & event)

Reimplemented from: EditTSCtrl

on3DMouseLeave(const Gui3DMouseEvent & event)

Reimplemented from: EditTSCtrl

on3DMouseMove(const Gui3DMouseEvent & event)

Reimplemented from: EditTSCtrl

on3DMouseUp(const Gui3DMouseEvent & event)

Reimplemented from: EditTSCtrl

on3DRightMouseDown(const Gui3DMouseEvent & event)

Reimplemented from: EditTSCtrl

on3DRightMouseUp(const Gui3DMouseEvent & event)

Reimplemented from: EditTSCtrl

onAdd()

Reimplemented from: EditTSCtrl

onEditorEnable()

Reimplemented from: SimObject

pasteSelection(bool dropSel)

redirectConsole(S32 objID)

renderObjectBox(SceneObject * obj, const ColorI & col)

renderScene(const RectI & updateRect)

Reimplemented from: EditTSCtrl

resetSelectedRotation()

resetSelectedScale()

selectObject(const char * obj)

selectObject(SimObject * obj)

setDirty()

setEditorTool(EditorTool * )

setObjectsUseBoxCenter(bool state)

softSnapSelection(Selection * sel, U8 modifier, Point3F gizmoPos)

terrainSnapSelection(Selection * sel, U8 modifier, Point3F gizmoPos, bool forceStick)

transformSelection(bool position, Point3F & p, bool relativePos, bool rotate, EulerF & r, bool relativeRot, bool rotLocal, S32 scaleType, Point3F & s, bool sRelative, bool sLocal)

unselectObject(const char * obj)

unselectObject(SimObject * obj)

updateGuiInfo()

Reimplemented from: EditTSCtrl