76 static void SetMainCamera(
const Camera & camera);
77 static Camera * GetMainCamera();
79 inline void SetPosition(
const vcm::Vec3& position) { _impl->As<
CameraImpl>()->SetPosition(position); }
80 inline void Move(
const vcm::Vec3& delta) { _impl->As<
CameraImpl>()->Move(delta); }
81 inline void MoveForward(
const float delta) { _impl->As<
CameraImpl>()->MoveForward(delta); }
82 inline void MoveRight(
const float delta) { _impl->As<
CameraImpl>()->MoveRight(delta); }
83 inline void MoveUp(
const float delta) { _impl->As<
CameraImpl>()->MoveUp(delta); }
84 inline const vcm::Vec3 & GetPosition()
const {
return _impl->As<
CameraImpl>()->GetPosition(); }
86 inline void SetYaw(
float angle) { _impl->As<
CameraImpl>()->SetYaw(angle); }
87 inline void SetPitch(
float angle) { _impl->As<
CameraImpl>()->SetPitch(angle); }
88 inline void SetRoll(
float angle) { _impl->As<
CameraImpl>()->SetRoll(angle); }
89 inline void SetRotation(
const vcm::Vec3& rotation) { _impl->As<
CameraImpl>()->SetRotation(rotation); }
90 inline void RotateYaw(
float angle) { _impl->As<
CameraImpl>()->RotateYaw(angle); }
91 inline void RotatePitch(
float angle) { _impl->As<
CameraImpl>()->RotatePitch(angle); }
92 inline void RotateRoll(
float angle) { _impl->As<
CameraImpl>()->RotateRoll(angle); }
93 inline void Rotate(
const vcm::Vec3 & rotation) { _impl->As<
CameraImpl>()->Rotate(rotation); }
94 inline const vcm::Quat & GetRotationQuat()
const {
return _impl->As<
CameraImpl>()->GetRotationQuat(); }
95 inline const vcm::Vec3 & GetRotation()
const {
return _impl->As<
CameraImpl>()->GetRotation(); }
97 inline const vcm::Mat4 & GetViewMatrix() {
return _impl->As<
CameraImpl>()->GetViewMatrix(); }
98 inline void SetPerspective(
float fovY,
float aspectRatio,
float nearPlane,
float farPlane) { _impl->As<
CameraImpl>()->SetPerspective(fovY, aspectRatio, nearPlane, farPlane); }
99 inline const vcm::Mat4 & GetProjectionMatrix() {
return _impl->As<
CameraImpl>()->GetProjectionMatrix(); }
101 inline void SetFieldOfView(
float fovY) { _impl->As<
CameraImpl>()->SetFieldOfView(fovY); }
102 inline float GetFieldOfView()
const {
return _impl->As<
CameraImpl>()->GetFieldOfView(); }
104 inline void SetAspectRatio(
float aspectRatio) { _impl->As<
CameraImpl>()->SetAspectRatio(aspectRatio); }
105 inline float GetAspectRatio()
const {
return _impl->As<
CameraImpl>()->GetAspectRatio(); }
107 inline void SetNearPlane(
float nearPlane) { _impl->As<
CameraImpl>()->SetNearPlane(nearPlane); }
108 inline float GetNearPlane()
const {
return _impl->As<
CameraImpl>()->GetNearPlane(); }
110 inline void SetFarPlane(
float farPlane) { _impl->As<
CameraImpl>()->SetFarPlane(farPlane); }
111 inline float GetFarPlane()
const {
return _impl->As<
CameraImpl>()->GetFarPlane(); }
113 inline void LookAt(
const vcm::Vec3& target) { _impl->As<
CameraImpl>()->LookAt(target); }
114 inline vcm::Vec3 GetForwardVector()
const {
return _impl->As<
CameraImpl>()->GetForwardVector(); }
115 inline vcm::Vec3 GetUpVector()
const {
return _impl->As<
CameraImpl>()->GetUpVector(); }
116 inline vcm::Vec3 GetRightVector()
const {
return _impl->As<
CameraImpl>()->GetRightVector(); }
118 inline void RotateAround(
const vcm::Vec3& target,
const vcm::Vec3& planeNormal,
float angle) { _impl->As<
CameraImpl>()->RotateAround(target, planeNormal, angle); }