GuiShapeEdPreview
Engine/source/gui/editor/guiShapeEdPreview.h
Classes:
Mouse event handlers
onMouseDown(const GuiEvent & event)
onMouseMove(const GuiEvent & event)
onMouseDragged(const GuiEvent & event)
onMiddleMouseDown(const GuiEvent & event)
onMiddleMouseUp(const GuiEvent & event)
onMiddleMouseDragged(const GuiEvent & event)
onRightMouseDown(const GuiEvent & event)
onRightMouseUp(const GuiEvent & event)
onRightMouseDragged(const GuiEvent & event)
on3DMouseWheelUp(const Gui3DMouseEvent & event)
on3DMouseWheelDown(const Gui3DMouseEvent & event)
Threads
removeThread(S32 slot)
setTimeScale(F32 scale)
setActiveThreadSequence(const char * seqName, F32 duration, F32 pos, bool play)
setThreadSequence(Thread & thread, TSShapeInstance * shape, const char * seqName, F32 duration, F32 pos, bool play)
const char *
DECLARE_CALLBACK(void , onThreadPosChanged , (F32 pos, bool inTransition) )
Mounting
bool
mountShape(const char * modelName, const char * nodeName, const char * mountType, S32 slot)
setMountNode(S32 mountSlot, const char * nodeName)
const char *
getMountThreadSequence(S32 mountSlot)
setMountThreadSequence(S32 mountSlot, const char * seqName)
getMountThreadPos(S32 mountSlot)
setMountThreadPos(S32 mountSlot, F32 pos)
getMountThreadDir(S32 mountSlot)
setMountThreadDir(S32 mountSlot, F32 dir)
unmountShape(S32 mountSlot)
Rendering
bool
getCameraTransform(MatrixF * cameraMatrix)
computeSceneBounds(Box3F & bounds)
bool
getMeshHidden(const char * name)
setMeshHidden(const char * name, bool hidden)
setAllMeshesHidden(bool hidden)
renderWorld(const RectI & updateRect)
Subclasses can override this to perform 3D rendering.
Protected Types
Parent
Protected Attributes
Number of collision meshes.
Current detail level.
Number of polys (triangles) in current detail level.
Size of current detail level.
bool
True if editing the sun direction, false otherwise.
bool
If false, the detail level will be determined based on camera distance.
Used to track transform changes within a single gizmo drag action.
Dimension of grid in perspective view (eg. 30x30)
Index of the node the mouse is over.
Number of draw calls in the current detail level.
Number of materials in the current detail level.
Number of vertex weights in the current detail level (skins only)
Current pixel size.
Projected screen positions of the model nodes.
bool
bool
bool
bool
bool
bool
bool
Index of the selected node.
Detail mesh index of the selected object.
Name of the selected object.
bool
Protected Static Functions
const char *
getFieldThreadDir(void * object, const char * data)
const char *
getFieldThreadIn(void * object, const char * data)
const char *
getFieldThreadOut(void * object, const char * data)
const char *
getFieldThreadPingPong(void * object, const char * data)
const char *
getFieldThreadPos(void * object, const char * data)
bool
setFieldCurrentDL(void * object, const char * index, const char * data)
bool
setFieldSunAmbient(void * object, const char * index, const char * data)
bool
setFieldSunAngleX(void * object, const char * index, const char * data)
bool
setFieldSunAngleZ(void * object, const char * index, const char * data)
bool
setFieldSunDiffuse(void * object, const char * index, const char * data)
bool
setFieldThreadDir(void * object, const char * index, const char * data)
bool
setFieldThreadIn(void * object, const char * index, const char * data)
bool
setFieldThreadOut(void * object, const char * index, const char * data)
bool
setFieldThreadPingPong(void * object, const char * index, const char * data)
bool
setFieldThreadPos(void * object, const char * index, const char * data)
Protected Functions
collideNode(const Gui3DMouseEvent & event)
handleMouseDown(const GuiEvent & event, GizmoMode mode)
handleMouseDragged(const GuiEvent & event, GizmoMode mode)
handleMouseMove(const GuiEvent & event, GizmoMode mode)
handleMouseUp(const GuiEvent & event, GizmoMode mode)
renderNodeAxes(S32 index, const LinearColorF & nodeColor)
renderNodeName(S32 index, const LinearColorF & textColor)
updateDetailLevel(const SceneRenderState * state)
updateThreads(F32 delta)
Public Functions
DECLARE_CATEGORY("Gui Editor" )
exportToCollada(const String & path)
get3DCursor(GuiCursor *& cursor, bool & visible, const Gui3DMouseEvent & event_)
bool
onWake()
Called when this object is asked to wake up returns true if it's actually awake at the end.
setCurrentDetail(S32 dl)
setDisplayType(S32 type)
bool
setObjectModel(const char * modelName)
setOrbitPos(const Point3F & pos)
Public Static Functions
Detailed Description
Mouse event handlers
onMouseDown(const GuiEvent & event)
Reimplemented from: EditTSCtrl
onMouseUp(const GuiEvent & event)
Reimplemented from: EditTSCtrl
onMouseMove(const GuiEvent & event)
Reimplemented from: EditTSCtrl
onMouseDragged(const GuiEvent & event)
Reimplemented from: EditTSCtrl
onMiddleMouseDown(const GuiEvent & event)
Reimplemented from: EditTSCtrl
onMiddleMouseUp(const GuiEvent & event)
Reimplemented from: EditTSCtrl
onMiddleMouseDragged(const GuiEvent & event)
Reimplemented from: EditTSCtrl
onRightMouseDown(const GuiEvent & event)
Reimplemented from: EditTSCtrl
onRightMouseUp(const GuiEvent & event)
Reimplemented from: EditTSCtrl
onRightMouseDragged(const GuiEvent & event)
Reimplemented from: EditTSCtrl
on3DMouseWheelUp(const Gui3DMouseEvent & event)
Reimplemented from: EditTSCtrl
on3DMouseWheelDown(const Gui3DMouseEvent & event)
Reimplemented from: EditTSCtrl
Threads
addThread()
removeThread(S32 slot)
getThreadCount()
setTimeScale(F32 scale)
setActiveThreadSequence(const char * seqName, F32 duration, F32 pos, bool play)
setThreadSequence(Thread & thread, TSShapeInstance * shape, const char * seqName, F32 duration, F32 pos, bool play)
getThreadSequence()
refreshThreadSequences()
DECLARE_CALLBACK(void , onThreadPosChanged , (F32 pos, bool inTransition) )
Mounting
mountShape(const char * modelName, const char * nodeName, const char * mountType, S32 slot)
setMountNode(S32 mountSlot, const char * nodeName)
getMountThreadSequence(S32 mountSlot)
setMountThreadSequence(S32 mountSlot, const char * seqName)
getMountThreadPos(S32 mountSlot)
setMountThreadPos(S32 mountSlot, F32 pos)
getMountThreadDir(S32 mountSlot)
setMountThreadDir(S32 mountSlot, F32 dir)
unmountShape(S32 mountSlot)
unmountAll()
Rendering
getCameraTransform(MatrixF * cameraMatrix)
Reimplemented from: EditTSCtrl
computeSceneBounds(Box3F & bounds)
Reimplemented from: EditTSCtrl
getMeshHidden(const char * name)
setMeshHidden(const char * name, bool hidden)
setAllMeshesHidden(bool hidden)
renderWorld(const RectI & updateRect)
Reimplemented from: GuiTSCtrl
renderGui(Point2I offset, const RectI & updateRect)
Reimplemented from: GuiTSCtrl
Protected Types
typedef EditTSCtrl Parent
Protected Attributes
S32 mActiveThread
EulerF mCameraRot
S32 mColMeshes
Number of collision meshes.
S32 mColPolys
Number of collision polygons (all meshes)
S32 mCurrentDL
Current detail level.
S32 mDetailPolys
Number of polys (triangles) in current detail level.
S32 mDetailSize
Size of current detail level.
bool mEditingSun
True if editing the sun direction, false otherwise.
LightInfo * mFakeSun
bool mFixedDetail
If false, the detail level will be determined based on camera distance.
S32 mGizmoDragID
Used to track transform changes within a single gizmo drag action.
Point2I mGridDimension
Dimension of grid in perspective view (eg. 30x30)
S32 mHoverNode
Index of the node the mouse is over.
S32 mLastRenderTime
TSShapeInstance * mModel
Vector< MountedShape * > mMounts
F32 mMoveSpeed
S32 mNumBones
Number of bones in the current detail level (skins only)
S32 mNumDrawCalls
Number of draw calls in the current detail level.
S32 mNumMaterials
Number of materials in the current detail level.
S32 mNumWeights
Number of vertex weights in the current detail level (skins only)
F32 mOrbitDist
Point3F mOrbitPos
F32 mPixelSize
Current pixel size.
Vector< Point3F > mProjectedNodes
Projected screen positions of the model nodes.
bool mRenderBounds
bool mRenderCameraAxes
bool mRenderColMeshes
bool mRenderGhost
bool mRenderMounts
bool mRenderNodes
bool mRenderObjBox
S32 mSelectedNode
Index of the selected node.
S32 mSelectedObjDetail
Detail mesh index of the selected object.
S32 mSelectedObject
Name of the selected object.
ColorI mSunAmbientColor
ColorI mSunDiffuseColor
EulerF mSunRot
Vector< Thread > mThreads
F32 mTimeScale
bool mUsingAxisGizmo
F32 mZoomSpeed
Protected Static Functions
getFieldThreadDir(void * object, const char * data)
getFieldThreadIn(void * object, const char * data)
getFieldThreadOut(void * object, const char * data)
getFieldThreadPingPong(void * object, const char * data)
getFieldThreadPos(void * object, const char * data)
setFieldCurrentDL(void * object, const char * index, const char * data)
setFieldSunAmbient(void * object, const char * index, const char * data)
setFieldSunAngleX(void * object, const char * index, const char * data)
setFieldSunAngleZ(void * object, const char * index, const char * data)
setFieldSunDiffuse(void * object, const char * index, const char * data)
setFieldThreadDir(void * object, const char * index, const char * data)
setFieldThreadIn(void * object, const char * index, const char * data)
setFieldThreadOut(void * object, const char * index, const char * data)
setFieldThreadPingPong(void * object, const char * index, const char * data)
setFieldThreadPos(void * object, const char * index, const char * data)
Protected Functions
collideNode(const Gui3DMouseEvent & event)
handleMouseDown(const GuiEvent & event, GizmoMode mode)
handleMouseDragged(const GuiEvent & event, GizmoMode mode)
handleMouseMove(const GuiEvent & event, GizmoMode mode)
handleMouseUp(const GuiEvent & event, GizmoMode mode)
renderCollisionMeshes()
renderGrid()
Reimplemented from: EditTSCtrl
renderNodeAxes(S32 index, const LinearColorF & nodeColor)
renderNodeName(S32 index, const LinearColorF & textColor)
renderNodes()
renderSunDirection()
updateDetailLevel(const SceneRenderState * state)
updateProjectedNodePoints()
updateSun()
updateThreads(F32 delta)
Public Functions
GuiShapeEdPreview()
~GuiShapeEdPreview()
DECLARE_CATEGORY("Gui Editor" )
DECLARE_CONOBJECT(GuiShapeEdPreview )
exportToCollada(const String & path)
fitToShape()
get3DCursor(GuiCursor *& cursor, bool & visible, const Gui3DMouseEvent & event_)
Reimplemented from: EditTSCtrl
getModel()
onWake()
Reimplemented from: GuiTSCtrl
refreshShape()
setCurrentDetail(S32 dl)
setDisplayType(S32 type)
Reimplemented from: EditTSCtrl
setObjectModel(const char * modelName)
setOrbitPos(const Point3F & pos)
updateNodeTransforms()