
Mon, 11/01/2021 - 19:30
Hi,
I use the occwindow from transparency demo and until now everything worked fine.
Now I started to move elements programmatically and that does not work. Well, the movement applied to the shapes works, but nothing happens on screen. I tried update(), updateView() and even direct call to paintGL() - the first both don't do anything and the last traps with "Default FBO wrapper creation failed".
When I use the mouse wheel to zoom in and out, I see the elements move - but only at the rate, I move the wheel.
What am I missing? How can I create a dynamic refresh rate, that is fast on action and sleeps if nothing happens?
When I move an element dragging with the mouse, there's no update/refresh problem. I can move as fast as I want - I see every move. Is it possible to simulate dragging with the mouse, so that I can achieve a smooth move?
Mon, 11/01/2021 - 22:11
Code sample on how you move shapes would be helpful.
The most straightforward way to drag something in AIS by mouse is to attach AIS_Manipulator (with AIS_Manipulator::SetModeActivationOnDetection(true)) to object or to sub-class interactive object and implement a draggable interface AIS_InteractiveObject::ProcessDragging().
Tue, 11/02/2021 - 06:31
Hi,
I found the move-code here in forum. Function looks like:
Tue, 11/02/2021 - 09:41
When modifying main scene content, put also:
to ask Viewer to redraw full scene on next update as OcctQtViewer::update()/OcctQtViewer::updateView() performs a lazy update (through AIS_ViewController::FlushViewEvents()) by default.
Tue, 11/02/2021 - 18:14
Perfect!
Thank you very much for your help! That did the trick :) I thought I tested without luck
InvalidateImmediate()
, but maybe I remember wrong.Invalidate()
works perfect.Sorry, but may I ask you for help on my helix-problem? I'm helpless stuck :(