Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert List<Point3D> to a 2D array

Solved!
Go to solution

I am currently using a List<Point3D> to bind to my DataSource of an Ni graph. There are performance issues with using a List<Point3D> and I heard a 2D array of double values can be substitued however I don't know how to convert the position and data of each point held in a Point3D object to a double[,] value.

 

Please help, thank you

0 Kudos
Message 1 of 2
(2,521 Views)
Solution
Accepted by topic author gabe0

A double[,] will work, as long as the Point3D values are using integer positions (for example, "{ Point3D( 0, 1, 1.1 ), Point3D( 1, 0, 2.2 ) }" would be equivalent to "{ { double.NaN, 1.1 }, { 2.2, double.NaN } }"). If you are using non-integer positions (e.g. "{ Point3D( 0.5, 0.25, 1.1 ), Point3D( 0.75, 1.25, 2.2 ) }"), there is no direct conversion.

~ Paul H
Message 2 of 2
(2,487 Views)