#include <GouraudShader.h>
Inherits Colorizer.
|
| GouraudShader (Vector< 4 > light, Vector< 4 > viewer) |
|
Color | calculateColor (int fromSideFirstIndex, int fromSideSecondIndex, double lambda, int toSideFirstIndex, int toSideSecondIndex, double rho, double tau) |
|
virtual void | setTriangle (Triangle *triangle) |
|
◆ GouraudShader()
GouraudShader::GouraudShader |
( |
Vector< 4 > |
light, |
|
|
Vector< 4 > |
viewer |
|
) |
| |
Explicit Value Constructor.
- Parameters
-
light | The location of the light source (not the direction vector) |
viewer | The location of the viewer (not the direction vector) |
◆ calculateColor()
Color GouraudShader::calculateColor |
( |
int |
fromSideFirstIndex, |
|
|
int |
fromSideSecondIndex, |
|
|
double |
lambda, |
|
|
int |
toSideFirstIndex, |
|
|
int |
toSideSecondIndex, |
|
|
double |
rho, |
|
|
double |
tau |
|
) |
| |
Calculate the Color of a pixel.
- Parameters
-
fromSideFirstIndex | The first index of the from side |
fromSideSecondIndex | The second index of the from side |
lambda | The weight for the from side |
toSideFirstIndex | The first index of the to side |
toSideSecondIndex | The second index of the to side |
rho | The weight for the to side |
tau | The side-to-side weight |
- Returns
- The Color
◆ setTriangle()
void GouraudShader::setTriangle |
( |
Triangle * |
triangle | ) |
|
|
virtual |
Set the Triangle.
- Parameters
-
triangle | A pointer to the Triangle to use |
◆ intensities
double GouraudShader::intensities[3] |
|
private |
The intensities of the red, green and blue channels.
◆ light
Vector<4> GouraudShader::light |
|
private |
◆ viewer
Vector<4> GouraudShader::viewer |
|
private |
The documentation for this class was generated from the following files: