Skip to content
Snippets Groups Projects
Commit 4bbe0c5e authored by tenter's avatar tenter
Browse files

avoid infinite looping if the input points are invalid (fixes #2)

parent d0f671b0
No related branches found
No related tags found
1 merge request!2avoid infinite looping if the input points are invalid (fixes #2)
......@@ -51,6 +51,12 @@ run( std::vector< Real >& _pt_data, MeshT& _mesh, const Parameter& _parameter )
int pointCount = tree.setTreeMemory( _pt_data , m_parameter.Depth , m_parameter.MinDepth , m_parameter.Depth , Real(m_parameter.SamplesPerNode),
m_parameter.Scale , m_parameter.Confidence , m_parameter.PointWeight , m_parameter.AdaptiveExponent , xForm );
if (pointCount <= 0)
{
std::cerr << "Invalid Input Points" << std::endl;
return false;
}
std::cerr << "Tree Clipping" << std::endl;
tree.ClipTree();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment