Fixed typo in camera class

This commit is contained in:
saschawillems 2016-06-20 20:17:46 +02:00
parent 5b5543e415
commit d3f79ea07e
3 changed files with 7 additions and 8 deletions

View file

@ -30,7 +30,7 @@ private:
transM = glm::translate(glm::mat4(), position); transM = glm::translate(glm::mat4(), position);
if (type == CameraType::firtsperson) if (type == CameraType::firstperson)
{ {
matrices.view = rotM * transM; matrices.view = rotM * transM;
} }
@ -40,7 +40,7 @@ private:
} }
}; };
public: public:
enum CameraType { lookat, firtsperson }; enum CameraType { lookat, firstperson };
CameraType type = CameraType::lookat; CameraType type = CameraType::lookat;
glm::vec3 rotation = glm::vec3(); glm::vec3 rotation = glm::vec3();
@ -107,7 +107,7 @@ public:
void update(float deltaTime) void update(float deltaTime)
{ {
if (type == CameraType::firtsperson) if (type == CameraType::firstperson)
{ {
if (moving()) if (moving())
{ {

View file

@ -601,7 +601,7 @@ public:
{ {
rotationSpeed = 0.5f; rotationSpeed = 0.5f;
enableTextOverlay = true; enableTextOverlay = true;
camera.type = Camera::CameraType::firtsperson; camera.type = Camera::CameraType::firstperson;
camera.movementSpeed = 7.5f; camera.movementSpeed = 7.5f;
camera.position = { 15.0f, -13.5f, 0.0f }; camera.position = { 15.0f, -13.5f, 0.0f };
camera.setRotation(glm::vec3(5.0f, 90.0f, 0.0f)); camera.setRotation(glm::vec3(5.0f, 90.0f, 0.0f));

View file

@ -42,7 +42,7 @@ private:
vkTools::VulkanTexture terrainArray; vkTools::VulkanTexture terrainArray;
} textures; } textures;
public: public:
bool wireframe = true; bool wireframe = false;
bool tessellation = true; bool tessellation = true;
struct { struct {
@ -103,12 +103,11 @@ public:
{ {
enableTextOverlay = true; enableTextOverlay = true;
title = "Vulkan Example - Dynamic terrain tessellation"; title = "Vulkan Example - Dynamic terrain tessellation";
camera.type = Camera::CameraType::firtsperson; camera.type = Camera::CameraType::firstperson;
camera.setPerspective(60.0f, (float)width / (float)height, 0.1f, 512.0f); camera.setPerspective(60.0f, (float)width / (float)height, 0.1f, 512.0f);
camera.setRotation(glm::vec3(-22.0f, 135.0f, 0.6f)); camera.setRotation(glm::vec3(-22.0f, 135.0f, 0.6f));
camera.setTranslation(glm::vec3(0.0f, 30.0f, 0.0f)); camera.setTranslation(glm::vec3(0.0f, 30.0f, 0.0f));
// camera.setTranslation(glm::vec3(36.5f, 13.25f, 36.2f)); camera.movementSpeed = 7.5f;
camera.movementSpeed = 10.0f;
timerSpeed *= 15.0f; timerSpeed *= 15.0f;
// Support for tessellation shaders is optional, so check first // Support for tessellation shaders is optional, so check first
//if (!deviceFeatures.tessellationShader) //if (!deviceFeatures.tessellationShader)