Commit 30aa9aee authored by Ellen Dekkers's avatar Ellen Dekkers
Browse files

some debbug code for bspline surface picking

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11115 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b6ffa525
......@@ -142,10 +142,15 @@ toggleBSplineSurfaceSelection(QMouseEvent* _event)
ACG::Vec2d found_params(curu, curv);
std::cout << "target_idx = " << target_idx << std::endl;
std::cout << "parameter: u = " << curu << ", v = " << curv << std::endl;
// knots closest to parameters of hitpoint on the surface
int knotIdx_m = KnotvectorSelection::closestKnot(knotvec_u, curu);
int knotIdx_n = KnotvectorSelection::closestKnot(knotvec_v, curv);
std::cout << "closets knot indices: knotIdx_m = " << knotIdx_m << ", knotIdx_n = " << knotIdx_n << std::endl;
if( bss->get_knotvector_m_ref()->selection( knotIdx_m ) == 0)
bss->get_knotvector_m_ref()->selection( knotIdx_m ) = 1;
else
......@@ -156,6 +161,16 @@ toggleBSplineSurfaceSelection(QMouseEvent* _event)
else
bss->get_knotvector_n_ref()->selection( knotIdx_n ) = 0;
std::cout << "selections m : " << std::flush;
for (unsigned int i = 0; i < bss->n_knots_m(); ++i)
std::cout << (int)bss->get_knotvector_m_ref()->selection(i) << ", " << std::flush;
std::cout << std::endl;
std::cout << "selections n : " << std::flush;
for (unsigned int i = 0; i < bss->n_knots_n(); ++i)
std::cout << (int)bss->get_knotvector_n_ref()->selection(i) << ", " << std::flush;
std::cout << std::endl << std::endl;;
} // end of if selections available
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment