Colors not holding
#1
I'm having a problem where the colors I've assigned to objects (Points and lines) change when I switch views. Typically they switch to the color of the first item I create.  So if I create a grid of 9 blue points then one orange line, when I change views (from top-down to 3D) the line switches from orange to blue then stays that color after that.  In addition, the first time I run my program and read the data it displays blue/orange. However, if I clear the data then re-read the file the same information shows blue/blue.  I have had this problem from day one, but I'm finally getting around to trying to fix it.

I'm using a variant of the tutorial SceneView3D. (C#, WPF)

For the line I'm using a PolyLineVisual3D and the points are PixelsVisual3D.  The colors are a SolidColorBrush color (System.Windows.Media.Color).

Any thoughts as to what I'm doing wrong or where to look?  I have verified that the code that sets the color is only getting called once at object creation.

Here is the code where I set the colors:

Points:
Code:
           // The easiest way to show many pixels is to use PixelsVisual3D.
           var pixelsVisual3D = new PixelsVisual3D()
           {
               Positions = _positionsArray,  // Vector3[]
               PixelColor = Brush.Color,      // SolidColorBrush.Color
               PixelSize = 4.0                    //pixelSize
           };


Line:
Code:
           var polyLineVisual3D = new PolyLineVisual3D()
           {
               Positions = _ptArray,          // Point3DCollection
               LineThickness = thickness, // double
               LineColor = brush.Color,    // SolidColorBrush.Color
               IsClosed = false                // bool
           };
#2
Thank you for reporting this problem.
I was able to reproduce and fixed it.

I will send you a fixed pre-release version tomorrow. This fix will be also available in the next version of DXEngine that will be published in the following week or two.
Andrej Benedik
#3
That wasn't the answer I was expecting, but I'll take it. And the time frame works well for me. Thanks.
  


Forum Jump:


Users browsing this thread:
1 Guest(s)