FACT++  1.0
void BasicGlCamera::buildPatchesIndices ( )
protectedvirtual

Definition at line 1096 of file BasicGlCamera.cc.

References ACTUAL_NUM_PIXELS, begin, end, edge::first, first, i, NTMARK, patchesIndices, edge::second, second, softwareMapping, temp, and verticesIndices.

Referenced by assignPixelMap().

1097  {
1098  vector<edge>::iterator it;
1099  bool erased = false;
1100 // patchesIndices.resize(NTMARK);
1101  for (int i=0;i<NTMARK;i++)//for all patches
1102  {
1103  patchesIndices[i].clear();
1104  for (int j=0;j<9;j++)//for all cells of the current patch
1105  {
1106  if (softwareMapping[i*9+j] >= ACTUAL_NUM_PIXELS)
1107  continue;
1108  for (int k=0;k<6;k++)//for all sides of the current cell
1109  {
1110  int first = k-1;
1111  int second = k;
1112  if (first < 0)
1113  first = 5;
1114  erased = false;
1115  for (it=(patchesIndices[i]).begin(); it != (patchesIndices[i]).end(); it++)//check if this side is here already or not
1116  {
1117  const int idx = i*9+j;
1118 
1119  if ((it->first == verticesIndices[softwareMapping[idx]][first] &&
1120  it->second == verticesIndices[softwareMapping[idx]][second]) ||
1121  (it->first == verticesIndices[softwareMapping[idx]][second] &&
1122  it->second == verticesIndices[softwareMapping[idx]][first]))
1123  {
1124  patchesIndices[i].erase(it);
1125  erased = true;
1126  break;
1127  }
1128  }
1129  if (!erased)
1130  {
1131  edge temp;
1132  temp.first = verticesIndices[softwareMapping[i*9+j]][first];
1133  temp.second = verticesIndices[softwareMapping[i*9+j]][second];
1134  patchesIndices[i].push_back(temp);
1135  }
1136  }
1137  }
1138  }
1139 // for (int i=0;i<NTMARK;i++)
1140 // {
1141 // cout << ".....................patch " << i << " size: " << patchesIndices[i].size() << endl;
1142 // for (unsigned int j=0;j<patchesIndices[i].size();j++)
1143 // {
1144 // if (patchesIndices[i][j].first < 0 || patchesIndices[i][j].first > 3013)
1145 // cout << patchesIndices[i][j].first << " and " << patchesIndices[i][j].second << " and " << j << endl;
1146 // }
1147 // }
1148  }
int first
Definition: BasicGlCamera.h:25
structure for storing edges of hexagons (for blurry display)
Definition: BasicGlCamera.h:23
int i
Definition: db_dim_client.c:21
int64_t second
offset of this column in the tile, from the start of the heap area
Definition: zofits.h:27
double begin
int second
Definition: BasicGlCamera.h:26
int64_t first
Size of this column in the tile.
Definition: zofits.h:26
float temp
Definition: HeadersPFmini.h:56
static int verticesIndices[NPIX][6]
#define ACTUAL_NUM_PIXELS
Definition: BasicGlCamera.h:9
double end
static std::vector< edge > patchesIndices[160]
#define NTMARK
Definition: BasicGlCamera.h:6
static int softwareMapping[NPIX]

+ Here is the caller graph for this function: