我有以下代码(现在只测试)
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));
扇形图.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;
}
这样做,当我在 PlotPoint.getILLocs 检查矩阵时,我得到一个 4x3 矩阵。当我检查传递的矩阵时,它又是一个 3x4
当我在 SectorMap.cs 中检查 ourPositions 时,它已经变成了一个 3x4 矩阵。这是我不打算的。我究竟做错了什么?