AB4D Forum

Full Version: Adorners and Higlhlighting
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have an application where I would like to have my graphic objects highlighted when the mouse is over them. I would like the highlighting be the display of the wireframe model of the object over the object. I have no problem getting an event notification from MouseEnter and MouseLeave events. It seems like an adorner would be handy to use but they need UIElement's, not UIElement3D's. Any suggestions on how to do this would be appreciated.
I do not understand why would you use an adorner layer.

Why can't you just add the wireframe model to the same Viewport3D that is already showing your model? Do you want to show the whole wireframe - without the 3D object hiding the back wireframe line?

In that case you can create a new Viewport3D over the already existing Viewport3D (add both to Grid so they will have the same size). Set HitTestVisibile to false on the new Viewport3D (so mouse events will go through it to the existing Viewport3D). So the previous Viewport3D will display your 3D model and the new Viewport3D the wireframe.

Honestly I do not see that a very good way of selecting objects.

If you have more complex models, you will have to be careful with wireframe because it can become very performance expansive. It that case it is probably better to add a WireBox3D that is created based on the bounds of the selected object (I also use that in Viewer3ds).

I hope I helped somehow. If you wanted some other help (=I did not understand your question), please let me know and I will try to help.