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:
32
Vector3D.h
Normal file
32
Vector3D.h
Normal 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);
|
||||
};
|
||||
|
Reference in New Issue
Block a user