blob: 690f26853dfa748fc99b281aee2484bb243eb3ee (
plain)
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
|
// class to compute ambient occlusion
class AO{
//private:
Point3f dir; // direction
vector<float> buf;
int bufx, bufy;
float bufscale;
inline int index(int x, int y){
int res=x+bufx*y;
if (res<0) res=0;
if (res>=buf.size()) res=buf.size()-1;
return res;
//return x+bufx*y;
}
void PrintBuffer();
void RenderSphere(float cx, float cy, float cz, float rad);
void CheckAtom(QAtom &a);
public:
AO( Point3f _dir, Mol &m);
};
|