Files
Graphics-Rasterizer/Rasteriser.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

38 lines
738 B
C++

#pragma once
#include "Framework.h"
#include "Vertex.h"
#include "Matrix.h"
#include "TransformTools.h"
#include "Camera.h"
#include "Model.h"
#include "MD2Loader.h"
#include <vector>
using namespace std;
using namespace TransformTools;
class Rasteriser : public Framework
{
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);
void DrawWireFrame(HDC hDc, Model& model);
private:
vector<Model> _sceneModels;
Matrix _currentPerspectiveMatrix;
Matrix _currentViewMatrix;
float _currentAspectRatio;
int _rotation;
};