Debian Codegraph @

src/Sampling.cpp

raw symbols SCIP
1 typedefcxx . . $ `<file>/src/Sampling.cpp`/ unsigned char Bytecxx . . $ Byte#;
2
3 #include <GL/glew.h>
4 #include "CgUtil.h"cxx . . $ `<file>/src/CgUtil.h`/
5
6 //#include <GL/gl.h>
7 #include <math.h>
8 //#include <GL/glu.h>
9
10 #include <vector>
11
12 #include <vcg/space/point3.h>cxx . . $ `<file>/vcg/vcg/space/point3.h`/
13 #include <vcg/space/color4.h>cxx . . $ `<file>/vcg/vcg/space/color4.h`/
14
15 using namespace vcg;
16 using namespace std;
17
18 #include "CubeMapSamp.h"cxx . . $ `<file>/src/CubeMapSamp.h`/
19 #include "OctaMapSamp.h"cxx . . $ `<file>/src/OctaMapSamp.h`/
20
21 int CubeMapSampcxx . . $ CubeMapSamp#::sizecxx . . $ CubeMapSamp#size.;
22 int OctaMapSampcxx . . $ OctaMapSamp#::sizecxx . . $ OctaMapSamp#size.;
23
24 vectorcxx . . $ std/vector#<Point3fcxx . . $ vcg/Point3f#> CubeMapSampcxx . . $ CubeMapSamp#::dircxx . . $ CubeMapSamp#dir.;
25 vectorcxx . . $ std/vector#<Point3fcxx . . $ vcg/Point3f#> CubeMapSampcxx . . $ CubeMapSamp#::dirrotcxx . . $ CubeMapSamp#dirrot.;
26 vectorcxx . . $ std/vector#<int> CubeMapSampcxx . . $ CubeMapSamp#::mapcxx . . $ CubeMapSamp#map.; // mappa 2d di indici a dir
27 //vector<float> CubeMapSamp::weight;
28
29 vectorcxx . . $ std/vector#<Point3fcxx . . $ vcg/Point3f#> OctaMapSampcxx . . $ OctaMapSamp#::dircxx . . $ OctaMapSamp#dir.;
30 vectorcxx . . $ std/vector#<Point3fcxx . . $ vcg/Point3f#> OctaMapSampcxx . . $ OctaMapSamp#::dirrotcxx . . $ OctaMapSamp#dirrot.;
31 vectorcxx . . $ std/vector#<float> OctaMapSampcxx . . $ OctaMapSamp#::weightcxx . . $ OctaMapSamp#weight.;
32
33 void OctaMapSampcxx . . $ OctaMapSamp#::FillTexturecxx . . $ OctaMapSamp#FillTexture(4ac75cfcc75bdb0b).(vectorcxx . . $ std/vector#<Bytecxx . . $ Byte#> &texture, const vectorcxx . . $ std/vector#<int> &sumtable,
34 int texsize, float div, int tx, int ty )
35 {
36 for (int y=0,k=0; y<sizecxx . . $ OctaMapSamp#size.; y++)
37 for (int x=0; x<sizecxx . . $ OctaMapSamp#size.; x++,k++)
38 {
39 int h=(x+tx+(y+ty)*texsize);
40
41 int res= (int) ( sumtable[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).h] * div /** weight[k]*/ );
42 if (res>255) res=255;
43 texture[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).h*3+0]= res;
44 texture[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).h*3+1]= res;
45 texture[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).h*3+2]= res;
46 /* if (res<512-275) {
47 texture[h*3+0]= 0;
48 texture[h*3+1]= res;
49 texture[h*3+2]= res;
50 } else if (res<254) {
51 texture[h*3+0]= 0;
52 texture[h*3+1]= 255;
53 texture[h*3+2]= 0;
54 } else
55 if (res>275) {
56 texture[h*3+0]= 255;
57 texture[h*3+1]= res-255;
58 texture[h*3+2]= res/2-255; } else {
59 texture[h*3+0]= res;
60 if (res>255) res=255;
61 texture[h*3+1]= res;
62 texture[h*3+2]= res;
63 }*/
64 }
65
66 }