我有以下代码(现在只测试)
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;
}
这样做,当我在PlotPoint.getILLocs检查矩阵时,我得到一个4x3矩阵。当我检查传递的矩阵时,它又是一个3x4
当我在SectorMap.cs中检查myPositions时,它已成为3x4矩阵。这是我不想要的。我做错了什么?
答案 0 :(得分:1)
我搞砸了,我在这里提供其他人的参考:
1)正如Haymo Kutschbach所说,存储方案存在差异。 2)3D网格的混乱和缺乏是由于
var plotCube = scene.Add(new ILPlotCube(false));
而不是
var plotCube = scene.Add(new IPlotCube(null,false));