From acea7b2e728787a0d83bbf83c8c1f042d2c32e7e Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Mon, 3 Jun 2024 10:15:45 +0800 Subject: + plugins project --- .../Geometry/GeometryBuilder.cs | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Plugins/MonoGame.Extended/source/MonoGame.Extended.Graphics/Geometry/GeometryBuilder.cs (limited to 'Plugins/MonoGame.Extended/source/MonoGame.Extended.Graphics/Geometry/GeometryBuilder.cs') diff --git a/Plugins/MonoGame.Extended/source/MonoGame.Extended.Graphics/Geometry/GeometryBuilder.cs b/Plugins/MonoGame.Extended/source/MonoGame.Extended.Graphics/Geometry/GeometryBuilder.cs new file mode 100644 index 0000000..dad4f15 --- /dev/null +++ b/Plugins/MonoGame.Extended/source/MonoGame.Extended.Graphics/Geometry/GeometryBuilder.cs @@ -0,0 +1,24 @@ +using System; +using Microsoft.Xna.Framework.Graphics; + +namespace MonoGame.Extended.Graphics.Geometry +{ + public abstract class GeometryBuilder + where TVertexType : struct, IVertexType + where TIndexType : struct + { + public PrimitiveType PrimitiveType { get; protected set; } + public int VertexCount { get; protected set; } + public int IndexCount { get; protected set; } + public int PrimitivesCount { get; protected set; } + + public TVertexType[] Vertices { get; } + public TIndexType[] Indices { get; } + + protected GeometryBuilder(int maximumVerticesCount, int maximumIndicesCount) + { + Vertices = new TVertexType[maximumVerticesCount]; + Indices = new TIndexType[maximumIndicesCount]; + } + } +} -- cgit v1.1-26-g67d0