![]() |
Skylicht Engine
|
This is an object class that makes it easier to switch between multiple cameras. More...
#include <Camera/CCameraBrain.h>
Public Member Functions | |
| virtual void | initComponent () |
| virtual void | updateComponent () |
| virtual void | lateUpdate () |
| void | setTargetCamera (CCamera *cam, float blendTarget=1.0f) |
| Sets a new target camera and initiates blending. | |
| CCamera * | getCamera () |
| Gets the main camera component controlled by this brain. | |
| CCamera * | getTargetCamera () |
| Gets the current target camera. | |
| void | setBlendValue (float value) |
| Manually sets the blending factor. | |
| float | getBlendValue () |
| Gets the current blending factor. | |
| const core::vector3df & | getPosition () |
| Gets the current blended world position. | |
| const core::vector3df & | getLookAt () |
| Gets the current blended forward look direction. | |
| const core::vector3df & | getUp () |
| Gets the current blended 'up' vector. | |
| Public Member Functions inherited from Skylicht::CComponentSystem | |
| const char * | getName () |
| virtual void | reset () |
| virtual void | startComponent () |
| virtual void | endUpdate () |
| virtual void | onEnable (bool b) |
| virtual void | onUpdateCullingLayer (u32 mask) |
| virtual CObjectSerializable * | createSerializable () |
| virtual void | loadSerializable (CObjectSerializable *object) |
| void | setEnable (bool b) |
| bool | isEnable () |
| CGameObject * | getGameObject () |
| void | setEnableSerializable (bool b) |
| bool | isSerializable () |
| void | addLinkComponent (CComponentSystem *comp) |
| void | removeAllLink () |
| Public Member Functions inherited from Skylicht::IActivatorObject | |
| virtual | ~IActivatorObject () |
| Virtual destructor for polymorphic activator objects. | |
Protected Attributes | |
| CCamera * | m_camera |
| Pointer to the main camera component being controlled. | |
| CCamera * | m_targetCamera |
| The target camera to blend towards. | |
| float | m_blend |
| Current blending factor (0 to 1). | |
| core::vector3df | m_position |
| Current blended world position. | |
| core::vector3df | m_lookAt |
| Current blended forward direction. | |
| core::vector3df | m_upVector |
| Current blended up direction. | |
| float | m_viewFov |
| Current blended FOV. | |
| float | m_viewNear |
| Current blended near plane. | |
| float | m_viewFar |
| Current blended far plane. | |
| core::vector3df | m_lastPosition |
| Last position before starting a new blend. | |
| core::vector3df | m_lastLookAt |
| Last forward direction before starting a new blend. | |
| core::vector3df | m_lastUpVector |
| Last up direction before starting a new blend. | |
| float | m_lastFov |
| Last FOV before starting a new blend. | |
| float | m_lastNear |
| Last near plane before starting a new blend. | |
| float | m_lastFar |
| Last far plane before starting a new blend. | |
| Protected Attributes inherited from Skylicht::CComponentSystem | |
| CGameObject * | m_gameObject |
| bool | m_enable |
| bool | m_serializable |
| std::vector< CComponentSystem * > | m_linkComponent |
Additional Inherited Members | |
| Static Public Member Functions inherited from Skylicht::CComponentSystem | |
| static int | useComponent (CComponentSystem *used) |
| Protected Member Functions inherited from Skylicht::CComponentSystem | |
| void | setOwner (CGameObject *obj) |
This is an object class that makes it easier to switch between multiple cameras.
You can use CTween and CTweenManager to make the camera transitions smoother.
Example of setting up a brain camera
|
inline |
Gets the current blending factor.
|
inline |
Gets the main camera component controlled by this brain.
|
inline |
Gets the current blended forward look direction.
|
inline |
Gets the current blended world position.
|
inline |
Gets the current target camera.
|
inline |
Gets the current blended 'up' vector.
|
virtual |
Implements Skylicht::CComponentSystem.
|
virtual |
Implements Skylicht::ILateUpdate.
|
inline |
Manually sets the blending factor.
| value | Blending factor (0.0 = old camera, 1.0 = target camera). |
| void Skylicht::CCameraBrain::setTargetCamera | ( | CCamera * | cam, |
| float | blendTarget = 1.0f ) |
Sets a new target camera and initiates blending.
| cam | Pointer to the target camera. |
| blendTarget | Initial blend value (default: 1.0, immediate switch). |
|
virtual |
Implements Skylicht::CComponentSystem.