mirror of
https://github.com/Linloir/SceneEditor.git
synced 2025-12-17 07:28:12 +08:00
Update Camera API
This commit is contained in:
parent
66997698c8
commit
fc1eecde09
@ -1 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <GLM/ext/matrix_transform.hpp>
|
||||
|
||||
#include "camera.h"
|
||||
|
||||
@ -4,17 +4,26 @@
|
||||
|
||||
class Camera {
|
||||
private:
|
||||
// Camera state
|
||||
glm::vec3 _position;
|
||||
glm::vec3 _direction;
|
||||
glm::vec3 _right;
|
||||
glm::vec3 _front;
|
||||
glm::vec3 _up;
|
||||
float _zoom;
|
||||
float _yawRad;
|
||||
float _pitchRad;
|
||||
float _rollRad;
|
||||
float _zoom;
|
||||
|
||||
//private:
|
||||
// // Camera settings
|
||||
// float _moveStep;
|
||||
// float _yawStep;
|
||||
// float _pitchStep;
|
||||
// float _rollStep;
|
||||
|
||||
private:
|
||||
glm::vec3 frontVec();
|
||||
// World settings
|
||||
glm::vec3 _worldUp;
|
||||
|
||||
public:
|
||||
Camera();
|
||||
@ -23,7 +32,7 @@ public:
|
||||
~Camera();
|
||||
|
||||
public:
|
||||
glm::mat4 viewMatrix();
|
||||
inline glm::mat4 viewMatrix();
|
||||
|
||||
public:
|
||||
void move(glm::vec3 deltaVec);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user