27#include "Utils/CActivator.h"
29#include "Components/CComponentSystem.h"
35 class SKYLICHT_API CEditorCamera :
36 public CComponentSystem,
79 bool m_rightMousePress;
84 bool m_mayaRightMousePress;
99 virtual ~CEditorCamera();
101 virtual void initComponent();
103 virtual void updateComponent();
105 virtual void endUpdate();
107 virtual bool OnEvent(
const SEvent& event);
109 DECLARE_GETTYPENAME(CEditorCamera)
199 return m_rightMousePress;
240 void updateInputRotate(core::vector3df& relativeRotation, f32 timeDiff,
bool useCenterPivot =
false);
255 void updateInputZoom(f32 timeDiff, core::vector3df& pos,
const core::vector3df& moveDir);
This is an object class used to set up the camera, including its position, viewing angle,...
Definition CCamera.h:70
void setControlStyle(EControlStyle style)
Sets the active control style (Maya, Blender, etc.).
Definition CEditorCamera.h:179
gui::ICursorControl * m_cursorControl
Cursor control service for retrieving mouse position.
Definition CEditorCamera.h:64
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 setPivotRotateDistance(float d)
Directly sets the distance to the orbit pivot.
Definition CEditorCamera.h:221
void setMoveSpeed(float speed)
Sets the panning speed.
Definition CEditorCamera.h:125
bool isRightMousePressed()
Checks if the right mouse button is currently held.
Definition CEditorCamera.h:197
bool m_altKeyDown
Modifier key states.
Definition CEditorCamera.h:73
bool isLeftMousePressed()
Checks if the left mouse button is currently held.
Definition CEditorCamera.h:206
CCamera * m_camera
Pointer to the CCamera component.
Definition CEditorCamera.h:52
bool m_leftMousePress
Basic mouse button states.
Definition CEditorCamera.h:78
f32 m_moveSpeed
Panning/Movement sensitivity.
Definition CEditorCamera.h:55
bool m_mayaLeftMousePress
Specialized Maya mouse button states.
Definition CEditorCamera.h:83
void setZoomSpeed(float z)
Sets the zooming speed.
Definition CEditorCamera.h:161
float getRotateSpeed()
Gets the current orbit rotation speed.
Definition CEditorCamera.h:143
void updateInputRotate(core::vector3df &relativeRotation, f32 timeDiff, bool useCenterPivot=false)
Updates horizontal and vertical orbit rotation.
float getZoomSpeed()
Gets the zooming speed.
Definition CEditorCamera.h:152
core::position2df m_cursorPos
Current normalized cursor position.
Definition CEditorCamera.h:70
float m_pivotRotateDistance
Distance from the pivot point for orbit rotation.
Definition CEditorCamera.h:91
CCamera * getCamera()
Gets the attached camera component.
Definition CEditorCamera.h:170
float getMoveSpeed()
Gets the current panning speed.
Definition CEditorCamera.h:134
core::position2df m_centerCursor
Normalized cursor position at start of interaction.
Definition CEditorCamera.h:67
bool m_mouseWhell
Mouse wheel state and delta.
Definition CEditorCamera.h:87
EControlStyle getControlStyle()
Gets the current control style.
Definition CEditorCamera.h:188
void setRotateSpeed(float speed)
Sets the orbit rotation speed.
Definition CEditorCamera.h:116
EControlStyle m_controlStyle
Active control style.
Definition CEditorCamera.h:94
f32 m_zoomSpeed
Zooming sensitivity.
Definition CEditorCamera.h:61
void fixVector(core::vector3df &v)
Cleans up tiny vector components to prevent floating point drift.
EControlStyle
Supported control styles for the editor camera.
Definition CEditorCamera.h:44
@ Blender
Alt-based navigation (Alt+LMB Rotate, Alt+MMB Pan, Alt+RMB Zoom).
Definition CEditorCamera.h:47
@ Maya
Standard WASD/Mouse controls.
Definition CEditorCamera.h:46
f32 m_rotateSpeed
Orbit/Rotation sensitivity.
Definition CEditorCamera.h:58
void setPivotRotate(const core::vector3df &pos)
Sets the orbit pivot point and calculates distance.
Everything in the Skylicht Engine. You can start by looking at the topics.
Definition AudioDebugLog.h:29