GuiObjectView
Engine/source/T3D/guiObjectView.h
A control that displays a TSShape in its view.
Mouse Control
MouseState { None Rotating Zooming }
Current mouse operation.
Last mouse position during tracked mouse operations.
Model
getModel()
Return the instance of the model being rendered in the view.
setObjectModel(const String & modelName)
Set the model to show in this view.
Name of the model loaded for display.
Model being displayed in the view.
Camera State
Multiplier for camera mouse operations (rotation and zooming).
Mounting
Return the model mounted to the current primary model; NULL if none.
Return the name of the skin used on the mounted model.
setMountSkin(const String & name)
Set the skin to use on the mounted model.
setMountNode(S32 index)
setMountNode(const String & nodeName)
setMountedObject(const String & modelName)
Name of model to mount to the primary model.
Index of the node to mount the secondary model to. -1 (disabled) by default.
Name of node to mount the secondary model to. Unset by default.
Model mounted as an image to the primary model.
Animation
setObjectAnimation(S32 seqIndex)
Set the animation sequence to play on the model.
setObjectAnimation(const String & sequenceName)
Set the animation sequence to play on the model.
Index of the animation sequence to play on the model. -1 (disabled) by default.
Name of the animation sequence to play on the model. Unset by default.
TSThread *
Animation thread on the model.
Last time we rendered the model. Used for animation.
Lighting
setLightColor(const LinearColorF & color)
setLightAmbient(const LinearColorF & color)
setLightDirection(const Point3F & direction)
Camera
Return the current camera speed multiplier.
setCameraSpeed(F32 factor)
Set the multiplier to apply to camera rotation and zooming.
setOrbitDistance(F32 distance)
Sets the distance at which the camera orbits the object.
setCameraRotation(const EulerF & rotation)
Sets the angle of the camera on it's orbit in relation to the object.
Public Types
Parent
Public Functions
DECLARE_CALLBACK(void , onMouseEnter , () )
DECLARE_CALLBACK(void , onMouseLeave , () )
DECLARE_DESCRIPTION("A <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> that shows <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/class/classtsshape/">TSShape</a> model." )
onMouseDown(const GuiEvent & event)
onMouseDragged(const GuiEvent & event)
onMouseEnter(const GuiEvent & event)
onMouseLeave(const GuiEvent & event)
onRightMouseDown(const GuiEvent & event)
onRightMouseDragged(const GuiEvent & event)
onRightMouseUp(const GuiEvent & event)
bool
onWake()
Called when this object is asked to wake up returns true if it's actually awake at the end.
bool
processCameraQuery(CameraQuery * query)
renderWorld(const RectI & updateRect)
Subclasses can override this to perform 3D rendering.
Protected Functions
onStaticModified(StringTableEntry slotName, const char * newValue)
Specifically, these are called by setDataField when a static or dynamic field is modified, see the console details.
Public Static Functions
Detailed Description
A control that displays a TSShape in its view.
Mouse Control
MouseState
Enumerator
- None
- Rotating
- Zooming
MouseState mMouseState
Current mouse operation.
Point2I mLastMousePoint
Last mouse position during tracked mouse operations.
Model
getModelName()
getModel()
Return the instance of the model being rendered in the view.
getSkin()
Return the name of the skin used on the primary model.
setSkin(const String & name)
Set the skin to use on the primary model.
setObjectModel(const String & modelName)
Set the model to show in this view.
String mModelName
Name of the model loaded for display.
TSShapeInstance * mModel
Model being displayed in the view.
String mSkinName
Name of skin to use on model.
Camera State
Point3F mCameraPos
MatrixF mCameraMatrix
EulerF mCameraRot
Point3F mOrbitPos
F32 mMaxOrbitDist
F32 mMinOrbitDist
EulerF mCameraRotation
F32 mOrbitDist
F32 mCameraSpeed
Multiplier for camera mouse operations (rotation and zooming).
Mounting
getMountedModel()
Return the model mounted to the current primary model; NULL if none.
getMountedModelName()
getMountSkin()
Return the name of the skin used on the mounted model.
setMountSkin(const String & name)
Set the skin to use on the mounted model.
setMountNode(S32 index)
setMountNode(const String & nodeName)
setMountedObject(const String & modelName)
String mMountedModelName
Name of model to mount to the primary model.
String mMountSkinName
S32 mMountNode
Index of the node to mount the secondary model to. -1 (disabled) by default.
String mMountNodeName
Name of node to mount the secondary model to. Unset by default.
TSShapeInstance * mMountedModel
Model mounted as an image to the primary model.
MatrixF mMountTransform
Animation
setObjectAnimation(S32 seqIndex)
Set the animation sequence to play on the model.
Parameters:
seqIndex | Index of sequence to play. |
setObjectAnimation(const String & sequenceName)
Set the animation sequence to play on the model.
Parameters:
seqIndex | Name of sequence to play. |
S32 mAnimationSeq
Index of the animation sequence to play on the model. -1 (disabled) by default.
String mAnimationSeqName
Name of the animation sequence to play on the model. Unset by default.
TSThread * mRunThread
Animation thread on the model.
S32 mLastRenderTime
Last time we rendered the model. Used for animation.
Lighting
setLightColor(const LinearColorF & color)
setLightAmbient(const LinearColorF & color)
setLightDirection(const Point3F & direction)
LightInfo * mLight
Light object used as sun during rendering.
LinearColorF mLightColor
LinearColorF mLightAmbient
Point3F mLightDirection
Camera
getCameraSpeed()
Return the current camera speed multiplier.
setCameraSpeed(F32 factor)
Set the multiplier to apply to camera rotation and zooming.
getOrbitDistance()
setOrbitDistance(F32 distance)
Sets the distance at which the camera orbits the object.
Clamped to the acceptable range defined in the class by min and max orbit distances.
Parameters:
distance | The distance to set the orbit to (will be clamped). |
setCameraRotation(const EulerF & rotation)
Sets the angle of the camera on it's orbit in relation to the object.
Public Types
typedef GuiTSCtrl Parent
Public Functions
GuiObjectView()
~GuiObjectView()
DECLARE_CALLBACK(void , onMouseEnter , () )
DECLARE_CALLBACK(void , onMouseLeave , () )
DECLARE_CONOBJECT(GuiObjectView )
DECLARE_DESCRIPTION("A <a href="/coding/file/guieditctrl_8cpp/#guieditctrl_8cpp_1abb04e3738c4c5a96b3ade6fa47013a6c">control</a> that shows <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> <a href="/coding/class/classtsshape/">TSShape</a> model." )
onMouseDown(const GuiEvent & event)
Reimplemented from: GuiControl
onMouseDragged(const GuiEvent & event)
Reimplemented from: GuiControl
onMouseEnter(const GuiEvent & event)
Reimplemented from: GuiControl
onMouseLeave(const GuiEvent & event)
Reimplemented from: GuiControl
onMouseUp(const GuiEvent & event)
Reimplemented from: GuiControl
onRightMouseDown(const GuiEvent & event)
Reimplemented from: GuiControl
onRightMouseDragged(const GuiEvent & event)
Reimplemented from: GuiControl
onRightMouseUp(const GuiEvent & event)
Reimplemented from: GuiControl
onWake()
Reimplemented from: GuiTSCtrl
processCameraQuery(CameraQuery * query)
Reimplemented from: GuiTSCtrl
renderWorld(const RectI & updateRect)
Reimplemented from: GuiTSCtrl
Protected Functions
_initAnimation()
_initMount()
onStaticModified(StringTableEntry slotName, const char * newValue)
Reimplemented from: SimObject