1

I have the following code (Test only right now)

 PlotPoint[] starLocations = new PlotPoint[4];
 starLocations[0] = new PlotPoint(9,-2,1);
 starLocations[1] = new PlotPoint(-3,6,1);
 starLocations[2] = new PlotPoint(4,2,-3);
 starLocations[3] = new PlotPoint(7,-8,9);

 //draw the sector map
 SectorMap ourMap = new SectorMap();

 ourMap.reDraw(PlotPoint.getILLocs(starLocations));

SectorMap.cs

public void reDraw(float[,] givenLocs){
 ILArray<float> ourPositions = givenLocs;
 textBox1.Text = ourPositions.ToString();

 var scene = new ILScene();
 var plotCube = scene.Add(new ILPlotCube(false));
 var ourPosBuffer = new ILPoints();
 ourPosBuffer.Positions = ourPositions;
 ourPosBuffer.Size = 3;

 plotCube.Add(ourPosBuffer);
 iLStarChart.Scene = scene;      
}

Doing this, when I check the matrix at PlotPoint.getILLocs, I get a 4x3 matrix. When I check the passed matrix, it's again a 3x4

When I check ourPositions in SectorMap.cs, it has become a 3x4 matrix. Which is something I did not intend. What am I doing wrong?

  • Your problem may relates to the difference of storage schemes for .NET float[,] and ILArray: row major and column major. Assigning the former to the latter may flips dimensions. But your example is too complicated. Please simplify and focus on the .reDraw function. – Haymo Kutschbach Feb 23 '14 at 11:49
  • I have simplified it now*. The problem appears to be I'm not getting what looks like a 3d grid out of it. – KoihimeNakamura Feb 23 '14 at 13:24

1 Answers1

1

I messed up, and I'm providing how here for other people's refrence:

1) It was, as Haymo Kutschbach said, a difference in storage scheme. 2) The confusion and lack of 3D grid was due to

 var plotCube = scene.Add(new ILPlotCube(false));

instead of the

var plotCube = scene.Add(new IPlotCube(null,false));