Files
Graphics-Rasterizer/Vertex.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
684 B
C++

#pragma once
class Vertex
{
public:
Vertex();
Vertex(const float x, const float y, const float z);
Vertex(const float x, const float y, const float z, const float w);
Vertex(const Vertex& other);
// Accessors
float GetX() const;
void SetX(const float x);
float GetY() const;
void SetY(const float y);
float GetZ() const;
void SetZ(const float z);
float GetW() const;
void SetW(const float w);
void Dehomogenize();
// Assignment operator
Vertex& operator= (const Vertex& rhs);
bool operator== (const Vertex& rhs) const;
const Vertex operator+ (const Vertex& rhs) const;
private:
float _x;
float _y;
float _z;
float _w;
void Copy(const Vertex& other);
};