Wed, 12/13/2017 - 04:17
Forums:
Hi, I have OC 7.2 and a little app drawing the MakeBottle example and few extra primitive for testing. Now I'd like to detect a shape when the mouse moves around. Under my MouseMove function, I try this method but it's never true.
void wxViewOC::mouseMoved(wxMouseEvent& event)
{
if (mContext->HasDetected()){
wxMessageBox("HasDetected");//the code never reach this part
}
}
Am I missing a setting or something?
Thu, 12/21/2017 - 14:48
Do you call the MoveTo method on your context? You need it to sync the mouse position with the position in your 3d view.
https://www.opencascade.com/doc/occt-6.9.0/refman/html/class_a_i_s___int...
Thu, 12/21/2017 - 21:06
Yes I discover I needed to do that. Thanks a lot!