Problem with ScreenSpaceLines3D
-
Hi i was working with ScreenSpaceLines3D (Part of 3DTools for WPF) and to draw this object i must to add it to Viewport3D.Children which is Visual3DCollection when i add the object to that collection then remove it it throw a 'NullReferenceException' the exception was thrown by a method inside the class which is UpdateTransform() in OnRendering eventHandler cold someone help in this ? and the other problem that i can not replace ScreenSpaceLines3D with any thing i must use it Sample of what happens : <pre> Viewport3D viewport; ScreenSpaceLines3D screenSpaceLines3D; public void AddLine() { screenSpaceLines3D = new ScreenSpaceLines3D(); screenSpaceLines3D.Color = Colors.Blue; screenSpaceLines3D.Points.Add(new Point3D(0, 0, 0)); screenSpaceLines3D.Points.Add(new Point3D(10, 10, 10)); screenSpaceLines3D.Thickness = 1; viewport = new Viewport3D(); viewport.Children.Add(screenSpaceLines3D); } public void RemoveLine() { if (screenSpaceLines3D != null) { viewport.Children.Remove(screenSpaceLines3D); } }// The exception appears her </pre>