
Added Light Base Class Added AmbientLight, DirectionalLight and PointLight Classes Added Constructor to the Camera Class Added Light CoEff's to the Model Class Added Color Variables to Polygon3D Class Added Light Vector to hold the lights in the Rasteriser Added Camera Vector to hold multiple Cameras and Methods to set which is the current Added Lighting to the Rasterizer Added DrawSolidFlat method to the Rastorizer Added Bounds Check to the SharedTools for Int and Float values Added Color Enum Class Added Normalize Method to the Vector3D Class Renamed the TransformTools to SharedTools since adding more non transform methods to it
41 lines
814 B
C++
41 lines
814 B
C++
#pragma once
|
|
#include "Vertex.h"
|
|
#include "Matrix.h"
|
|
#include "SharedTools.h"
|
|
|
|
using namespace SharedTools;
|
|
|
|
class Camera
|
|
{
|
|
public:
|
|
Camera();
|
|
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);
|
|
};
|
|
|