
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
30 lines
976 B
C++
30 lines
976 B
C++
#pragma once
|
|
#include "Matrix.h"
|
|
#include <cmath>
|
|
|
|
enum class Axis { X, Y, Z };
|
|
|
|
namespace TransformTools
|
|
{
|
|
const float PI = (float)acos(-1);
|
|
|
|
Matrix GetTranslateMatrix(const float x, const float y, const float z);
|
|
Matrix GetTranslateMatrix(const Vertex& position);
|
|
|
|
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);
|
|
|
|
Matrix GetOrthegraphicProjectionMatrix(float d);
|
|
Matrix GetPerspectiveProjectionMatrix(float d, float aspectRatio);
|
|
Matrix GetViewMatrix(float d, int width, int height);
|
|
|
|
Matrix GetCameraRotationMatrix(const Axis rotAxis, const float rotDegrees);
|
|
Matrix GetCameraTranslateMatrix(const float x, const float y, const float z);
|
|
Matrix GetCameraTranslateMatrix(const Vertex& position);
|
|
|
|
float DegreesToRadians(const float degrees);
|
|
};
|
|
|