
Added Backface Culling Methods to the Model Class Added Depth, Normal and Culled Flag Variables to the Polygon3D Class Added Vector3D Class Added - operator to the Vertex Class Cleaned up Code, Adding Void to Params etc
36 lines
747 B
C++
36 lines
747 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 = 0.0f;
|
|
int _rotation = 0;
|
|
};
|
|
|