Files
Graphics-Rasterizer/Camera.h
IDunnoDev 19639d70d1 Week6 [02/11] - [04/11]
Added Camera Class
Added *= operator to the matrix class
Added Transformation Queue vector to the Model Class
Added Get Vertex, Polygon and Polygon Vertex methods to the Model Class
Added DehomogenizeAllVerticies method to the Model Class
Added GetPolygonVertexCount method to Polygon Class
Added Ability to have multiple models in a "scene" in the Rasterizer
Added DrawWireFrame method to the Rasterizer Class
Added Aspect Ratio and View Matrix to the Rasterizer Class
Added TransformTools namespace to hold shared transformation functions
Added Dehomogenize method to the Vector Class
Moved Transformation methods to a new shared name space
2021-12-11 14:15:02 +00:00

40 lines
809 B
C++

#pragma once
#include "Vertex.h"
#include "Matrix.h"
#include "TransformTools.h"
using namespace TransformTools;
class Camera
{
public:
Camera(float xRot, float yRot, float zRot, const Vertex& pos);
Camera(const Camera& other);
~Camera();
Matrix UpdateCameraPosition(const Vertex& newPos);
Matrix RotateCamera(float xRot, float yRot, float zRot);
Matrix GetCurrentCameraTransformMatrix();
float GetCurrentRotationValue(const Axis axis);
float GetInitialRotationValue(const Axis axis);
Vertex GetCurrentPosition();
Vertex GetInitialPosition();
Camera& operator= (const Camera& rhs);
private:
float _initialRotation[3] = { 0 };
Vertex _initialPosition;
float _currentRotation[3] = { 0 };
Vertex _currentPosition;
Matrix _currentCameraTransform;
void Copy(const Camera& other);
};