Display dynamic (changing) graphics
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))
void addPoint(const gp_Pnt& pnt)
void Compute(const Handle_PrsMgr_PresentationManager3d& pm,
const Handle_Prs3d_Presentation& pres,
const Standard_Integer mode)
Handle_Graphic3d_Group group = Prs3d_Root::CurrentGroup(pres);
void ComputeSelection(const Handle_SelectMgr_Selection& selection, const Standard_Integer mode)
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 ?