forked from 0ad/0ad
2cbc27174c
This was SVN commit r304.
37 lines
740 B
C++
Executable File
37 lines
740 B
C++
Executable File
//----------------------------------------------------------------
|
|
//
|
|
// Name: SHCoeffs.h
|
|
// Last Update: 25/11/03
|
|
// Author: Rich Cross
|
|
// Contact: rich@0ad.wildfiregames.com
|
|
//
|
|
// Description: implementation of 9 component spherical harmonic
|
|
// lighting
|
|
//----------------------------------------------------------------
|
|
|
|
#ifndef __SHCOEFFS_H
|
|
#define __SHCOEFFS_H
|
|
|
|
#include "Color.h"
|
|
|
|
class CSHCoeffs
|
|
{
|
|
public:
|
|
CSHCoeffs();
|
|
|
|
void Clear();
|
|
|
|
void AddAmbientLight(const RGBColor& color);
|
|
void AddDirectionalLight(const CVector3D& lightDir,const RGBColor& lightColor);
|
|
|
|
void Evaluate(const CVector3D& normal,RGBColor& color) const;
|
|
|
|
const RGBColor* GetCoefficients() const { return _data; }
|
|
|
|
private:
|
|
RGBColor _data[9];
|
|
};
|
|
|
|
|
|
#endif
|