Week5 [26/10]
Added the Z Access to the Matrix class Added the Identity Matrix Method to the Matrix Class Added MD2Loader Class Added Model Class Added Polygon Class Added Clear Viewport Method to Rasterizer Added Z Axis to the Vertex Class Updated Transformation Matrices to pass a matrix back so that we can do the multiplication at once
This commit is contained in:
18
Rasteriser.h
18
Rasteriser.h
@ -4,24 +4,30 @@
|
||||
#include "Matrix.h"
|
||||
#include <vector>
|
||||
|
||||
enum class Axis { X, Y, Z };
|
||||
|
||||
class Rasteriser : public Framework
|
||||
{
|
||||
public:
|
||||
public:
|
||||
bool Initialise();
|
||||
void Update(const Bitmap& bitmap);
|
||||
void Render(const Bitmap& bitmap);
|
||||
void ClearViewport(const Bitmap& bitmap);
|
||||
|
||||
void DrawSquare(HDC hDc, const vector<Vertex> verticies);
|
||||
void DrawShape(HDC hDc, const vector<Vertex> verticies);
|
||||
|
||||
Vertex Translate(const Vertex vertexIn, const float moveXBy, const float moveYBy);
|
||||
Vertex Scale(const Vertex vertexIn, const float scaleXBy, const float scaleYBy);
|
||||
Vertex Rotate(const Vertex vertexIn, const float rotationDegrees);
|
||||
|
||||
Matrix GetTranslateMatrix(const float x, const float y, const float z);
|
||||
Matrix GetScaleMatrix(const float x, const float y, const float z);
|
||||
Matrix GetRotationMatrix(const Axis rotAxis, const float rotDegrees);
|
||||
Matrix GetRotationMatrixFromPoint(const Axis rotAxis, const float rotDegrees, const float x, const float y, const float z);
|
||||
|
||||
float DegreesToRadians(const float degrees);
|
||||
|
||||
private:
|
||||
vector<Vertex> _vertexArray;
|
||||
vector<Vertex> _initialVertexArray;
|
||||
vector<Vertex> _currentVertexArray;
|
||||
const float _PI = (float) acos(-1);
|
||||
int _rotation;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user