forked from 0ad/0ad
Matei
6f10e8c09c
Also a small fix: made the selection bandbox not appear when the view is being rotated using left+right drag (it doesn't make sense to show it then). This was SVN commit r2674.
37 lines
771 B
C++
Executable File
37 lines
771 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, RGBColor mod=RGBColor(1,1,1)) const;
|
|
|
|
const RGBColor* GetCoefficients() const { return _data; }
|
|
|
|
private:
|
|
RGBColor _data[9];
|
|
};
|
|
|
|
|
|
#endif
|