Hi All,
I want to convert an array of struct to array of Point3D. The code snippet is as follows :
class Mymesh { public MeshGeometry3D Mesh3D // Properties tanimlaniyor { get { return GetMesh3D(); } }
public struct mystruct
{
public int m_i;
public int m_j;
public int m_k;
public mystruct(int i, int j, int k)
{
m_i = i;
m_j = j;
m_i = k;
}
}
private mystruct[] mypts =
{
new mystruct(20 , 7 , 7),
.
.
new mystruct(23 , 5 , 7)
};
public MeshGeometry3D GetMesh3D()
{
mesh.Positions.Add(mypts(1); *// The error is given at just this line.*
.
.
mesh.Positions.Add(mypts(50);
}
.
.
}
This code is producing the error message "Cannot convert from 'Mymesh.mystruct' to'System.Windows.Media.Media3D.Point3D'.
How can I overcome this error ?
Thanks in advance.
Onder YILMAZ