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:
15
Polygon3D.h
15
Polygon3D.h
@ -1,4 +1,6 @@
|
||||
#pragma once
|
||||
#include "Vector3D.h"
|
||||
|
||||
class Polygon3D
|
||||
{
|
||||
public:
|
||||
@ -8,14 +10,25 @@ public:
|
||||
|
||||
~Polygon3D();
|
||||
|
||||
size_t GetPolygonVertexCount();
|
||||
size_t GetPolygonVertexCount() const;
|
||||
|
||||
int GetIndex(int index) const;
|
||||
|
||||
void SetNormal(const Vector3D& normal);
|
||||
Vector3D GetNormal() const;
|
||||
|
||||
void SetDepth(float depth);
|
||||
float GetDepth() const;
|
||||
void SetCulled(bool culled);
|
||||
bool GetCulled() const;
|
||||
|
||||
Polygon3D& operator= (const Polygon3D& rhs);
|
||||
|
||||
private:
|
||||
int _indices[3];
|
||||
Vector3D _normal;
|
||||
float _depth = 0.0f;
|
||||
bool _culled = false;
|
||||
|
||||
void Copy(const Polygon3D& other);
|
||||
};
|
||||
|
Reference in New Issue
Block a user