This is an object class that can perform mouse operations to move the camera. It is used on operating systems with a mouse, such as Windows, Mac, and within the engine's Editor.
More...
#include <Camera/CEditorCamera.h>
|
| void | fixVector (core::vector3df &v) |
| | Cleans up tiny vector components to prevent floating point drift.
|
| void | updateInputRotate (core::vector3df &relativeRotation, f32 timeDiff, bool useCenterPivot=false) |
| | Updates horizontal and vertical orbit rotation.
|
| void | updateInputOffset (core::vector3df &offsetPosition, f32 timeDiff) |
| | Updates position offset (panning).
|
| void | updateInputZoom (f32 timeDiff, core::vector3df &pos, const core::vector3df &moveDir) |
| | Updates zoom by moving the camera along its forward vector.
|
|
void | setOwner (CGameObject *obj) |
|
|
CCamera * | m_camera |
| | Pointer to the CCamera component.
|
|
f32 | m_moveSpeed |
| | Panning/Movement sensitivity.
|
|
f32 | m_rotateSpeed |
| | Orbit/Rotation sensitivity.
|
|
f32 | m_zoomSpeed |
| | Zooming sensitivity.
|
|
gui::ICursorControl * | m_cursorControl |
| | Cursor control service for retrieving mouse position.
|
|
core::position2df | m_centerCursor |
| | Normalized cursor position at start of interaction.
|
|
core::position2df | m_cursorPos |
| | Current normalized cursor position.
|
|
bool | m_altKeyDown |
| | Modifier key states.
|
|
bool | m_ctrlKeyDown |
|
bool | m_shiftKeyDown |
|
bool | m_leftMousePress |
| | Basic mouse button states.
|
|
bool | m_rightMousePress |
|
bool | m_midMousePress |
|
bool | m_mayaLeftMousePress |
| | Specialized Maya mouse button states.
|
|
bool | m_mayaRightMousePress |
|
bool | m_mouseWhell |
| | Mouse wheel state and delta.
|
|
float | m_wheel |
|
float | m_pivotRotateDistance |
| | Distance from the pivot point for orbit rotation.
|
|
EControlStyle | m_controlStyle |
| | Active control style.
|
|
CGameObject * | m_gameObject |
|
bool | m_enable |
|
bool | m_serializable |
|
std::vector< CComponentSystem * > | m_linkComponent |
|
|
static int | useComponent (CComponentSystem *used) |
This is an object class that can perform mouse operations to move the camera. It is used on operating systems with a mouse, such as Windows, Mac, and within the engine's Editor.
◆ EControlStyle
Supported control styles for the editor camera.
| Enumerator |
|---|
| Maya | Standard WASD/Mouse controls.
|
| Blender | Alt-based navigation (Alt+LMB Rotate, Alt+MMB Pan, Alt+RMB Zoom).
Blender-style navigation (MMB Rotate, Shift+MMB Pan, Ctrl+MMB Zoom).
|
◆ endUpdate()
| virtual void Skylicht::CEditorCamera::endUpdate |
( |
| ) |
|
|
virtual |
◆ fixVector()
| void Skylicht::CEditorCamera::fixVector |
( |
core::vector3df & | v | ) |
|
|
protected |
Cleans up tiny vector components to prevent floating point drift.
- Parameters
-
◆ getCamera()
| CCamera * Skylicht::CEditorCamera::getCamera |
( |
| ) |
|
|
inline |
Gets the attached camera component.
- Returns
- Pointer to CCamera.
◆ getControlStyle()
◆ getMoveSpeed()
| float Skylicht::CEditorCamera::getMoveSpeed |
( |
| ) |
|
|
inline |
Gets the current panning speed.
- Returns
- Speed.
◆ getRotateSpeed()
| float Skylicht::CEditorCamera::getRotateSpeed |
( |
| ) |
|
|
inline |
Gets the current orbit rotation speed.
- Returns
- Speed.
◆ getZoomSpeed()
| float Skylicht::CEditorCamera::getZoomSpeed |
( |
| ) |
|
|
inline |
Gets the zooming speed.
- Returns
- Speed.
◆ initComponent()
| virtual void Skylicht::CEditorCamera::initComponent |
( |
| ) |
|
|
virtual |
◆ isLeftMousePressed()
| bool Skylicht::CEditorCamera::isLeftMousePressed |
( |
| ) |
|
|
inline |
Checks if the left mouse button is currently held.
- Returns
- True if pressed.
◆ isRightMousePressed()
| bool Skylicht::CEditorCamera::isRightMousePressed |
( |
| ) |
|
|
inline |
Checks if the right mouse button is currently held.
- Returns
- True if pressed.
◆ setControlStyle()
| void Skylicht::CEditorCamera::setControlStyle |
( |
EControlStyle | style | ) |
|
|
inline |
Sets the active control style (Maya, Blender, etc.).
- Parameters
-
◆ setMoveSpeed()
| void Skylicht::CEditorCamera::setMoveSpeed |
( |
float | speed | ) |
|
|
inline |
Sets the panning speed.
- Parameters
-
◆ setPivotRotate()
| void Skylicht::CEditorCamera::setPivotRotate |
( |
const core::vector3df & | pos | ) |
|
Sets the orbit pivot point and calculates distance.
- Parameters
-
| pos | World position of the pivot. |
◆ setPivotRotateDistance()
| void Skylicht::CEditorCamera::setPivotRotateDistance |
( |
float | d | ) |
|
|
inline |
Directly sets the distance to the orbit pivot.
- Parameters
-
◆ setRotateSpeed()
| void Skylicht::CEditorCamera::setRotateSpeed |
( |
float | speed | ) |
|
|
inline |
Sets the orbit rotation speed.
- Parameters
-
◆ setZoomSpeed()
| void Skylicht::CEditorCamera::setZoomSpeed |
( |
float | z | ) |
|
|
inline |
Sets the zooming speed.
- Parameters
-
◆ updateComponent()
| virtual void Skylicht::CEditorCamera::updateComponent |
( |
| ) |
|
|
virtual |
◆ updateInputOffset()
| void Skylicht::CEditorCamera::updateInputOffset |
( |
core::vector3df & | offsetPosition, |
|
|
f32 | timeDiff ) |
|
protected |
Updates position offset (panning).
- Parameters
-
| offsetPosition | [out] Calculated world offset. |
| timeDiff | Elapsed time. |
◆ updateInputRotate()
| void Skylicht::CEditorCamera::updateInputRotate |
( |
core::vector3df & | relativeRotation, |
|
|
f32 | timeDiff, |
|
|
bool | useCenterPivot = false ) |
|
protected |
Updates horizontal and vertical orbit rotation.
- Parameters
-
| relativeRotation | [in/out] Current rotation angles. |
| timeDiff | Elapsed time. |
| useCenterPivot | Whether to rotate around the pivot point. |
◆ updateInputZoom()
| void Skylicht::CEditorCamera::updateInputZoom |
( |
f32 | timeDiff, |
|
|
core::vector3df & | pos, |
|
|
const core::vector3df & | moveDir ) |
|
protected |
Updates zoom by moving the camera along its forward vector.
- Parameters
-
| timeDiff | Elapsed time. |
| pos | [in/out] Camera position. |
| moveDir | Forward viewing direction. |
The documentation for this class was generated from the following file: