CS488 PA9
GouraudShader.h
1 #ifndef edu_jmu_cs_GouraudShader_h
2 #define edu_jmu_cs_GouraudShader_h
3 
4 #include "../pa8/Colorizer.h"
5 #include <math.h>
6 #include "../pa5/Vector.hpp"
7 
8 using namespace std;
9 
14 class GouraudShader: public Colorizer {
15  private:
19  double intensities[3];
20 
24  Vector<4> light;
25 
29  Vector<4> viewer;
30 
31 
32  public:
39  GouraudShader(Vector<4> light, Vector<4> viewer);
40 
53  Color calculateColor(int fromSideFirstIndex,
54  int fromSideSecondIndex,
55  double lambda,
56  int toSideFirstIndex,
57  int toSideSecondIndex,
58  double rho,
59  double tau);
60 
66  virtual void setTriangle(Triangle* triangle);
67 };
68 
69 #endif
Vector< 4 > viewer
Definition: GouraudShader.h:29
Vector< 4 > light
Definition: GouraudShader.h:24
Definition: GouraudShader.h:14