GeometryBuilder.cs 824 B

123456789101112131415161718192021222324
  1. using System;
  2. using Microsoft.Xna.Framework.Graphics;
  3. namespace MonoGame.Extended.Graphics.Geometry
  4. {
  5. public abstract class GeometryBuilder<TVertexType, TIndexType>
  6. where TVertexType : struct, IVertexType
  7. where TIndexType : struct
  8. {
  9. public PrimitiveType PrimitiveType { get; protected set; }
  10. public int VertexCount { get; protected set; }
  11. public int IndexCount { get; protected set; }
  12. public int PrimitivesCount { get; protected set; }
  13. public TVertexType[] Vertices { get; }
  14. public TIndexType[] Indices { get; }
  15. protected GeometryBuilder(int maximumVerticesCount, int maximumIndicesCount)
  16. {
  17. Vertices = new TVertexType[maximumVerticesCount];
  18. Indices = new TIndexType[maximumIndicesCount];
  19. }
  20. }
  21. }