
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
33 lines
571 B
C++
33 lines
571 B
C++
#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);
|
|
};
|
|
|