Shader like vectors for C# Scripting

This commit is contained in:
Simon Lübeß
2023-07-20 17:48:28 +02:00
parent f0de874572
commit 3e55a1614a
24 changed files with 1572 additions and 486 deletions
+18 -3
View File
@@ -2,8 +2,9 @@
using System.Collections.Generic;
using System.Text;
namespace ScriptCore.Math.Attributes;
namespace GlitchyEngine.Math.Attributes;
[AttributeUsage(AttributeTargets.Struct)]
public class VectorAttribute : Attribute
{
public Type Type { get; set; }
@@ -19,9 +20,23 @@ public class VectorAttribute : Attribute
}
}
public class SwizzleVectorAttribute : Attribute
[AttributeUsage(AttributeTargets.Struct)]
public class ComparableVectorAttribute : Attribute { }
[AttributeUsage(AttributeTargets.Struct)]
public class VectorMathAttribute : Attribute { }
[AttributeUsage(AttributeTargets.Struct)]
public class VectorLogicAttribute : Attribute { }
[AttributeUsage(AttributeTargets.Struct, AllowMultiple = true)]
public class VectorCastAttribute : Attribute
{
public SwizzleVectorAttribute()
public Type TargetType { get; set; }
public bool IsExplicit { get; set; }
public VectorCastAttribute(Type targetType, bool isExplicit)
{
TargetType = targetType;
IsExplicit = isExplicit;
}
}