From ed983020dbf8174c8b9d3f3993121109238c91fa Mon Sep 17 00:00:00 2001 From: Jacob Pine Date: Tue, 4 Apr 2023 17:38:58 -0400 Subject: [PATCH] placing camera on z axis --- Controller.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Controller.cpp b/Controller.cpp index 4b5affe..cf3cb87 100644 --- a/Controller.cpp +++ b/Controller.cpp @@ -20,7 +20,7 @@ using namespace std; Controller::Controller(istream& scenegraphFile, Model& m,View& v): model(m), view(v) { initScenegraph(scenegraphFile); - globalCamera = new StationaryCamera(glm::vec3(200.0, 250.0, 200.0)); + globalCamera = new StationaryCamera(glm::vec3(0.0, 0.0, 100.0)); globalCamera->LookAt(glm::vec3(0.0,0.0,0.0)); cameras.push_back(globalCamera); @@ -46,7 +46,9 @@ void Controller::initScenegraph(istream& scenegraphFile) { Controller::~Controller() { - delete globalCamera; + if (globalCamera) delete globalCamera; + if (helicopterCamera) delete helicopterCamera; + if (firstPersonCamera) delete firstPersonCamera; } void Controller::run()