29#include "Utils/CActivator.h"
31#include "Components/CComponentSystem.h"
32#include "Components/ILateUpdate.h"
34#include "GameObject/CGameObject.h"
35#include "Entity/CEntity.h"
36#include "Transform/CWorldTransformData.h"
68 class SKYLICHT_API C3rdCamera :
69 public CComponentSystem,
124 virtual ~C3rdCamera();
126 virtual void initComponent();
128 virtual void updateComponent();
130 virtual void lateUpdate();
This is an object class that provides additional support for the camera, such as looking at a specifi...
Definition C3rdCamera.h:72
const core::vector3df & getTargetOffset()
Gets the target offset.
Definition C3rdCamera.h:285
void setTargetOffset(const core::vector3df &offset)
Sets an offset from the follow target (e.g., to frame the character).
Definition C3rdCamera.h:276
void setOrientation(float pan, float tilt)
Configures initial orbit orientation.
Definition C3rdCamera.h:200
float m_maxVerticalAngle
Maximum vertical tilt angle.
Definition C3rdCamera.h:95
int m_touchId
Tracking touch ID for rotation.
Definition C3rdCamera.h:107
core::position2df m_centerCursor
Normalized cursor position at start of drag.
Definition C3rdCamera.h:110
void setFollowTarget(CEntity *entity)
Sets an entity as the orbit target.
Definition C3rdCamera.h:176
CCamera * getCamera()
Gets the attached camera component.
Definition C3rdCamera.h:138
float getMaxVerticalAngle()
Gets the maximum vertical tilt angle.
Definition C3rdCamera.h:231
float getTargetDistance()
Gets the current distance from the target.
Definition C3rdCamera.h:267
float m_camTilt
Vertical rotation angle (-89 to +89).
Definition C3rdCamera.h:101
void setFollowTarget(CGameObject *object)
Sets a GameObject as the orbit target.
Definition C3rdCamera.h:166
void setFollowPosition(const core::vector3df &pos)
Sets a static world position for the camera to orbit.
Definition C3rdCamera.h:147
core::position2df m_cursorPos
Current normalized cursor position.
Definition C3rdCamera.h:113
float getCameraTilt()
Gets the current vertical rotation.
Definition C3rdCamera.h:258
void setOrientation(float pan, float tilt, float distance)
Configures initial orbit orientation and distance.
Definition C3rdCamera.h:188
float m_camPan
Horizontal rotation angle (0-360).
Definition C3rdCamera.h:98
core::vector3df m_targetOffset
Offset from the follow target.
Definition C3rdCamera.h:86
core::vector3df m_followPosition
The position being followed (if m_isFollowPosition is true).
Definition C3rdCamera.h:83
void setTargetDistance(float d)
Sets the distance from the target.
Definition C3rdCamera.h:240
float getMinVerticalAngle()
Gets the minimum vertical tilt angle.
Definition C3rdCamera.h:222
CEntity * m_followEntity
The entity being followed.
Definition C3rdCamera.h:80
bool m_isFollowPosition
Whether to follow a static position or an entity.
Definition C3rdCamera.h:89
CCamera * m_camera
Pointer to the CCamera component.
Definition C3rdCamera.h:77
float getCameraPan()
Gets the current horizontal rotation.
Definition C3rdCamera.h:249
void setMinMaxVerticaAngle(float min, float max)
Sets vertical rotation limits.
Definition C3rdCamera.h:212
void updateInputRotate(float timeDiff)
Internal helper to process rotation input.
float m_targetDistance
Distance from the target.
Definition C3rdCamera.h:104
virtual bool OnEvent(const SEvent &event)
Called if an event happened.
float m_rotateSpeed
Rotation sensitivity.
Definition C3rdCamera.h:119
const core::vector3df & getFollowPosition()
Gets the static orbit position.
Definition C3rdCamera.h:157
bool m_leftMousePress
Whether the primary mouse button is pressed.
Definition C3rdCamera.h:116
float m_minVerticalAngle
Minimum vertical tilt angle.
Definition C3rdCamera.h:92
This is an object class used to set up the camera, including its position, viewing angle,...
Definition CCamera.h:70
This is the object class that describes an entity.
Definition CEntity.h:58
Definition ILateUpdate.h:6
Interface of an object which can receive events.
Definition IEventReceiver.h:474
Everything in the Skylicht Engine. You can start by looking at the topics.
Definition AudioDebugLog.h:29
vector3d< f32 > vector3df
Typedef for a f32 3d vector.
Definition vector3d.h:445
const T clamp(const T &value, const T &low, const T &high)
clamps a value between low and high
Definition irrMath.h:166
vector2d< f32 > position2df
Definition position2d.h:21
SEvents hold information about an event. See irr::IEventReceiver for details on event handling.
Definition IEventReceiver.h:273