199 bool _constrainValues;
200 std::vector< int > _pointCount;
208 std::vector< PointData > _points;
209 TreeOctNode::NeighborKey3 neighborKey;
210 TreeOctNode::ConstNeighborKey3 neighborKey2;
214 Real GetLaplacian(
const int index[DIMENSION] )
const;
221 float splineValues[3][3];
224 Real GetValue(
const PointInfo points[3][3][3] ,
const bool hasPoints[3][3] ,
const int d[3] )
const;
226 class AdjacencyCountFunction
232 class AdjacencySetFunction{
234 int *adjacencies,adjacencyCount;
238 class RefineFunction{
243 class FaceEdgesFunction
246 int fIndex , maxDepth;
247 std::vector< std::pair< RootInfo , RootInfo > >* edges;
248 std::unordered_map< long long , std::pair< RootInfo , int > >* vertexCount;
252 int SolveFixedDepthMatrix(
int depth ,
const SortedTreeNodes& sNodes ,
Real* subConstraints ,
bool showResidual ,
int minIters ,
double accuracy );
253 int SolveFixedDepthMatrix(
int depth ,
const SortedTreeNodes& sNodes ,
Real* subConstraints ,
int startingDepth ,
bool showResidual ,
int minIters ,
double accuracy );
255 void SetMatrixRowBounds(
const TreeOctNode* node ,
int rDepth ,
const int rOff[3] ,
int& xStart ,
int& xEnd ,
int& yStart ,
int& yEnd ,
int& zStart ,
int& zEnd )
const;
256 int GetMatrixRowSize(
const TreeOctNode::Neighbors5& neighbors5 )
const;
257 int GetMatrixRowSize(
const TreeOctNode::Neighbors5& neighbors5 ,
int xStart ,
int xEnd ,
int yStart ,
int yEnd ,
int zStart ,
int zEnd )
const;
259 int SetMatrixRow(
const TreeOctNode::Neighbors5& neighbors5 ,
pcl::poisson::MatrixEntry< float >* row ,
int offset ,
const double stencil[5][5][5] ,
int xStart ,
int xEnd ,
int yStart ,
int yEnd ,
int zStart ,
int zEnd )
const;
261 void SetLaplacianStencil(
int depth ,
double stencil[5][5][5] )
const;
262 template<
class C ,
int N >
struct Stencil{ C values[N][N][N]; };
263 void SetLaplacianStencils(
int depth , Stencil< double , 5 > stencil[2][2][2] )
const;
265 void SetEvaluationStencils(
int depth , Stencil< double , 3 > stencil1[8] , Stencil< double , 3 > stencil2[8][8] )
const;
267 static void UpdateCoarserSupportBounds(
const TreeOctNode* node ,
int& startX ,
int& endX ,
int& startY ,
int& endY ,
int& startZ ,
int& endZ );
268 void UpdateConstraintsFromCoarser(
const TreeOctNode::NeighborKey5& neighborKey5 ,
TreeOctNode* node ,
Real* metSolution ,
const Stencil< double , 5 >& stencil )
const;
269 void SetCoarserPointValues(
int depth ,
const SortedTreeNodes& sNodes ,
Real* metSolution );
270 Real WeightedCoarserFunctionValue(
const TreeOctNode::NeighborKey3& neighborKey3 ,
const TreeOctNode* node ,
Real* metSolution )
const;
272 void DownSampleFinerConstraints(
int depth ,
SortedTreeNodes& sNodes )
const;
273 template<
class C >
void DownSample(
int depth ,
const SortedTreeNodes& sNodes , C* constraints )
const;
274 template<
class C >
void UpSample(
int depth ,
const SortedTreeNodes& sNodes , C* coefficients )
const;
278 void SetIsoCorners(
Real isoValue ,
TreeOctNode* leaf ,
SortedTreeNodes::CornerTableData& cData ,
char* valuesSet ,
Real* values , TreeOctNode::ConstNeighborKey3& nKey ,
const Real* metSolution ,
const Stencil< double , 3 > stencil1[8] ,
const Stencil< double , 3 > stencil2[8][8] );
279 static int IsBoundaryFace(
const TreeOctNode* node ,
int faceIndex ,
int subdivideDepth );
280 static int IsBoundaryEdge(
const TreeOctNode* node ,
int edgeIndex ,
int subdivideDepth );
281 static int IsBoundaryEdge(
const TreeOctNode* node ,
int dir ,
int x ,
int y ,
int subidivideDepth );
289 std::unordered_map< long long , int > boundaryRoots;
291 std::unordered_map< long long , std::pair< Real , pcl::poisson::Point3D< Real > > > *boundaryValues;
295 char *cornerValuesSet , *cornerNormalsSet , *edgesSet;
299 int SetMCRootPositions(
TreeOctNode* node ,
int sDepth ,
Real isoValue , TreeOctNode::ConstNeighborKey5& neighborKey5 , RootData& rootData ,
308 static int AddTriangles(
pcl::poisson::CoredMeshData* mesh , std::vector<CoredPointIndex>& edges , std::vector<
Point3D<float> >* interiorPositions ,
int offSet ,
bool addBarycenter ,
bool polygonMesh );
312 void GetMCIsoEdges(
TreeOctNode* node ,
int sDepth , std::vector< std::pair< RootInfo , RootInfo > >& edges );
313 static int GetEdgeLoops( std::vector< std::pair< RootInfo , RootInfo > >& edges , std::vector< std::vector< std::pair< RootInfo , RootInfo > > >& loops);
314 static int InteriorFaceRootCount(
const TreeOctNode* node ,
const int &faceIndex ,
int maxDepth );
315 static int EdgeRootCount(
const TreeOctNode* node ,
int edgeIndex ,
int maxDepth );
317 int GetRoot(
const RootInfo& ri ,
Real isoValue , TreeOctNode::ConstNeighborKey5& neighborKey5 ,
pcl::poisson::Point3D<Real> & position , RootData& rootData ,
int sDepth ,
const Real* metSolution ,
int nonLinearFit );
318 static int GetRootIndex(
const TreeOctNode* node ,
int edgeIndex ,
int maxDepth ,
RootInfo& ri );
319 static int GetRootIndex(
const TreeOctNode* node ,
int edgeIndex ,
int maxDepth ,
int sDepth ,
RootInfo& ri );
321 static int GetRootPair(
const RootInfo& root ,
int maxDepth ,
RootInfo& pair );
330 Real getCornerValue(
const TreeOctNode::ConstNeighborKey3& neighborKey3 ,
const TreeOctNode* node ,
int corner ,
const Real* metSolution );
332 Real getCornerValue(
const TreeOctNode::ConstNeighborKey3& neighborKey3 ,
const TreeOctNode* node ,
int corner ,
const Real* metSolution ,
const double stencil1[3][3][3] ,
const double stencil2[3][3][3] );
333 Real getCenterValue(
const TreeOctNode::ConstNeighborKey3& neighborKey3 ,
const TreeOctNode* node );
338 std::vector< pcl::poisson::Point3D<Real> >*
normals;
344 void setBSplineData(
int maxDepth ,
Real normalSmooth=-1 ,
bool reflectBoundary=
false );
350 template<
typename Po
intNT>
int
353 int useConfidence ,
Real constraintWeight ,
bool adaptiveWeights );
360 void GetMCIsoTriangles(
Real isoValue ,
int subdivideDepth ,
pcl::poisson::CoredMeshData* mesh ,
int fullDepthIso=0 ,
int nonLinearFit=1 ,
bool addBarycenter=
false ,
bool polygonMesh=
false );