1 #ifndef VOXELGRID_OBJECT_DATA_H
2 #define VOXELGRID_OBJECT_DATA_H
10 #include <osg/BoundingBox>
13 namespace APSpacePartitioning {
82 float collisionsDetected = 0;
85 for (
int xT = x-1; xT < x+2; xT++){
86 for (
int yT = y-1; yT < y+2; yT++){
87 for (
int zT = z-1; zT < z+2; zT++){
88 c += getCollisions(xT,yT,zT);
92 c += getCollisions(x,y,z) * 3;
93 collisionsDetected = (float)c / 30.0;
95 collisionsDetected = (float)getCollisions(x,y,z);
99 float red = (4.0 + log(percentage*10))/6.5;
100 float green = 1.0 - red;
101 return osg::Vec4f(red,green,0.0,0.5);