Week7 [09/11] - [11/11]

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
This commit is contained in:
IDunnoDev
2021-12-11 14:48:46 +00:00
committed by iDunnoDev
parent 19639d70d1
commit 773507b4ab
12 changed files with 257 additions and 32 deletions

32
Vector3D.h Normal file
View File

@ -0,0 +1,32 @@
#pragma once
class Vector3D
{
public:
Vector3D();
Vector3D(float x, float y, float z);
Vector3D(const Vector3D& other);
~Vector3D();
// 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);
static float DotProduct(const Vector3D v1, const Vector3D v2);
static Vector3D CrossProduct(const Vector3D v1, const Vector3D v2);
const Vector3D operator+ (const Vector3D& rhs) const;
private:
float _x;
float _y;
float _z;
void Copy(const Vector3D& other);
};