mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Start of generate vectors for C#
This commit is contained in:
@@ -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()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user