custom V3d_View::TriedronDisplay

I've kind of figured out how to create my own view orientation indicator. I inherited AIS_InteractiveObject and in its Compute method:

aPresentation
->SetTransformPersistence(Graphic3d_TMF_TriedronPers, gp_Pnt(-1, -1, 230));

I then go on, in the same Compute method, and build up each axis with Graphic3d_ArrayOfTriangles.

This works ok. It stays in the corner and ignores pan and zoom, but does rotate correctly.

Now, is there a way to draw this AIS object on "top" of everything else so it's always visible? I've tried setting the display priority from 0 to 10, but it's had no effect.

I've done this before using pure OpenGL commands by translating the shape outside the models bounding box. I can't see a way to do that with OCC. Maybe with Graphic3d_Structure::SetTransform?

sergey zaritchny's picture

Hi Edward,
For sure there is a natural way to have AIS object on the "top": just redraw this object as last in the scene.
If you need more information the training and e-learning courses are at your disposal - http://www.opencascade.org/support/training/.
Regards
Sergey

sergey zaritchny's picture

Hi,
Sorry, it seems I have mistaken.
There is no ready to use way in AIS to have AIS object always on the "top".
I may recommend you one of the next ways:
- use UserDraw mode (Graphic3d package) or
- use Overlay mode (V3d_View ==> V3d_LayerMgr==>Visual3d_Layer)
Also you may use one of our support services - http://www.opencascade.org/support/alacarte/.
Regards
Sergey

S. Edward Dolan's picture

Thanks for the hints Sergey. I'll check out the source for those mentioned.