Fri, 09/28/2001 - 16:43
Hello.
I'm using transient graphics to display a custom cursor axis in a view (showing x and y axis in mouse position) I have a call to AIS_InteractiveContext::MoveTo in each mouse move event and a call to a function that uses Visual3d_TransientManager to draw the axis. The problem is that the detected entities are only highligted in the first "MoveTo" call that detects them. This only happens in an opened context. In neutral point highlights work fine. In this case I have an open context set to edge selection.
Heres what I do in move event handler:
myAISContext->MoveTo(px,py,myV3dView);
(now suppose I have myStructure properly defined)
Visual3d_TransientManager::ClearDraw(myV3dView->View()); Visual3d_TransientManager::BeginDraw(myV3dView->View(),Standard_False,Standard_False); Visual3d_TransientManager::DrawStructure (myStructure); Visual3d_TransientManager::EndDraw();
Can someone give me some tips on how to use transient graphics(namely in move events) and keep highlights functioning?
Thanks a lot.
Sat, 09/29/2001 - 03:59
Ok, I got it. I must use BeginAddDraw and not BeginDraw from Visual3d_TransientManager.