35 #ifndef _STELGEODESICGRID_HPP_
36 #define _STELGEODESICGRID_HPP_
53 int getMaxLevel(
void)
const {
return maxLevel;}
55 static int nrOfZones(
int level) {
return (20<<(level<<1));}
57 int getNrOfZones(
void)
const {
return nrOfZones(maxLevel);}
59 typedef void (VisitFunc)(
int lev,
int index,
64 void visitTriangles(
int maxVisitLevel, VisitFunc *func,
void *context)
const;
102 void searchZones(
const QVector<SphericalCap>& convex,
103 int **inside,
int **border,
int maxSearchLevel)
const;
105 const Vec3f& getTriangleCorner(
int lev,
int index,
int cornerNumber)
const;
106 void initTriangle(
int lev,
int index,
110 void visitTriangles(
int lev,
int index,
116 void *context)
const;
117 void searchZones(
int lev,
int index,
118 const QVector<SphericalCap>& convex,
119 const int *indexOfUsedSphericalCaps,
120 const int halfSpacesUsed,
121 const bool *corner0_inside,
122 const bool *corner1_inside,
123 const bool *corner2_inside,
124 int **inside,
int **border,
int maxSearchLevel)
const;
131 Triangle **triangles;
137 mutable int lastMaxSearchlevel;
138 mutable QVector<SphericalCap> lastSearchRegion;
146 void print(
void)
const;
152 void search(
const QVector<SphericalCap>& convex,
int maxSearchLevel);
164 : r(ar),level((alevel<0)?0:(alevel>ar.grid.getMaxLevel())
165 ?ar.grid.getMaxLevel():alevel),
166 end(ar.zones[GeodesicSearchBorderIterator::level]+
167 StelGeodesicGrid::nrOfZones(GeodesicSearchBorderIterator::level))
169 void reset(
void) {index = r.border[level];}
171 {
if (index < end) {
return *index++;}
return -1;}
175 const int *
const end;
185 maxLevel((alevel<0)?0:(alevel>ar.grid.getMaxLevel())?ar.grid.getMaxLevel():alevel)
200 #endif // _STELGEODESICGRID_HPP_