TTK
Loading...
Searching...
No Matches
BarycentricSubdivision.cpp
Go to the documentation of this file.
2
3int ttk::BarycentricSubdivision::buildOutputTriangulation(
4 ttk::ExplicitTriangulation &outputTriangl) {
5
6 // ensure subdivision is already performed
7 if(points_.empty() || cells_connectivity_.empty()) {
8 return 1;
9 }
10
11 outputTriangl.setInputPoints(points_.size() / 3, points_.data());
12#ifdef TTK_CELL_ARRAY_NEW
13 outputTriangl.setInputCells(cells_offsets_.size() - 1,
15 cells_offsets_.data());
16#else
17 // TODO use revert translator
18 LongSimplexId *cells = nullptr;
20 outputTriangl.setInputCells(cells_offsets_.size() - 1, cells);
21#endif
22
23 return 0;
24}
std::vector< LongSimplexId > cells_connectivity_
std::vector< LongSimplexId > cells_offsets_
static void TranslateToFlatLayout(std::vector< LongSimplexId > &connectivity, std::vector< LongSimplexId > &offset, LongSimplexId *&singleArray)
ExplicitTriangulation is a class that provides time efficient traversal methods on triangulations of ...
int setInputCells(const SimplexId &cellNumber, const LongSimplexId *cellArray)
int setInputPoints(const SimplexId &pointNumber, const void *pointSet, const bool &doublePrecision=false)
long long int LongSimplexId
Identifier type for simplices of any dimension.
Definition DataTypes.h:15