VertexArray.cs 755 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using MathNet.Numerics.LinearAlgebra.Single;
  7. namespace bbiwarg.DataSource
  8. {
  9. class VertexArray
  10. {
  11. private Vector[] positions;
  12. private Color4[] colors;
  13. public VertexArray(Vector[] positions, Color4[] colors)
  14. {
  15. this.positions = positions;
  16. this.colors = colors;
  17. }
  18. public int getNumVertices()
  19. {
  20. return positions.Length;
  21. }
  22. public Vector getPosition(int index)
  23. {
  24. return positions[index];
  25. }
  26. public Color4 getColor(int index)
  27. {
  28. return colors[index];
  29. }
  30. }
  31. }