public int Push(LayerCell cell) { var tex = toTexCoords(cell.SourceTexture); var screen = toScreenCoords(cell.DestinationScreen); Array.Copy(new VertexAwesome[] { new VertexAwesome(255,screen[0],Vector3.UnitZ,tex[0]), new VertexAwesome(255,screen[2],Vector3.UnitZ,tex[2]), new VertexAwesome(255,screen[1],Vector3.UnitZ,tex[1]), new VertexAwesome(255,screen[1],Vector3.UnitZ,tex[1]), new VertexAwesome(255,screen[2],Vector3.UnitZ,tex[2]), new VertexAwesome(255,screen[3],Vector3.UnitZ,tex[3]), }, 0, vertexBuffer, 6 * index, 6); index++; return index - 1; }
public void UpdateCell(int cellIndex, LayerCell cell) { var tex = toTexCoords(cell.SourceTexture); var screen = toScreenCoords(cell.DestinationScreen); cellIndex *= 6; vertexBuffer[cellIndex + 0].Position = screen[0]; vertexBuffer[cellIndex + 0].TextureCoordinate = tex[0]; vertexBuffer[cellIndex + 1].Position = screen[2]; vertexBuffer[cellIndex + 1].TextureCoordinate = tex[2]; vertexBuffer[cellIndex + 2].Position = screen[1]; vertexBuffer[cellIndex + 2].TextureCoordinate = tex[1]; vertexBuffer[cellIndex + 3].Position = screen[1]; vertexBuffer[cellIndex + 3].TextureCoordinate = tex[1]; vertexBuffer[cellIndex + 4].Position = screen[2]; vertexBuffer[cellIndex + 4].TextureCoordinate = tex[2]; vertexBuffer[cellIndex + 5].Position = screen[3]; vertexBuffer[cellIndex + 5].TextureCoordinate = tex[3]; }
public void LayerCellConstructorTest() { LayerCell target = new LayerCell(); Assert.Inconclusive("TODO: Code zum Überprüfen des Ziels implementieren"); }