-
Notifications
You must be signed in to change notification settings - Fork 0
/
Polygon3D.h
41 lines (34 loc) · 829 Bytes
/
Polygon3D.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#pragma once
#include "Vector3D.h"
#include "Framework.h"
class Polygon3D
{
public:
// Constructors
Polygon3D();
Polygon3D(int index0, int index1, int index2);
Polygon3D(const Polygon3D &p);
// Destructor
~Polygon3D();
// Getters/Setters
int GetIndex(int i) const;
void SetIndex(int index, const int value);
bool IsMarkedForCulling() const;
void MarkForCulling();
void UnMarkForCulling();
Vector3D GetNormal() const;
void SetNormal(const Vector3D normal);
float GetAvgZDepth() const;
void SetAvgZDepth(const float zDepth);
COLORREF GetColour() const;
void SetColour(const int r, const int g, const int b);
// Operators
Polygon3D& operator= (const Polygon3D &rhs);
private:
int _indices[3];
bool _markedForCulling;
Vector3D _normal;
float _avgZDepth;
// Colour
COLORREF _colour = RGB(0, 0, 0);
};