How can I create a line with fixed width, which will not change when I move the camera? I do not want my lines to scale up when I move the camera away.
I have tried using Ab3d.Visuals.LineArcVisual3D and Ab3d.Models.Line3DFactory.CreateLine3D(), but the result was the same.
I think Ab3d.Utilities.LinesUpdater.Instance.UnregisterLine() might do the work, but I can't get it to work properly.
You can create a 3D plane with PlaneVisual3D or PlaneMesh3D - you can than set Size to something that would look like a line - for example (3, 500).
I hope this is what you are looking for.
I understand now.
You can achieve that with the following:
- first you need to disable LinesUpdater - this can be done in the class constructor with:
Ab3d.Utilities.LinesUpdater.Instance.UpdateMode = Ab3d.Common.Utilities.LinesUpdaterMode.Never;
- than after you added your 3D lines you need to manually refresh the camera and LinesUpdater. For example if you have defined your lines in XAML, than you can add the following code to OnLoad event handler:
Note that this will not work if called from constructor - you need to call this after (or in) Loaded event.
I hope that this is what you are looking for - note that if the camera will be changed after that the lines will look strange - they are created for specific camera angle.
Is there any other solution, which does not require creating a window and displaying it (so the Loaded event fires)?
I have tried inheriting LineVisual3D to expose CreateModel() method, but calling it creates model geometry with NaN position values.
Hi, that is exactly what I was looking for. Thanks for help.