partway through some documentation and bug fixing

This commit is contained in:
2018-02-17 01:08:31 -08:00
parent 176d9f7a54
commit 51be54c964
11 changed files with 146 additions and 38 deletions

View File

@@ -6,28 +6,46 @@
#include <cmath>
#include "Gui.h"
/**
*
* Camera
*
* Camera provides a convenient way to create 3d vectors and positions which represent a camera. It provides physics
* to move the camera around in 3d space as well as impulse and friction control to alter its movement characteristics
*
*/
class Camera : public VrEventSubscriber, private Gui{
public:
enum DIRECTION { FORWARD, REARWARD, LEFT, RIGHT, UP, DOWN };
Camera();
// TODO: Remove dependency on getting a window ptr. Instead provide window interface to get and set mouse position
Camera(sf::Vector3f position, sf::Vector2f direction, sf::RenderWindow *window);
~Camera();
int set_position(sf::Vector3f position);
// Apply an incoming impule to the velocity vector
int add_static_impulse(sf::Vector3f impulse);
// Apply an impulse in one of the 6 relative directions with a certain magnitude
int add_relative_impulse(DIRECTION direction, float speed);
int slew_camera(sf::Vector2f input);
void set_camera(sf::Vector2f input);
void set_camera(sf::Vector3f input);
void set_camera_direction(sf::Vector2f input);
void set_camera_direction(sf::Vector3f input);
int update(double delta_time);
void look_at_center();
// TODO: Raw ptr's SHARED_PTR with CL, bad idea
sf::Vector2f* get_direction_pointer();
sf::Vector3f* get_position_pointer();
sf::Vector3f* get_movement_pointer();