36 #ifndef GEOTESSGRID_OBJECT_H
37 #define GEOTESSGRID_OBJECT_H
245 vertices(NULL), nVertices(0),
246 triangles(NULL), nTriangles(0),
247 levels(NULL), nLevels(0),
248 tessellations(NULL), nTessellations(0),
249 descendants(NULL), gridID(gid),
250 gridInputFile(
"null"), gridOutputFile(
"null"), gridSoftwareVersion(
""),
251 gridGenerationDate(
""), refCount(0)
283 vector<vector<Edge*> > edgeList;
297 mutable vector<vector<Edge*> > spokeList;
305 mutable vector<double*> circumCenters;
320 string gridInputFile;
325 string gridOutputFile;
330 string gridSoftwareVersion;
336 string gridGenerationDate;
347 vector< vector< vector<int> > > vtxTriangles;
354 mutable vector< set<int> > connectedVertices;
359 GeoTessGrid* loadGridAscii(
const string& inputFile);
370 GeoTessGrid* loadGridBinary(
const string& inputFile);
377 static void loadGridAsciiFront(
IFStreamAscii& input,
int& gridFileFormat,
378 string& gridSWVersion,
string& fileCreationDate,
379 string& gridid,
const string& grdInptFile);
381 static void loadGridBinaryFront(
IFStreamBinary& ifs,
int& gridFileFormat,
382 string& gridSWVersion,
string& fileCreationDate,
383 string& gridid,
const string& grdInptFile);
399 const set<int>& getVertexIndices(
const int& level);
401 void computeSpokeLists(
const int& level)
const;
411 vertices(NULL), nVertices(0),
412 triangles(NULL), nTriangles(0),
413 levels(NULL), nLevels(0),
414 tessellations(NULL), nTessellations(0),
415 descendants(NULL), gridID(
""),
416 gridInputFile(
"null"), gridOutputFile(
"null"), gridSoftwareVersion(
""),
417 gridGenerationDate(
""), refCount(0)
424 vertices(NULL), triangles(NULL), levels(NULL), tessellations(NULL),
425 descendants(NULL), gridID(
""),
426 gridInputFile(
"null"), gridOutputFile(
"null"), gridSoftwareVersion(
""),
427 gridGenerationDate(
""), refCount(0)
428 { loadGridAscii(input); }
434 vertices(NULL), triangles(NULL), levels(NULL), tessellations(NULL),
435 descendants(NULL), gridID(
""),
436 gridInputFile(
"null"), gridOutputFile(
"null"), gridSoftwareVersion(
""),
437 gridGenerationDate(
""), refCount(0)
438 { loadGridBinary(input); }
462 memory += nVertices * (
LONG_INT)
sizeof(
double*) + nVertices * 3 * (
LONG_INT)
sizeof(
double);
465 memory += nTriangles * (
LONG_INT)
sizeof(
int*) + nTriangles * 3 * (
LONG_INT)
sizeof(
int);
468 memory += nLevels * (
LONG_INT)
sizeof(
int*) + nLevels * 2 * (
LONG_INT)
sizeof(
int);
471 memory += nTessellations * (
LONG_INT)
sizeof(
int*) + nTessellations * 2 * (
LONG_INT)
sizeof(
int);
474 memory += nTriangles * (
LONG_INT)
sizeof(
int);
477 memory += (
LONG_INT) (edgeList.capacity() *
sizeof(vector<Edge*>)
478 + edgeList.size() * 3 * (
sizeof(
Edge*) +
sizeof(
Edge)));
481 memory += (
LONG_INT) (spokeList.capacity() *
sizeof(vector<Edge*>)
482 + spokeList.size() * 3 *
sizeof(
Edge*));
485 memory += (
LONG_INT) (circumCenters.capacity() *
sizeof(
double*));
486 for (
int i=0; i<(int)circumCenters.size(); ++i)
487 if (circumCenters[i]) memory += 3 * (
LONG_INT)
sizeof(
double);
492 memory += (
LONG_INT) (vtxTriangles.capacity() *
sizeof(vector< vector<int> >));
493 for (
int i=0; i<(int)vtxTriangles.size(); ++i)
495 memory += (
LONG_INT) (vtxTriangles[i].capacity() *
sizeof(vector<int>));
496 for (
int j=0; j<(int)vtxTriangles[i].size(); ++j)
497 memory += (
LONG_INT) (vtxTriangles[i][j].capacity() *
sizeof(int));
504 memory += (
LONG_INT) (connectedVertices.capacity() *
sizeof(set<int>));
505 for (
int i=0; i<(int)connectedVertices.size(); ++i)
506 memory += (
LONG_INT) (connectedVertices[i].size() *
sizeof(int));
509 memory += (
LONG_INT) (gridID.length() + gridInputFile.length() + gridOutputFile.length()
510 + gridSoftwareVersion.length() + gridGenerationDate.length());
528 static string getGridID(
const string& fileName);
536 static bool isGeoTessGrid(
const string& inputFile);
544 {
return (gridID == g.gridID); }
552 {
return !(*
this == g); }
632 return vertices[vertex];
645 int* t = triangles[getTriangle(getFirstTriangle(tessId, 0), unit_vector)];
648 double dot = GeoTessUtils::dot(unit_vector, vertices[t[0]]);
650 double doti = GeoTessUtils::dot(unit_vector, vertices[t[1]]);
657 doti = GeoTessUtils::dot(unit_vector, vertices[t[2]]);
676 {
return triangles[triangle][corner]; }
695 return triangles[levels[tessellations[tessId][0] + level][0] + triangle][corner];
706 for (
int i=nTessellations-1; i>=0; --i)
708 int vid = getVertexIndex(u, i);
725 int* t = triangles[getTriangle(getFirstTriangle(tessId, 0), u)];
727 if (GeoTessUtils::dot(u, vertices[t[0]]) > cos(1e-7))
729 if (GeoTessUtils::dot(u, vertices[t[1]]) > cos(1e-7))
731 if (GeoTessUtils::dot(u, vertices[t[2]]) > cos(1e-7))
747 double*
getVertex(
int tessId,
int level,
int triangle,
int corner)
749 return vertices[triangles[levels[tessellations[tessId][0] + level][0] + triangle][corner]];
773 getVertices(tessellation, getNLevels(tessellation)-1, vectors);
785 void getVertices(
const int& tessellation,
const int& level, set<const double*>& vectors);
800 {
return getVertexIndices(getLevel(tessId, level)); }
814 {
return getVertexIndices(tessellations[tessId][1] - 1); }
836 {
return tessellations[tessellation][1] - tessellations[tessellation][0]; }
847 {
return tessellations[tessellation][0] + i; }
865 {
return tessellations[tessellation][1] - 1; }
882 {
return tessellations[tessellation][1] - tessellations[tessellation][0] - 1; }
895 return levels[tessellations[tessellation][0] + level][1]
896 - levels[tessellations[tessellation][0] + level][0];
911 {
return levels[tessellations[tessellation][0] + level][0] + i; }
923 {
return levels[tessellations[tessellation][0] + level][0]; }
935 {
return levels[tessellations[tessellation][0] + level][1]-1; }
960 {
return triangles[triangleIndex]; }
974 {
return triangles[triangleIndex][cornerIndex]; }
988 {
return vertices[triangles[triangleIndex][cornerIndex]]; }
1001 int* corners = triangles[triangle];
1002 triVrt[0][0] = vertices[corners[0]][0];
1003 triVrt[0][1] = vertices[corners[0]][1];
1004 triVrt[0][2] = vertices[corners[0]][2];
1005 triVrt[1][0] = vertices[corners[1]][0];
1006 triVrt[1][1] = vertices[corners[1]][1];
1007 triVrt[1][2] = vertices[corners[1]][2];
1008 triVrt[2][0] = vertices[corners[2]][0];
1009 triVrt[2][1] = vertices[corners[2]][1];
1010 triVrt[2][2] = vertices[corners[2]][2];
1019 if (circumCenters.empty()) circumCenters.resize(nTriangles, NULL);
1021 for (
int triangle=0; triangle<nTriangles; ++triangle)
1022 if (circumCenters[triangle] == NULL)
1024 int* corners = triangles[triangle];
1025 circumCenters[triangle] = GeoTessUtils::circumCenterPlus(vertices[corners[0]],
1026 vertices[corners[1]], vertices[corners[2]]);
1036 if (circumCenters.empty()) circumCenters.resize(nTriangles);
1038 if (circumCenters[levels[level][0]] == NULL)
1040 for (
int triangle=levels[level][0]; triangle<levels[level][1]; ++triangle)
1042 int* corners = triangles[triangle];
1043 circumCenters[triangle] = GeoTessUtils::circumCenterPlus(vertices[corners[0]],
1044 vertices[corners[1]], vertices[corners[2]]);
1064 const double*
getCircumCenter(
const int& triangle)
const {
return circumCenters[triangle]; }
1084 { cc[0]=circumCenters[triangle][0]; cc[1]=circumCenters[triangle][1]; cc[2]=circumCenters[triangle][2]; }
1100 int getNeighbor(
const int& triangleIndex,
const int& neighborIndex)
const
1101 {
return neighborIndex == 3 ? descendants[triangleIndex] : edgeList[triangleIndex][neighborIndex]->tLeft; }
1127 int getNeighbor(
const int& tessellation,
const int& level,
const int& triangle,
const int& side)
1128 {
return getNeighbor(getTriangle(tessellation, level, triangle), side); }
1147 vector<Edge*> edges = edgeList[triangleIndex];
1148 neighbors.push_back(edges[0]->tLeft);
1149 neighbors.push_back(edges[1]->tLeft);
1150 neighbors.push_back(edges[2]->tLeft);
1151 neighbors.push_back(descendants[triangleIndex]);
1176 void getNeighbors(
const int& tessellation,
const int& level,
const int& triangle, vector<int>& neighbors)
1177 { getNeighbors(getTriangle(tessellation, level, triangle), neighbors); }
1194 if (edgeList[tid][0]->tLeft == nid)
1196 if (edgeList[tid][1]->tLeft == nid)
1198 if (edgeList[tid][2]->tLeft == nid)
1207 int getDescendant(
const int& tessId,
const int& level,
const int& triangle)
const
1208 {
return descendants[getTriangle(tessId, level, triangle)]; }
1222 int getTriangle(
int triangleIndex,
const double* vector);
1246 {
return vtxTriangles[tessellations[tessId][0] + level][vertex]; }
1262 {
return getVertexTriangles(tessId, getNLevels(tessId)-1, vertex); }
1281 void getVertexNeighborsOrdered(
const int& tessId,
const int& level,
const int& vertex, vector<int>& v);
1295 { getVertexNeighbors(tessId, level, vertex, 1, nbrs); }
1314 void getVertexNeighbors(
const int& tessId,
const int& level,
const int& vertex,
1315 const int& order, set<int>& nbrs);
1329 vertices(NULL), nVertices(0),
1330 triangles(NULL), nTriangles(0),
1331 levels(NULL), nLevels(0),
1332 tessellations(NULL), nTessellations(0),
1333 descendants(NULL), gridID(
""),
1334 gridInputFile(
"null"), gridOutputFile(
"null"), gridSoftwareVersion(
""),
1335 gridGenerationDate(
""), refCount(0)
1342 GeoTessGrid(IFStreamAscii& input,
const GeoTessOptimizationType* opttype) :
1343 vertices(NULL), triangles(NULL), levels(NULL), tessellations(NULL),
1344 descendants(NULL), gridID(
""),
1345 gridInputFile(
"null"), gridOutputFile(
"null"), gridSoftwareVersion(
""),
1346 gridGenerationDate(
""), refCount(0)
1347 { loadGridAscii(input); }
1353 GeoTessGrid(IFStreamBinary& input,
const GeoTessOptimizationType* opttype) :
1354 vertices(NULL), triangles(NULL), levels(NULL), tessellations(NULL),
1355 descendants(NULL), gridID(
""),
1356 gridInputFile(
"null"), gridOutputFile(
"null"), gridSoftwareVersion(
""),
1357 gridGenerationDate(
""), refCount(0)
1358 { loadGridBinary(input); }
1364 GeoTessGrid(
double** _vertices,
int& _nVertices,
1365 int** _triangles,
int& _nTriangles,
1366 int** _levels,
int& _nLevels,
1367 int** _tessellations,
int& _nTessellations,
1369 string& _gridInputFile,
1370 string& _gridOutputFile,
1371 string& _gridSoftwareVersion,
1372 string& _gridGenerationDate) :
1373 vertices(_vertices), nVertices(_nVertices),
1374 triangles(_triangles), nTriangles(_nTriangles),
1375 levels(_levels), nLevels(_nLevels),
1376 tessellations(_tessellations), nTessellations(_nTessellations),
1379 gridInputFile(_gridInputFile),
1380 gridOutputFile(_gridOutputFile),
1381 gridSoftwareVersion(_gridSoftwareVersion),
1382 gridGenerationDate(_gridGenerationDate),
1389 virtual ~GeoTessGrid();
1394 int getReferenceCount() {
return refCount; }
1399 void addReference() { ++refCount; }
1404 void removeReference()
1406 if (isNotReferenced())
1409 os << endl <<
"ERROR in GeoTessGrid::removeReference" << endl
1410 <<
"Reference count (" << refCount <<
") is already zero." << endl;
1411 throw GeoTessException(os, __FILE__, __LINE__, 2001);
1420 bool isNotReferenced() {
return (refCount == 0); }
1427 void writeGrid(
const string& fileName);
1432 void writeGridAscii(
const string& fileName);
1437 void writeGridAscii(IFStreamAscii& output);
1442 void writeGridBinary(
const string& fileName);
1447 void writeGridBinary(IFStreamBinary& output);
1454 bool isSupportedFormatVersion(
int frmtVrsn)
1455 {
return (frmtVrsn == 2); }
1458 const GeoTessOptimizationType& getOptimizationType()
const {
return GeoTessOptimizationType::SPEED; }
1518 { computeSpokeLists(level);
return spokeList[level]; }
1520 const vector<vector<Edge*> >&
getEdgeList()
const {
return edgeList; }
1522 const vector<Edge*>&
getEdgeList(
const int& triangle)
const {
return edgeList[triangle]; }
1532 vector<double*> corners;
1533 corners.push_back(vertices[triangles[triangle][0]]);
1534 corners.push_back(vertices[triangles[triangle][1]]);
1535 corners.push_back(vertices[triangles[triangle][2]]);
1536 GeoTessUtils::center(corners, center);
1551 #endif // GEOTESSGRID_OBJECT_H
const string & getGridID() const
A String ID that uniquely identifies this GeoTessGrid.
Definition: GeoTessGrid.h:564
void getVertexNeighbors(const int &tessId, const int &level, const int &vertex, set< int > &nbrs)
Retrieve a list of the indexes of all the vertexes that are connected to the specified vertex by a si...
Definition: GeoTessGrid.h:1294
void getCircumCenter(const int &triangle, double *cc) const
Copy the circumCenter of the specified triangle.
Definition: GeoTessGrid.h:1083
int getNLevels(int tessellation) const
Retrieve number of tessellation levels that define the specified multi-level tessellation of the mode...
Definition: GeoTessGrid.h:835
int tLeft
lndex of triangle to the left of edge from vj to vk
Definition: GeoTessGrid.h:118
const string & getGridGenerationDate() const
Retrieve the date when the contents of this grid was generated.
Definition: GeoTessGrid.h:599
GeoTessGrid(const string &gid)
Standard constructor.
Definition: GeoTessGrid.h:244
int getLevel(int tessellation, int i) const
Retrieve the index of one of the levels on the specified tessellation.
Definition: GeoTessGrid.h:846
const vector< Edge * > & getEdgeList(const int &triangle) const
Definition: GeoTessGrid.h:1522
const double * getVertex(int vertex) const
Retrieve the unit vector that corresponds to the specified vertex.
Definition: GeoTessGrid.h:630
vector< Edge * > & getSpokeList(const int &level) const
Definition: GeoTessGrid.h:1517
int getVertexIndex(const double *u)
Retrieve the index of the vertex that is colocated with the supplied unit vector. ...
Definition: GeoTessGrid.h:704
double ** vertices
An nVertices x 3 array of tessellation vertices.
Definition: GeoTessGrid.h:177
Definition: ArrayReuse.h:55
int const * getDescendants() const
Definition: GeoTessGrid.h:1203
int ** triangles
An nTriangles x 3 array of integers.
Definition: GeoTessGrid.h:189
Opens a file for binary read and write access.
Definition: IFStreamBinary.h:79
GeoTessGrid()
Default constructor.
Definition: GeoTessGrid.h:410
int vj
vertex index j
Definition: GeoTessGrid.h:106
int vk
vertex index k
Definition: GeoTessGrid.h:111
const vector< int > & getVertexTriangles(int tessId, int vertex) const
Retrieve a list of the triangles a particular vertex is a member of, considering only triangles in th...
Definition: GeoTessGrid.h:1261
const string & getGridInputFile() const
Retrieve the name of the file from which the grid was loaded.
Definition: GeoTessGrid.h:614
Manages the geometry and topology of one or more multi-level triangular tessellations of a unit spher...
Definition: GeoTessGrid.h:166
const vector< int > & getVertexTriangles(const int &tessId, const int &level, const int &vertex) const
Retrieve a list of the triangles a particular vertex is a member of, considering only triangles in th...
Definition: GeoTessGrid.h:1245
int getNVertices() const
Returns the number of vertices in the vectices array.
Definition: GeoTessGrid.h:820
const vector< vector< int > > & getVertexTriangles(const int &level) const
Retrieve a list of the triangles a particular vertex is a member of, considering only triangles in th...
Definition: GeoTessGrid.h:1231
int getNeighbor(const int &triangleIndex, const int &neighborIndex) const
Retrieve the index of one of the triangles that is a neighbor of the specified triangle.
Definition: GeoTessGrid.h:1100
void getVerticesTopLevel(const int &tessellation, set< const double * > &vectors)
Retrieve a set containing the unit vectors of all the vertices that are connected together by triangl...
Definition: GeoTessGrid.h:771
int getFirstTriangle(int tessellation, int level) const
Retrieve the index of the first triangle on the specified level of the specified tessellation of the ...
Definition: GeoTessGrid.h:922
GeoTessGrid(IFStreamAscii &input)
Standard constructor.
Definition: GeoTessGrid.h:423
int ** tessellations
tessellations is a n x 2 int array where n is the number of tessellations in the topology of the mode...
Definition: GeoTessGrid.h:227
void setGridGenerationDate(const string &gridDate)
Set the date when this grid was generated.
Definition: GeoTessGrid.h:591
int getNeighbor(const int &tessellation, const int &level, const int &triangle, const int &side)
Retrieve the index of the triangle that is the i'th neighbor of the specified triangle.
Definition: GeoTessGrid.h:1127
LONG_INT getMemory()
Retrieve the amount of memory required by this GeoTessGrid object in bytes.
Definition: GeoTessGrid.h:457
double const *const * getVertices() const
Retrieve a reference to all of the vertices.
Definition: GeoTessGrid.h:761
const string & getGridOutputFile() const
Retrieve the name of the file to which this grid was most recently written, or the string "null" if i...
Definition: GeoTessGrid.h:623
void setGridSoftwareVersion(const string &swVersion)
Set the name and version number of the software that generated the contents of this grid...
Definition: GeoTessGrid.h:575
int getNTessellations() const
Returns the number of tessellations in the tessellations array.
Definition: GeoTessGrid.h:826
int nLevels
Number of levels.
Definition: GeoTessGrid.h:212
int getVertexIndex(const double *u, int tessId)
Retrieve the index of the vertex that is colocated with the supplied unit vector. ...
Definition: GeoTessGrid.h:723
int const *const * getTessellations() const
Retrieve a reference to all of the tessellations of this grid.
Definition: GeoTessGrid.h:1506
Enumeration of the optimization strategies supported by GeoTess including OptimizationType::SPEED and...
Definition: GeoTessOptimizationType.h:66
int getVertexIndex(int triangle, int corner) const
Get the index of the vertex that occupies the specified position in the hierarchy.
Definition: GeoTessGrid.h:675
int nTessellations
Number of tessellations.
Definition: GeoTessGrid.h:232
void setGridInputFile(const string &gridFile)
Set the grid input file name.
Definition: GeoTessGrid.h:605
Opens ascii file for read and write access.
Definition: IFStreamAscii.h:80
const vector< vector< Edge * > > & getEdgeList() const
Definition: GeoTessGrid.h:1520
const double * getCircumCenter(const int &triangle) const
Retrieve the circumCenter of the specified triangle.
Definition: GeoTessGrid.h:1064
int getLastTriangle(int tessellation, int level) const
Retrieve the index of the last triangle on the specified level of the specified tessellation of the m...
Definition: GeoTessGrid.h:934
int getVertexIndex(int tessId, int level, int triangle, int corner) const
Get the index of the vertex that occupies the specified position in the hierarchy.
Definition: GeoTessGrid.h:693
const int * getTriangleVertexIndexes(int triangleIndex) const
Retrieve an int[3] array containing the indexes of the vertices that form the corners of the triangle...
Definition: GeoTessGrid.h:959
int nTriangles
Number of triangles.
Definition: GeoTessGrid.h:194
int cornerj
Definition: GeoTessGrid.h:113
#define LONG_INT
Definition: CPPGlobals.h:111
GeoTessGrid(IFStreamBinary &input)
Standard constructor.
Definition: GeoTessGrid.h:433
int const *const * getTriangles() const
Retrieve a reference to the nTriangles x 3 array of int that specifies the indexes of the 3 vertices ...
Definition: GeoTessGrid.h:946
int const *const * getLevels() const
Retrieve a reference to all of the tessellation levels.
Definition: GeoTessGrid.h:1490
int getLastLevel(int tessellation) const
Retrieve the index of the last level on the specified tessellation, relative to all levels in all tes...
Definition: GeoTessGrid.h:864
int getTriangleVertexIndex(int triangleIndex, int cornerIndex) const
Retrieve the index of the i'th vertex (0..2) that represents one of the corners of the specified tria...
Definition: GeoTessGrid.h:973
int nVertices
Number of vertices.
Definition: GeoTessGrid.h:182
Stores information about the connection between two adjacent vertices which separates two neighboring...
Definition: GeoTessGrid.h:101
int getTriangle(int tessellation, int level, int i) const
Retrieve the index of the i'th triangle on the specified level of the specified tessellation of the m...
Definition: GeoTessGrid.h:910
int ** levels
An n x 2 array where n is the number of tessellation levels in all the tessellations that constitute ...
Definition: GeoTessGrid.h:207
int getNLevels() const
Returns the number of tessellation levels defined for this grid.
Definition: GeoTessGrid.h:1477
int getNeighborIndex(const int &tid, const int &nid)
If triangle with index tid has a neighbor with index nid, then return the index of neighbor in triang...
Definition: GeoTessGrid.h:1192
Edge * next
pointer to next edge in circular list of edges emanating from vertex vj.
Definition: GeoTessGrid.h:134
const set< int > & getVertexIndicesTopLevel(const int &tessId)
Retrieve a set containing the indices of all the vertices that are connected together by triangles on...
Definition: GeoTessGrid.h:813
const string & getGridSoftwareVersion() const
Get the name and version number of the software that generated the contents of this grid...
Definition: GeoTessGrid.h:583
int tRight
index of triangle to the right of edge from vj to vk
Definition: GeoTessGrid.h:123
void getCenter(const int &triangle, double *center)
Compute the unit vector that resides at the center of the specified triangle.
Definition: GeoTessGrid.h:1530
void getTriangleVertices(int triangle, double **triVrt)
Get the 3 vertices that form the corners of the specified triangle, in clockwise order.
Definition: GeoTessGrid.h:999
void getNeighbors(const int &tessellation, const int &level, const int &triangle, vector< int > &neighbors)
Retrieve the indexes of the triangles that are neighbors of the specified triangle.
Definition: GeoTessGrid.h:1176
#define GEOTESS_EXP_IMP
Definition: CPPGlobals.h:71
const set< int > & getVertexIndices(const int &tessId, const int &level)
Retrieve a set containing the indices of all the vertices that are connected together by triangles on...
Definition: GeoTessGrid.h:799
const double * getTriangleVertex(int triangleIndex, int cornerIndex) const
Retrieve the unit vector of the vertex located at one of the corners of the specified triangle...
Definition: GeoTessGrid.h:987
int getNTriangles() const
Retrieve the total number of triangles including those on all levels of all tessellations.
Definition: GeoTessGrid.h:1515
double * getVertex(int tessId, int level, int triangle, int corner)
Get the unit vector of the vertex that occupies the specified position in the hierarchy.
Definition: GeoTessGrid.h:747
int getDescendant(const int &tessId, const int &level, const int &triangle) const
Definition: GeoTessGrid.h:1207
const void computeCircumCenters(const int &level)
Compute the circumcenters of all triangles on the specified level if they have not already been compu...
Definition: GeoTessGrid.h:1034
int getTopLevel(int tessellation) const
Retrieve the index of the last level on the specified tessellation, relative to first level of the sp...
Definition: GeoTessGrid.h:881
int findClosestVertex(double *unit_vector, int tessId)
Retrieve the index of the vertex that is closest to the supplied unit vector.
Definition: GeoTessGrid.h:643
void getNeighbors(int triangleIndex, vector< int > &neighbors)
Retrieve the indexes of the triangles that are neighbors of the specified triangle.
Definition: GeoTessGrid.h:1144
int getDescendant(const int &triangle) const
Definition: GeoTessGrid.h:1205
int getNTriangles(int tessellation, int level) const
Retrieve the number of triangles that define the specified level of the specified multi-level tessell...
Definition: GeoTessGrid.h:893
const void computeCircumCenters()
Compute the circumcenters of all triangles if they have not already been computed.
Definition: GeoTessGrid.h:1017