-
Notifications
You must be signed in to change notification settings - Fork 1
/
Phong.h
45 lines (34 loc) · 1019 Bytes
/
Phong.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
41
42
43
44
45
// Phong.h: interface for the CPhong class.
//
//////////////////////////////////////////////////////////////////////
# ifndef _PHONG_H
# define _PHONG_H
# include "Shader.h"
# include "Color.h"
# include "Light.h"
class CPhong : public CShader
{
public:
// Object construction
CPhong();
CPhong(CColor diffuse, CColor ambient, CColor specular, float strength, float coeff, float , float, float, bool);
// Object destruction
virtual ~CPhong();
// Object interface
CColor ShadePoint(CIntersectionInfo hitInfo);
protected:
CColor m_colDiffuse;
CColor m_colAmbient;
CColor m_colSpecular;
float m_fSpecularStrength;
float m_fSpecularCoeff;
float m_fDiffuseCoeff;
float m_fReflectionCoeff;
float m_fTransmissionCoeff;
// protected functions
CColor DiffuseReflection (CIntersectionInfo hitInfo, CLight** ppLights, int iNumLights);
CColor SpecularReflection (CIntersectionInfo hitInfo);
CColor Transmitted (CIntersectionInfo hitInfo);
CColor GetColorAt (CTexCoords texCoords);
};
# endif