I have to display 3d points that are generated dynamically (anytime some input device is moved).
So I've created a class inheriting AIS_InteractiveObject and redefined Compute(Handle_PrsMgr_PresentationManager3d, Handle_Prs3d_Presentation, ...) method.
This sub-class relies on a Graphic3d_ArrayOfPrimitives being filled with specific purpose addPoint() :
class AIS_Path : public AIS_InteractiveObject
: m_points(new Graphic3d_ArrayOfPolylines(maxPoints))
Each time a new point is added AIS_InteractiveContext::RecomputePrsOnly() is called and then Update() but only the points added with addPoint() before the very first call to Display() can be seen, after that nothing is displayed.
How should I proceed to get things work ?
I still have no solution with this issue.
How can we force OpenCascade to display dynamic graphics ?
I'm using OCC v6.6.0 and in Graphic3d_Group.hxx there is some doc about "main group usage models" :
1) Non-modifiable, or unbounded, group ('black box')
2) Bounded group (...) Such a group have simplified organization in memory (a single block of attributes followed by a block of primitives) and therefore it can be modified
How to change the primitive array (eg. AddVertex()) inside a Graphic3d_Group and update the display automatically ?
I know this is an OCC forum and don't want to move you away from it, but if you only have to deal with points I think OCC is not the proper tool. Are you aware of VTK and it's GUI bindings to for example Qt? It would be quite straighforward to implement dynamic graphics with points with it (it has excellent Python bindings too).
Thanks for the advice, but I would like to stay with OpenCascade as I need to display part files (STEP, IGES, ...).
What at least I would like to known is whether or not it's possible to display dynamic graphics with OpenCascade.
Any trick or workaround would be of great help.