Start of generate vectors for C#

This commit is contained in:
Simon Lübeß
2023-07-19 18:43:26 +02:00
parent 6e02a04a4f
commit f0de874572
12 changed files with 815 additions and 112 deletions
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ScriptCore.Math.Attributes;
public class VectorAttribute : Attribute
{
public Type Type { get; set; }
public int ComponentCount { get; set; }
public string TypeBase { get; set; }
public VectorAttribute(Type type, int componentCount, string typeBase)
{
Type = type;
ComponentCount = componentCount;
TypeBase = typeBase;
}
}
public class SwizzleVectorAttribute : Attribute
{
public SwizzleVectorAttribute()
{
}
}
+22
View File
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Text;
using GlitchyEngine.Math;
using ScriptCore.Math.Attributes;
namespace GlitchyEngine.Math;
[Vector(typeof(float), 2, "float")]
public partial struct float2
{
}
[Vector(typeof(float), 3, "float")]
public partial struct float3
{
}
[Vector(typeof(float), 4, "float")]
public partial struct float4
{
}