[EDIT] code style guide finished
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#include "Camera.h"
|
||||
#include "camera.h"
|
||||
|
||||
namespace entities
|
||||
{
|
||||
@@ -7,26 +7,26 @@ namespace entities
|
||||
rotation(rotation)
|
||||
{}
|
||||
|
||||
void Camera::move(GLFWwindow* window)
|
||||
void Camera::Move(GLFWwindow* window)
|
||||
{
|
||||
if (glfwGetKey(window, GLFW_KEY_W) == GLFW_PRESS)
|
||||
{
|
||||
position.z -= speed;
|
||||
position.z -= SPEED;
|
||||
}
|
||||
|
||||
if (glfwGetKey(window, GLFW_KEY_S) == GLFW_PRESS)
|
||||
{
|
||||
position.z += speed;
|
||||
position.z += SPEED;
|
||||
}
|
||||
|
||||
if (glfwGetKey(window, GLFW_KEY_D) == GLFW_PRESS)
|
||||
{
|
||||
position.x += speed;
|
||||
position.x += SPEED;
|
||||
}
|
||||
|
||||
if (glfwGetKey(window, GLFW_KEY_A) == GLFW_PRESS)
|
||||
{
|
||||
position.x -= speed;
|
||||
position.x -= SPEED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace entities
|
||||
class Camera
|
||||
{
|
||||
private:
|
||||
float speed = 0.02f;
|
||||
const float SPEED = 0.02f;
|
||||
|
||||
glm::vec3 position;
|
||||
glm::vec3 rotation;
|
||||
@@ -16,9 +16,9 @@ namespace entities
|
||||
public:
|
||||
Camera(const ::glm::vec3& position, const ::glm::vec3& rotation);
|
||||
|
||||
void move(GLFWwindow* window);
|
||||
void Move(GLFWwindow* window);
|
||||
|
||||
inline glm::vec3 getPosition() const{ return position; }
|
||||
inline glm::vec3 getRotation() const{ return rotation; }
|
||||
inline glm::vec3 GetPosition() const{ return position; }
|
||||
inline glm::vec3 GetRotation() const{ return rotation; }
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
#include "Entity.h"
|
||||
|
||||
#include <iostream>
|
||||
#include "entity.h"
|
||||
|
||||
namespace entities
|
||||
{
|
||||
@@ -12,14 +10,14 @@ namespace entities
|
||||
{
|
||||
}
|
||||
|
||||
void Entity::increasePosition(const glm::vec3& distance)
|
||||
void Entity::IncreasePosition(const glm::vec3& distance)
|
||||
{
|
||||
position.x += distance.x;
|
||||
position.y += distance.y;
|
||||
position.z += distance.z;
|
||||
}
|
||||
|
||||
void Entity::increaseRotation(const glm::vec3& rotation)
|
||||
void Entity::IncreaseRotation(const glm::vec3& rotation)
|
||||
{
|
||||
this->rotation.x += rotation.x;
|
||||
this->rotation.y += rotation.y;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <glm/gtc/matrix_transform.hpp>
|
||||
#include "../models/Model.h"
|
||||
#include "../models/model.h"
|
||||
|
||||
namespace entities
|
||||
{
|
||||
@@ -16,16 +16,16 @@ namespace entities
|
||||
public:
|
||||
Entity(const models::TexturedModel& model, const glm::vec3& position, const glm::vec3& rotation, float scale);
|
||||
|
||||
void increasePosition(const glm::vec3& distance);
|
||||
void increaseRotation(const glm::vec3& rotation);
|
||||
void IncreasePosition(const glm::vec3& distance);
|
||||
void IncreaseRotation(const glm::vec3& rotation);
|
||||
|
||||
inline models::TexturedModel getModel() const{return model;}
|
||||
inline void set_model(const ::models::TexturedModel& model) { this->model = model; }
|
||||
inline glm::vec3 getPosition() const { return position; }
|
||||
inline void set_position(const ::glm::vec3& position) { this->position = position; }
|
||||
inline glm::vec3 getRotation() const { return rotation; }
|
||||
inline void set_rotation(const ::glm::vec3& rotation) { this->rotation = rotation; }
|
||||
inline float getScale() const { return scale; }
|
||||
inline void set_scale(const float scale) { this->scale = scale; }
|
||||
inline models::TexturedModel GetModel() const{return model;}
|
||||
inline void SetModel(const ::models::TexturedModel& model) { this->model = model; }
|
||||
inline glm::vec3 GetPosition() const { return position; }
|
||||
inline void SetPosition(const ::glm::vec3& position) { this->position = position; }
|
||||
inline glm::vec3 GetRotation() const { return rotation; }
|
||||
inline void SetRotation(const ::glm::vec3& rotation) { this->rotation = rotation; }
|
||||
inline float GetScale() const { return scale; }
|
||||
inline void SetScale(const float scale) { this->scale = scale; }
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user