From 684aa4874b0730b1ff43b70dfa6e7554028e8137 Mon Sep 17 00:00:00 2001 From: Sam Scott Date: Tue, 25 Jul 2023 15:42:48 +0100 Subject: [PATCH 01/54] Add the component --- .../Drivers/MultiValueArithmeticDriver.cs | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs diff --git a/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs b/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs new file mode 100644 index 0000000..8baa2a2 --- /dev/null +++ b/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs @@ -0,0 +1,63 @@ +using System.Linq; +using FrooxEngine; + +[Category(new string[] { "Transform/Drivers" })] +[GenericTypes(GenericTypes.Group.Primitives)] +public class MultiValueArithmeticDriver : Component +{ + public enum ArithmeticMode + { + Addition, + Subtraction, + Multiplication, + Division + } + + public readonly FieldDrive Target; + + public readonly Sync Mode; + + public readonly SyncList> Values; + + protected override void OnChanges() + { + if (!Target.IsLinkValid) + { + return; + } + if (Values.Contains(Target.Target)) + { + Target.ReleaseLink(); + return; + } + T value = Values[0].Value; + switch (Mode.Value) + { + case ArithmeticMode.Addition: + foreach (Sync sync in Values.Skip(1)) + { + value += (dynamic)sync.Value; + } + break; + case ArithmeticMode.Subtraction: + foreach (Sync sync in Values.Skip(1)) + { + value -= (dynamic)sync.Value; + } + break; + case ArithmeticMode.Multiplication: + foreach (Sync sync in Values.Skip(1)) + { + value *= (dynamic)sync.Value; + } + break; + case ArithmeticMode.Division: + foreach (Sync sync in Values.Skip(1)) + { + value /= (dynamic)sync.Value; + } + break; + } + Target.Target.Value = value; + } +} \ No newline at end of file From 73ba8f8add47d1ea0b832656323e1e58998606e6 Mon Sep 17 00:00:00 2001 From: Sam Scott Date: Tue, 25 Jul 2023 15:59:05 +0100 Subject: [PATCH 02/54] Check valid generic type and check if values list is empty --- .../Transform/Drivers/MultiValueArithmeticDriver.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs b/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs index 8baa2a2..001ad24 100644 --- a/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs +++ b/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs @@ -1,10 +1,13 @@ using System.Linq; +using BaseX; using FrooxEngine; [Category(new string[] { "Transform/Drivers" })] [GenericTypes(GenericTypes.Group.Primitives)] public class MultiValueArithmeticDriver : Component { + public static bool IsValidGenericType => Coder.SupportsAddSub; + public enum ArithmeticMode { Addition, @@ -25,8 +28,13 @@ protected override void OnChanges() { return; } + if (Values.Count == 0) + { + return; + } if (Values.Contains(Target.Target)) { + // don't let the component drive itself, don't want a feedback loop Target.ReleaseLink(); return; } From 1eb29512ac34bdc3aeb13bfec5cd4a280e96239a Mon Sep 17 00:00:00 2001 From: Sam Scott Date: Tue, 25 Jul 2023 16:08:52 +0100 Subject: [PATCH 03/54] Use Coder class instead of casting to dynamic --- .../Transform/Drivers/MultiValueArithmeticDriver.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs b/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs index 001ad24..6ac79e1 100644 --- a/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs +++ b/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs @@ -44,25 +44,25 @@ protected override void OnChanges() case ArithmeticMode.Addition: foreach (Sync sync in Values.Skip(1)) { - value += (dynamic)sync.Value; + value = Coder.Add(value, sync.Value); } break; case ArithmeticMode.Subtraction: foreach (Sync sync in Values.Skip(1)) { - value -= (dynamic)sync.Value; + value = Coder.Sub(value, sync.Value); } break; case ArithmeticMode.Multiplication: foreach (Sync sync in Values.Skip(1)) { - value *= (dynamic)sync.Value; + value = Coder.Mul(value, sync.Value); } break; case ArithmeticMode.Division: foreach (Sync sync in Values.Skip(1)) { - value /= (dynamic)sync.Value; + value = Coder.Div(value, sync.Value); } break; } From 643d2057465d6c716a690338a0fc5aa9dcf3a2c7 Mon Sep 17 00:00:00 2001 From: Sam Scott Date: Tue, 25 Jul 2023 16:19:52 +0100 Subject: [PATCH 04/54] Change generic types to NeosPrimitives from Primitives --- .../Components/Transform/Drivers/MultiValueArithmeticDriver.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs b/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs index 6ac79e1..cffca18 100644 --- a/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs +++ b/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs @@ -3,7 +3,7 @@ using FrooxEngine; [Category(new string[] { "Transform/Drivers" })] -[GenericTypes(GenericTypes.Group.Primitives)] +[GenericTypes(GenericTypes.Group.NeosPrimitives)] public class MultiValueArithmeticDriver : Component { public static bool IsValidGenericType => Coder.SupportsAddSub; From a6070f46d287bda372fc0d38fc5054cc3efee59e Mon Sep 17 00:00:00 2001 From: Nytra Date: Thu, 27 Jul 2023 22:04:15 +0100 Subject: [PATCH 05/54] Cheese --- NEOSPlus/Logix/Math/Constants/Cheese.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 NEOSPlus/Logix/Math/Constants/Cheese.cs diff --git a/NEOSPlus/Logix/Math/Constants/Cheese.cs b/NEOSPlus/Logix/Math/Constants/Cheese.cs new file mode 100644 index 0000000..acf8e11 --- /dev/null +++ b/NEOSPlus/Logix/Math/Constants/Cheese.cs @@ -0,0 +1,13 @@ +using BaseX; + +namespace FrooxEngine.LogiX.Math +{ + [Category("LogiX/Math/Constants")] + [NodeName("Cheese")] + [HiddenNode] + public class Cheese : LogixOperator + { + public override string Content => "Cheese"; + public override color NodeBackground => color.Yellow; + } +} \ No newline at end of file From 955f20043188d1992545bc112ee8f705ba2202aa Mon Sep 17 00:00:00 2001 From: Nytra Date: Mon, 31 Jul 2023 04:08:19 +0100 Subject: [PATCH 06/54] Updated node color to be more cheese accurate --- NEOSPlus/Logix/Math/Constants/Cheese.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEOSPlus/Logix/Math/Constants/Cheese.cs b/NEOSPlus/Logix/Math/Constants/Cheese.cs index acf8e11..d47a8b3 100644 --- a/NEOSPlus/Logix/Math/Constants/Cheese.cs +++ b/NEOSPlus/Logix/Math/Constants/Cheese.cs @@ -8,6 +8,6 @@ namespace FrooxEngine.LogiX.Math public class Cheese : LogixOperator { public override string Content => "Cheese"; - public override color NodeBackground => color.Yellow; + public override color NodeBackground => color.FromHexCode("#FBDB65"); } } \ No newline at end of file From 04b02c4758cc0d329eae76fecc2b5314a3943c92 Mon Sep 17 00:00:00 2001 From: Nytra Date: Tue, 8 Aug 2023 10:21:45 +0100 Subject: [PATCH 07/54] Added Frozen's suggested changes --- .../Transform/Drivers/MultiValueArithmeticDriver.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs b/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs index cffca18..461049f 100644 --- a/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs +++ b/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs @@ -1,6 +1,7 @@ using System.Linq; using BaseX; -using FrooxEngine; + +namespace FrooxEngine; [Category(new string[] { "Transform/Drivers" })] [GenericTypes(GenericTypes.Group.NeosPrimitives)] @@ -24,11 +25,7 @@ public enum ArithmeticMode protected override void OnChanges() { - if (!Target.IsLinkValid) - { - return; - } - if (Values.Count == 0) + if (!Target.IsLinkValid || Values.Count == 0) { return; } From 9a4852cfaf516f9f133ddd7167fca70ccf99f889 Mon Sep 17 00:00:00 2001 From: art0007i Date: Tue, 5 Sep 2023 11:42:36 +0200 Subject: [PATCH 08/54] add quantity --- NEOSPlus/ExecutionHook.cs | 2 + NEOSPlus/NEOSPlus.csproj | 3 + NEOSPlus/Quantity/Data.cs | 167 ++++++++++++++++++++++++++ NEOSPlus/Quantity/QuantityInjector.cs | 97 +++++++++++++++ 4 files changed, 269 insertions(+) create mode 100644 NEOSPlus/Quantity/Data.cs create mode 100644 NEOSPlus/Quantity/QuantityInjector.cs diff --git a/NEOSPlus/ExecutionHook.cs b/NEOSPlus/ExecutionHook.cs index 71ee1af..a6fdb9e 100644 --- a/NEOSPlus/ExecutionHook.cs +++ b/NEOSPlus/ExecutionHook.cs @@ -5,6 +5,7 @@ using FrooxEngine; using FrooxEngine.LogiX.Data; using NEOSPlus.Hardware; +using NEOSPlus.Quantity; using NEOSPlus.Shaders; namespace NEOSPlus @@ -25,6 +26,7 @@ static ExecutionHook() { ShaderInjection.AppendShaders(); HardwareInjector.InitializeHardwareClasses(); + QuantityInjector.Inject(); //AttributeInjector.Inject(); }; } diff --git a/NEOSPlus/NEOSPlus.csproj b/NEOSPlus/NEOSPlus.csproj index b96e26b..a4432b0 100644 --- a/NEOSPlus/NEOSPlus.csproj +++ b/NEOSPlus/NEOSPlus.csproj @@ -29,6 +29,9 @@ $(NeosPath)Neos_Data/Managed/BaseX.dll + + $(NeosPath)Neos_Data/Managed/QuantityX.dll + $(NeosPath)Neos_Data/Managed/CodeX.dll diff --git a/NEOSPlus/Quantity/Data.cs b/NEOSPlus/Quantity/Data.cs new file mode 100644 index 0000000..9fb8bc2 --- /dev/null +++ b/NEOSPlus/Quantity/Data.cs @@ -0,0 +1,167 @@ +// QuantityX.Distance +using System; +using QuantityX; + +public readonly struct Data : IQuantitySI, IQuantitySI, IQuantity, IQuantity, IComparable, IEquatable +{ + public readonly double BaseValue; + + public static readonly Unit Byte = new UnitSI(0, "", ""); + + double IQuantity.BaseValue => BaseValue; + + public double SIPower => 1.0; + + public Unit DefaultUnit => Byte; + + public Data(double baseValue = 0.0) + { + this = default(Data); + BaseValue = baseValue; + } + + public bool Equals(Data other) + { + return BaseValue == other.BaseValue; + } + + public int CompareTo(Data other) + { + return BaseValue.CompareTo(other.BaseValue); + } + + public string[] GetShortBaseNames() + { + return new string[] { "B" }; + } + + public string[] GetLongBaseNames() + { + return new string[] { "bytes", "byte" }; + } + + public IUnit[] GetCommonSIUnits() + { + return new IUnit[] + { + SI.Yotta, + SI.Zetta, + SI.Exa, + SI.Peta, + SI.Tera, + SI.Giga, + SI.Mega, + SI.Kilo, + Byte, + }; + } + + public IUnit[] GetExludedSIUnits() + { + return new IUnit[] + { + SI.Deca, + SI.Hecto, + SI.Milli, + SI.Centi, + SI.Deci, + SI.Yocto, + SI.Zepto, + SI.Atto, + SI.Femto, + SI.Pico, + SI.Nano, + SI.Micro, + }; + } + + public Data New(double baseVal) + { + return new Data(baseVal); + } + + public Data Add(Data q) + { + return new Data(BaseValue + q.BaseValue); + } + + public Data Subtract(Data q) + { + return new Data(BaseValue - q.BaseValue); + } + + public Data Multiply(double n) + { + return new Data(BaseValue * n); + } + + public Data Multiply(Data a, Ratio r) + { + return a * r.BaseValue; + } + + public Data Multiply(Ratio r, Data a) + { + return a * r.BaseValue; + } + + public Data Divide(double n) + { + return new Data(BaseValue / n); + } + + public Ratio Divide(Data q) + { + return new Ratio(BaseValue / q.BaseValue); + } + + public static Data Parse(string str, Unit defaultUnit = null) + { + return Unit.Parse(str, defaultUnit); + } + + public static bool TryParse(string str, out Data q, Unit defaultUnit = null) + { + return Unit.TryParse(str, out q, defaultUnit); + } + + public static Data operator +(Data a, Data b) + { + return a.Add(b); + } + + public static Data operator -(Data a, Data b) + { + return a.Subtract(b); + } + + public static Data operator *(Data a, double n) + { + return a.Multiply(n); + } + + public static Data operator /(Data a, double n) + { + return a.Divide(n); + } + + public static Ratio operator /(Data a, Data b) + { + return a.Divide(b); + } + + public static Data operator -(Data a) + { + return a.Multiply(-1.0); + } + + public static Velocity operator /(Data l, Time t) + { + return Velocity.MetersPerSecond * (l.BaseValue / t.BaseValue); + } + + public override string ToString() + { + return this.FormatAuto(); + } +} diff --git a/NEOSPlus/Quantity/QuantityInjector.cs b/NEOSPlus/Quantity/QuantityInjector.cs new file mode 100644 index 0000000..e56dfd7 --- /dev/null +++ b/NEOSPlus/Quantity/QuantityInjector.cs @@ -0,0 +1,97 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Reflection; +using BaseX; +using FrooxEngine; +using QuantityX; + +namespace NEOSPlus.Quantity; + +internal static class QuantityInjector +{ + internal static void Inject() + { + var quantities = + typeof(FrooxEngine.GenericTypes).GetField("quantities", BindingFlags.Static | BindingFlags.NonPublic); + var newArray = (quantities.GetValue(null) as Type[]).Append(typeof(Data)).ToArray(); + quantities.SetValue(null, newArray); + + UpdateQuantityCache(); + } + + internal static void UpdateQuantityCache() + { + // This line is required to call the static constructor of QuantityX, which will create the arrays we are modifying below. + //_ = QuantityX.QuantityX.Culture; + + //var Culture = CultureInfo.InvariantCulture; + var unitCache = + typeof(QuantityX.QuantityX).GetField("unitCache", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null) as Dictionary>; + var unitNameCache = + typeof(QuantityX.QuantityX).GetField("unitNameCache", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null) as Dictionary>; + Type[] types = typeof(QuantityInjector).Assembly.GetTypes(); + + foreach (Type type in types) + { + if (!typeof(IQuantity).IsAssignableFrom(type) || !type.IsValueType) + { + continue; + } + IQuantity quantity = (IQuantity)Activator.CreateInstance(type); + List list = new List(); + unitCache.Add(type, list); + bool flag = false; + Type[] interfaces = type.GetInterfaces(); + foreach (Type type2 in interfaces) + { + if (type2.IsGenericType && type2.GetGenericTypeDefinition() == typeof(IQuantitySI<>)) + { + flag = true; + break; + } + } + BindingFlags bindingAttr = BindingFlags.Static | BindingFlags.Public; + List list2 = new List { type.GetFields(bindingAttr) }; + if (flag) + { + IQuantitySI quantitySI = (IQuantitySI)quantity; + IUnit[] commonSIUnits = quantitySI.GetCommonSIUnits(); + foreach (IUnit unit in commonSIUnits) + { + UnitGroup.Common.RegisterUnit(unit); + UnitGroup.CommonMetric.RegisterUnit(unit); + } + commonSIUnits = quantitySI.GetExludedSIUnits(); + foreach (IUnit unit2 in commonSIUnits) + { + UnitGroup.Metric.RemoveUnit(unit2); + } + Type type3 = typeof(SI<>).MakeGenericType(type); + list2.Add(type3.GetFields(bindingAttr)); + } + foreach (FieldInfo[] item in list2) + { + foreach (FieldInfo fieldInfo in item) + { + if (typeof(IUnit).IsAssignableFrom(fieldInfo.FieldType)) + { + var unit = (IUnit)fieldInfo.GetValue(null); + list.Add(unit); + } + } + } + list.Sort(); + Dictionary dictionary = new Dictionary(); + unitNameCache.Add(type, dictionary); + foreach (IUnit item2 in list) + { + foreach (string unitName in item2.GetUnitNames()) + { + dictionary.Add(unitName.Trim(), item2); + } + } + } + } +} \ No newline at end of file From a2a21a494eb5655ed3e0d85d371781e2c9da74b3 Mon Sep 17 00:00:00 2001 From: art0007i Date: Tue, 5 Sep 2023 11:48:05 +0200 Subject: [PATCH 09/54] delete useless (and incorrect) comment --- NEOSPlus/Quantity/QuantityInjector.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/NEOSPlus/Quantity/QuantityInjector.cs b/NEOSPlus/Quantity/QuantityInjector.cs index e56dfd7..8c8622a 100644 --- a/NEOSPlus/Quantity/QuantityInjector.cs +++ b/NEOSPlus/Quantity/QuantityInjector.cs @@ -23,10 +23,6 @@ internal static void Inject() internal static void UpdateQuantityCache() { - // This line is required to call the static constructor of QuantityX, which will create the arrays we are modifying below. - //_ = QuantityX.QuantityX.Culture; - - //var Culture = CultureInfo.InvariantCulture; var unitCache = typeof(QuantityX.QuantityX).GetField("unitCache", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null) as Dictionary>; var unitNameCache = From eb5bc78a705e7fd73551b0dfe4787a3091d6271d Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 11:15:24 +0100 Subject: [PATCH 10/54] Modifications to new data types (Added Pressure) --- NEOSPlus/Quantity/Data.cs | 1 - NEOSPlus/Quantity/Pressure.cs | 159 ++++++++++++++++++++++++ NEOSPlus/Quantity/QuantityInjector.cs | 170 ++++++++++++++++---------- 3 files changed, 264 insertions(+), 66 deletions(-) create mode 100644 NEOSPlus/Quantity/Pressure.cs diff --git a/NEOSPlus/Quantity/Data.cs b/NEOSPlus/Quantity/Data.cs index 9fb8bc2..dfe818f 100644 --- a/NEOSPlus/Quantity/Data.cs +++ b/NEOSPlus/Quantity/Data.cs @@ -1,4 +1,3 @@ -// QuantityX.Distance using System; using QuantityX; diff --git a/NEOSPlus/Quantity/Pressure.cs b/NEOSPlus/Quantity/Pressure.cs new file mode 100644 index 0000000..9eb0a97 --- /dev/null +++ b/NEOSPlus/Quantity/Pressure.cs @@ -0,0 +1,159 @@ +using QuantityX; + +namespace NEOSPlus.Quantity +{ + public readonly struct Data : IQuantitySI, IQuantitySI, IQuantity, IQuantity, IComparable, IEquatable + { + public readonly double BaseValue; + + // Define pressure units + public static readonly Unit Pascal = new UnitSI(1, "Pa", "pascal"); + public static readonly Unit Atmosphere = new Unit(101325, "atm", "atmosphere"); + + double IQuantity.BaseValue => BaseValue; + + public double SIPower => 1.0; + + // Default unit for pressure + public Unit DefaultUnit => Pascal; + + public Data(double baseValue = 0.0) + { + this = default(Data); + BaseValue = baseValue; + } + + public bool Equals(Data other) + { + return BaseValue == other.BaseValue; + } + + public int CompareTo(Data other) + { + return BaseValue.CompareTo(other.BaseValue); + } + + public string[] GetShortBaseNames() + { + return new string[] { "Pa", "atm" }; + } + + public string[] GetLongBaseNames() + { + return new string[] { "pascals", "atmospheres" }; + } + + public IUnit[] GetCommonSIUnits() + { + return new IUnit[] + { + SI.Pascal, + SI.Atmosphere, + }; + } + + + public IUnit[] GetExludedSIUnits() + { + return new IUnit[] + { + SI.Deca, + SI.Hecto, + SI.Milli, + SI.Centi, + SI.Deci, + SI.Yocto, + SI.Zepto, + SI.Atto, + SI.Femto, + SI.Pico, + SI.Nano, + SI.Micro, + }; + } + public Data New(double baseVal) + { + return new Data(baseVal); + } + + public Data Add(Data q) + { + return new Data(BaseValue + q.BaseValue); + } + + public Data Subtract(Data q) + { + return new Data(BaseValue - q.BaseValue); + } + + public Data Multiply(double n) + { + return new Data(BaseValue * n); + } + + public Data Multiply(Data a, Ratio r) + { + return a * r.BaseValue; + } + + public Data Multiply(Ratio r, Data a) + { + return a * r.BaseValue; + } + + public Data Divide(double n) + { + return new Data(BaseValue / n); + } + + public Ratio Divide(Data q) + { + return new Ratio(BaseValue / q.BaseValue); + } + + public static Data Parse(string str, Unit defaultUnit = null) + { + return Unit.Parse(str, defaultUnit); + } + + public static bool TryParse(string str, out Data q, Unit defaultUnit = null) + { + return Unit.TryParse(str, out q, defaultUnit); + } + + public static Data operator +(Data a, Data b) + { + return a.Add(b); + } + + public static Data operator -(Data a, Data b) + { + return a.Subtract(b); + } + + public static Data operator *(Data a, double n) + { + return a.Multiply(n); + } + + public static Data operator /(Data a, double n) + { + return a.Divide(n); + } + + public static Ratio operator /(Data a, Data b) + { + return a.Divide(b); + } + + public static Data operator -(Data a) + { + return a.Multiply(-1.0); + } + + public override string ToString() + { + return this.FormatAuto(); + } + } +} diff --git a/NEOSPlus/Quantity/QuantityInjector.cs b/NEOSPlus/Quantity/QuantityInjector.cs index 8c8622a..a4d767e 100644 --- a/NEOSPlus/Quantity/QuantityInjector.cs +++ b/NEOSPlus/Quantity/QuantityInjector.cs @@ -6,88 +6,128 @@ using BaseX; using FrooxEngine; using QuantityX; - -namespace NEOSPlus.Quantity; - -internal static class QuantityInjector +//comments added by xlinka for my sanity so i could figure out what the hell is going on. +namespace NEOSPlus.Quantity { - internal static void Inject() + internal static class QuantityInjector { - var quantities = - typeof(FrooxEngine.GenericTypes).GetField("quantities", BindingFlags.Static | BindingFlags.NonPublic); - var newArray = (quantities.GetValue(null) as Type[]).Append(typeof(Data)).ToArray(); - quantities.SetValue(null, newArray); - - UpdateQuantityCache(); - } + // Injects the 'Data' type into the quantities array and updates the quantity cache + internal static void Inject() + { + // Get the 'quantities' field using reflection from 'FrooxEngine.GenericTypes' + var quantities = + typeof(FrooxEngine.GenericTypes).GetField("quantities", BindingFlags.Static | BindingFlags.NonPublic); - internal static void UpdateQuantityCache() - { - var unitCache = - typeof(QuantityX.QuantityX).GetField("unitCache", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null) as Dictionary>; - var unitNameCache = - typeof(QuantityX.QuantityX).GetField("unitNameCache", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null) as Dictionary>; - Type[] types = typeof(QuantityInjector).Assembly.GetTypes(); - - foreach (Type type in types) + // Append the 'Data' type to the existing array of types + var newArray = (quantities.GetValue(null) as Type[]).Append(typeof(Data)).ToArray(); + + // Set the modified array back to the 'quantities' field + quantities.SetValue(null, newArray); + + // Update the quantity cache + UpdateQuantityCache(); + } + + // Updates the quantity cache with information about new quantity types + internal static void UpdateQuantityCache() { - if (!typeof(IQuantity).IsAssignableFrom(type) || !type.IsValueType) - { - continue; - } - IQuantity quantity = (IQuantity)Activator.CreateInstance(type); - List list = new List(); - unitCache.Add(type, list); - bool flag = false; - Type[] interfaces = type.GetInterfaces(); - foreach (Type type2 in interfaces) + // Get the 'unitCache' and 'unitNameCache' fields using reflection from 'QuantityX.QuantityX' + var unitCache = + typeof(QuantityX.QuantityX).GetField("unitCache", BindingFlags.Static | BindingFlags.NonPublic) + .GetValue(null) as Dictionary>; + + var unitNameCache = + typeof(QuantityX.QuantityX).GetField("unitNameCache", BindingFlags.Static | BindingFlags.NonPublic) + .GetValue(null) as Dictionary>; + + // Get all types in the assembly containing the 'QuantityInjector' class + Type[] types = typeof(QuantityInjector).Assembly.GetTypes(); + + foreach (Type type in types) { - if (type2.IsGenericType && type2.GetGenericTypeDefinition() == typeof(IQuantitySI<>)) + // Check if the type is assignable to 'IQuantity' and is a value type + if (!typeof(IQuantity).IsAssignableFrom(type) || !type.IsValueType) { - flag = true; - break; + continue; } - } - BindingFlags bindingAttr = BindingFlags.Static | BindingFlags.Public; - List list2 = new List { type.GetFields(bindingAttr) }; - if (flag) - { - IQuantitySI quantitySI = (IQuantitySI)quantity; - IUnit[] commonSIUnits = quantitySI.GetCommonSIUnits(); - foreach (IUnit unit in commonSIUnits) + + // Create an instance of the quantity type + IQuantity quantity = (IQuantity)Activator.CreateInstance(type); + + // Create a list to store associated units + List unitList = new List(); + unitCache.Add(type, unitList); + + bool isQuantitySI = false; + + // Get interfaces implemented by the quantity type + Type[] interfaces = type.GetInterfaces(); + + // Check if the quantity type implements a generic interface of 'IQuantitySI' + foreach (Type interfaceType in interfaces) { - UnitGroup.Common.RegisterUnit(unit); - UnitGroup.CommonMetric.RegisterUnit(unit); + if (interfaceType.IsGenericType && interfaceType.GetGenericTypeDefinition() == typeof(IQuantitySI<>)) + { + isQuantitySI = true; + break; + } } - commonSIUnits = quantitySI.GetExludedSIUnits(); - foreach (IUnit unit2 in commonSIUnits) + + BindingFlags bindingAttr = BindingFlags.Static | BindingFlags.Public; + + // Create a list to store fields + List fieldLists = new List { type.GetFields(bindingAttr) }; + + if (isQuantitySI) { - UnitGroup.Metric.RemoveUnit(unit2); + // If it's a quantitySI, add common SI units + IQuantitySI quantitySI = (IQuantitySI)quantity; + IUnit[] commonSIUnits = quantitySI.GetCommonSIUnits(); + + foreach (IUnit unit in commonSIUnits) + { + UnitGroup.Common.RegisterUnit(unit); + UnitGroup.CommonMetric.RegisterUnit(unit); + } + + // Exclude specific SI units + commonSIUnits = quantitySI.GetExludedSIUnits(); + foreach (IUnit unit2 in commonSIUnits) + { + UnitGroup.Metric.RemoveUnit(unit2); + } + + Type siType = typeof(SI<>).MakeGenericType(type); + fieldLists.Add(siType.GetFields(bindingAttr)); } - Type type3 = typeof(SI<>).MakeGenericType(type); - list2.Add(type3.GetFields(bindingAttr)); - } - foreach (FieldInfo[] item in list2) - { - foreach (FieldInfo fieldInfo in item) + + foreach (FieldInfo[] fields in fieldLists) { - if (typeof(IUnit).IsAssignableFrom(fieldInfo.FieldType)) + foreach (FieldInfo fieldInfo in fields) { - var unit = (IUnit)fieldInfo.GetValue(null); - list.Add(unit); + if (typeof(IUnit).IsAssignableFrom(fieldInfo.FieldType)) + { + // Get the unit and add it to the unit list + var unit = (IUnit)fieldInfo.GetValue(null); + unitList.Add(unit); + } } } - } - list.Sort(); - Dictionary dictionary = new Dictionary(); - unitNameCache.Add(type, dictionary); - foreach (IUnit item2 in list) - { - foreach (string unitName in item2.GetUnitNames()) + + unitList.Sort(); + + // Create a dictionary to store unit names + Dictionary unitNameDictionary = new Dictionary(); + unitNameCache.Add(type, unitNameDictionary); + + foreach (IUnit unitItem in unitList) { - dictionary.Add(unitName.Trim(), item2); + foreach (string unitName in unitItem.GetUnitNames()) + { + unitNameDictionary.Add(unitName.Trim(), unitItem); + } } } } } -} \ No newline at end of file +} From 771214b7586c112f454810833cf127dc33046d95 Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 11:17:37 +0100 Subject: [PATCH 11/54] Update Pressure.cs exclude the data types for storage --- NEOSPlus/Quantity/Pressure.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/NEOSPlus/Quantity/Pressure.cs b/NEOSPlus/Quantity/Pressure.cs index 9eb0a97..bfd9843 100644 --- a/NEOSPlus/Quantity/Pressure.cs +++ b/NEOSPlus/Quantity/Pressure.cs @@ -69,6 +69,15 @@ public IUnit[] GetExludedSIUnits() SI.Pico, SI.Nano, SI.Micro, + SI.Yotta, + SI.Zetta, + SI.Exa, + SI.Peta, + SI.Tera, + SI.Giga, + SI.Mega, + SI.Kilo, + Byte, }; } public Data New(double baseVal) From 0a1f4de238437746ac03d5c44786253bee0ab8e8 Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 11:22:53 +0100 Subject: [PATCH 12/54] Update Data.cs --- NEOSPlus/Quantity/Data.cs | 272 +++++++++++++++++++------------------- 1 file changed, 137 insertions(+), 135 deletions(-) diff --git a/NEOSPlus/Quantity/Data.cs b/NEOSPlus/Quantity/Data.cs index dfe818f..22e4104 100644 --- a/NEOSPlus/Quantity/Data.cs +++ b/NEOSPlus/Quantity/Data.cs @@ -1,166 +1,168 @@ using System; using QuantityX; - -public readonly struct Data : IQuantitySI, IQuantitySI, IQuantity, IQuantity, IComparable, IEquatable +namespace NEOSPlus.Quantity { - public readonly double BaseValue; - - public static readonly Unit Byte = new UnitSI(0, "", ""); - - double IQuantity.BaseValue => BaseValue; + public readonly struct Data : IQuantitySI, IQuantitySI, IQuantity, IQuantity, IComparable, IEquatable + { + public readonly double BaseValue; - public double SIPower => 1.0; + public static readonly Unit Byte = new UnitSI(0, "", ""); - public Unit DefaultUnit => Byte; + double IQuantity.BaseValue => BaseValue; - public Data(double baseValue = 0.0) - { - this = default(Data); - BaseValue = baseValue; - } + public double SIPower => 1.0; - public bool Equals(Data other) - { - return BaseValue == other.BaseValue; - } + public Unit DefaultUnit => Byte; - public int CompareTo(Data other) - { - return BaseValue.CompareTo(other.BaseValue); - } + public Data(double baseValue = 0.0) + { + this = default(Data); + BaseValue = baseValue; + } - public string[] GetShortBaseNames() - { - return new string[] { "B" }; - } + public bool Equals(Data other) + { + return BaseValue == other.BaseValue; + } - public string[] GetLongBaseNames() - { - return new string[] { "bytes", "byte" }; - } + public int CompareTo(Data other) + { + return BaseValue.CompareTo(other.BaseValue); + } - public IUnit[] GetCommonSIUnits() - { - return new IUnit[] - { - SI.Yotta, - SI.Zetta, - SI.Exa, - SI.Peta, - SI.Tera, - SI.Giga, - SI.Mega, - SI.Kilo, - Byte, - }; - } + public string[] GetShortBaseNames() + { + return new string[] { "B" }; + } - public IUnit[] GetExludedSIUnits() - { - return new IUnit[] - { - SI.Deca, - SI.Hecto, - SI.Milli, - SI.Centi, - SI.Deci, - SI.Yocto, - SI.Zepto, - SI.Atto, - SI.Femto, - SI.Pico, - SI.Nano, - SI.Micro, - }; - } + public string[] GetLongBaseNames() + { + return new string[] { "bytes", "byte" }; + } - public Data New(double baseVal) - { - return new Data(baseVal); - } + public IUnit[] GetCommonSIUnits() + { + return new IUnit[] + { + SI.Yotta, + SI.Zetta, + SI.Exa, + SI.Peta, + SI.Tera, + SI.Giga, + SI.Mega, + SI.Kilo, + Byte, + }; + } + + public IUnit[] GetExludedSIUnits() + { + return new IUnit[] + { + SI.Deca, + SI.Hecto, + SI.Milli, + SI.Centi, + SI.Deci, + SI.Yocto, + SI.Zepto, + SI.Atto, + SI.Femto, + SI.Pico, + SI.Nano, + SI.Micro, + }; + } + + public Data New(double baseVal) + { + return new Data(baseVal); + } - public Data Add(Data q) - { - return new Data(BaseValue + q.BaseValue); - } + public Data Add(Data q) + { + return new Data(BaseValue + q.BaseValue); + } - public Data Subtract(Data q) - { - return new Data(BaseValue - q.BaseValue); - } + public Data Subtract(Data q) + { + return new Data(BaseValue - q.BaseValue); + } - public Data Multiply(double n) - { - return new Data(BaseValue * n); - } + public Data Multiply(double n) + { + return new Data(BaseValue * n); + } - public Data Multiply(Data a, Ratio r) - { - return a * r.BaseValue; - } + public Data Multiply(Data a, Ratio r) + { + return a * r.BaseValue; + } - public Data Multiply(Ratio r, Data a) - { - return a * r.BaseValue; - } + public Data Multiply(Ratio r, Data a) + { + return a * r.BaseValue; + } - public Data Divide(double n) - { - return new Data(BaseValue / n); - } + public Data Divide(double n) + { + return new Data(BaseValue / n); + } - public Ratio Divide(Data q) - { - return new Ratio(BaseValue / q.BaseValue); - } + public Ratio Divide(Data q) + { + return new Ratio(BaseValue / q.BaseValue); + } - public static Data Parse(string str, Unit defaultUnit = null) - { - return Unit.Parse(str, defaultUnit); - } + public static Data Parse(string str, Unit defaultUnit = null) + { + return Unit.Parse(str, defaultUnit); + } - public static bool TryParse(string str, out Data q, Unit defaultUnit = null) - { - return Unit.TryParse(str, out q, defaultUnit); - } + public static bool TryParse(string str, out Data q, Unit defaultUnit = null) + { + return Unit.TryParse(str, out q, defaultUnit); + } - public static Data operator +(Data a, Data b) - { - return a.Add(b); - } + public static Data operator +(Data a, Data b) + { + return a.Add(b); + } - public static Data operator -(Data a, Data b) - { - return a.Subtract(b); - } + public static Data operator -(Data a, Data b) + { + return a.Subtract(b); + } - public static Data operator *(Data a, double n) - { - return a.Multiply(n); - } + public static Data operator *(Data a, double n) + { + return a.Multiply(n); + } - public static Data operator /(Data a, double n) - { - return a.Divide(n); - } + public static Data operator /(Data a, double n) + { + return a.Divide(n); + } - public static Ratio operator /(Data a, Data b) - { - return a.Divide(b); - } + public static Ratio operator /(Data a, Data b) + { + return a.Divide(b); + } - public static Data operator -(Data a) - { - return a.Multiply(-1.0); - } + public static Data operator -(Data a) + { + return a.Multiply(-1.0); + } - public static Velocity operator /(Data l, Time t) - { - return Velocity.MetersPerSecond * (l.BaseValue / t.BaseValue); - } + public static Velocity operator /(Data l, Time t) + { + return Velocity.MetersPerSecond * (l.BaseValue / t.BaseValue); + } - public override string ToString() - { - return this.FormatAuto(); + public override string ToString() + { + return this.FormatAuto(); + } } -} +} \ No newline at end of file From fee267ba6ec4670e907ab6229ae8f680b66eb05a Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 11:29:20 +0100 Subject: [PATCH 13/54] Ohms Data Type Resitanceee --- NEOSPlus/Quantity/Data.cs | 1 + NEOSPlus/Quantity/Ohms.cs | 168 ++++++++++++++++++++++++++++++++++ NEOSPlus/Quantity/Pressure.cs | 5 +- 3 files changed, 172 insertions(+), 2 deletions(-) create mode 100644 NEOSPlus/Quantity/Ohms.cs diff --git a/NEOSPlus/Quantity/Data.cs b/NEOSPlus/Quantity/Data.cs index 22e4104..1e74432 100644 --- a/NEOSPlus/Quantity/Data.cs +++ b/NEOSPlus/Quantity/Data.cs @@ -1,5 +1,6 @@ using System; using QuantityX; + namespace NEOSPlus.Quantity { public readonly struct Data : IQuantitySI, IQuantitySI, IQuantity, IQuantity, IComparable, IEquatable diff --git a/NEOSPlus/Quantity/Ohms.cs b/NEOSPlus/Quantity/Ohms.cs new file mode 100644 index 0000000..f3b49b5 --- /dev/null +++ b/NEOSPlus/Quantity/Ohms.cs @@ -0,0 +1,168 @@ +using QuantityX; + +namespace NEOSPlus.Quantity +{ + public readonly struct Resistance : IQuantitySI, IQuantitySI, IQuantity, IQuantity, IComparable, IEquatable + { + public readonly double BaseValue; + + // Define resistance units (ohms) + public static readonly Unit Ohm = new UnitSI(1, "Ω", "ohm"); + + double IQuantity.BaseValue => BaseValue; + + public double SIPower => 1.0; + + // Default unit for resistance + public Unit DefaultUnit => Ohm; + + public Resistance(double baseValue = 0.0) + { + this = default(Resistance); + BaseValue = baseValue; + } + + public bool Equals(Resistance other) + { + return BaseValue == other.BaseValue; + } + + public int CompareTo(Resistance other) + { + return BaseValue.CompareTo(other.BaseValue); + } + + public string[] GetShortBaseNames() + { + return new string[] { "Ω", "ohm" }; + } + + public string[] GetLongBaseNames() + { + return new string[] { "ohms" }; + } + + public IUnit[] GetCommonSIUnits() + { + return new IUnit[] + { + Ohm + }; + } + + public IUnit[] GetExcludedSIUnits() + { + return new IUnit[] + { + SI.Pascal, + SI.Atmosphere, + SI.Deca, + SI.Hecto, + SI.Milli, + SI.Centi, + SI.Deci, + SI.Yocto, + SI.Zepto, + SI.Atto, + SI.Femto, + SI.Pico, + SI.Nano, + SI.Micro, + SI.Yotta, + SI.Zetta, + SI.Exa, + SI.Peta, + SI.Tera, + SI.Giga, + SI.Mega, + SI.Kilo, + Byte, + }; + } + + public Resistance New(double baseVal) + { + return new Resistance(baseVal); + } + + public Resistance Add(Resistance q) + { + return new Resistance(BaseValue + q.BaseValue); + } + + public Resistance Subtract(Resistance q) + { + return new Resistance(BaseValue - q.BaseValue); + } + + public Resistance Multiply(double n) + { + return new Resistance(BaseValue * n); + } + + public Resistance Multiply(Resistance a, Ratio r) + { + return a * r.BaseValue; + } + + public Resistance Multiply(Ratio r, Resistance a) + { + return a * r.BaseValue; + } + + public Resistance Divide(double n) + { + return new Resistance(BaseValue / n); + } + + public Ratio Divide(Resistance q) + { + return new Ratio(BaseValue / q.BaseValue); + } + + public static Resistance Parse(string str, Unit defaultUnit = null) + { + return Unit.Parse(str, defaultUnit); + } + + public static bool TryParse(string str, out Resistance q, Unit defaultUnit = null) + { + return Unit.TryParse(str, out q, defaultUnit); + } + + public static Resistance operator +(Resistance a, Resistance b) + { + return a.Add(b); + } + + public static Resistance operator -(Resistance a, Resistance b) + { + return a.Subtract(b); + } + + public static Resistance operator *(Resistance a, double n) + { + return a.Multiply(n); + } + + public static Resistance operator /(Resistance a, double n) + { + return a.Divide(n); + } + + public static Ratio operator /(Resistance a, Resistance b) + { + return a.Divide(b); + } + + public static Resistance operator -(Resistance a) + { + return a.Multiply(-1.0); + } + + public override string ToString() + { + return this.FormatAuto(); + } + } +} diff --git a/NEOSPlus/Quantity/Pressure.cs b/NEOSPlus/Quantity/Pressure.cs index bfd9843..845e9d2 100644 --- a/NEOSPlus/Quantity/Pressure.cs +++ b/NEOSPlus/Quantity/Pressure.cs @@ -1,4 +1,5 @@ using QuantityX; +using System; namespace NEOSPlus.Quantity { @@ -47,8 +48,8 @@ public IUnit[] GetCommonSIUnits() { return new IUnit[] { - SI.Pascal, - SI.Atmosphere, + Pascal, + Atmosphere, //do i need si data on these? }; } From 7223373ac8a69bd71ea9f5e686c79bf121a6d645 Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 11:30:50 +0100 Subject: [PATCH 14/54] do i need SI. ? --- NEOSPlus/Quantity/Ohms.cs | 2 +- NEOSPlus/Quantity/Pressure.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NEOSPlus/Quantity/Ohms.cs b/NEOSPlus/Quantity/Ohms.cs index f3b49b5..fc806ce 100644 --- a/NEOSPlus/Quantity/Ohms.cs +++ b/NEOSPlus/Quantity/Ohms.cs @@ -46,7 +46,7 @@ public IUnit[] GetCommonSIUnits() { return new IUnit[] { - Ohm + SI.Ohm }; } diff --git a/NEOSPlus/Quantity/Pressure.cs b/NEOSPlus/Quantity/Pressure.cs index 845e9d2..98fdf87 100644 --- a/NEOSPlus/Quantity/Pressure.cs +++ b/NEOSPlus/Quantity/Pressure.cs @@ -48,8 +48,8 @@ public IUnit[] GetCommonSIUnits() { return new IUnit[] { - Pascal, - Atmosphere, //do i need si data on these? + SI.Pascal, + SI.Atmosphere, //do i need si data on these? }; } From e33937c60d5d6ae2997eb01ac52f2b71d07a8d54 Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 11:36:19 +0100 Subject: [PATCH 15/54] Lumens Plus comments --- NEOSPlus/Quantity/Data.cs | 11 ++- NEOSPlus/Quantity/Lumens.cs | 166 ++++++++++++++++++++++++++++++++++++ 2 files changed, 173 insertions(+), 4 deletions(-) create mode 100644 NEOSPlus/Quantity/Lumens.cs diff --git a/NEOSPlus/Quantity/Data.cs b/NEOSPlus/Quantity/Data.cs index 1e74432..3f74354 100644 --- a/NEOSPlus/Quantity/Data.cs +++ b/NEOSPlus/Quantity/Data.cs @@ -61,6 +61,7 @@ public IUnit[] GetExludedSIUnits() { return new IUnit[] { + SI.Lumen SI.Deca, SI.Hecto, SI.Milli, @@ -155,11 +156,13 @@ public static bool TryParse(string str, out Data q, Unit defaultUnit = nul { return a.Multiply(-1.0); } + - public static Velocity operator /(Data l, Time t) - { - return Velocity.MetersPerSecond * (l.BaseValue / t.BaseValue); - } + // Data go NYOOOM + //public static Velocity operator /(Data l, Time t) + //{ + // return Velocity.MetersPerSecond * (l.BaseValue / t.BaseValue); + //} public override string ToString() { diff --git a/NEOSPlus/Quantity/Lumens.cs b/NEOSPlus/Quantity/Lumens.cs new file mode 100644 index 0000000..ae13faa --- /dev/null +++ b/NEOSPlus/Quantity/Lumens.cs @@ -0,0 +1,166 @@ +using QuantityX; + +namespace NEOSPlus.Quantity +{ + public readonly struct LuminousFlux : IQuantitySI, IQuantitySI, IQuantity, IQuantity, IComparable, IEquatable + { + public readonly double BaseValue; + + // Define luminous flux unit (lumen) + public static readonly Unit Lumen = new UnitSI(1, "lm", "lumen"); + + double IQuantity.BaseValue => BaseValue; + + public double SIPower => 1.0; + + // Default unit for luminous flux + public Unit DefaultUnit => Lumen; + + public LuminousFlux(double baseValue = 0.0) + { + this = default(LuminousFlux); + BaseValue = baseValue; + } + + public bool Equals(LuminousFlux other) + { + return BaseValue == other.BaseValue; + } + + public int CompareTo(LuminousFlux other) + { + return BaseValue.CompareTo(other.BaseValue); + } + + public string[] GetShortBaseNames() + { + return new string[] { "lm", "lumen" }; + } + + public string[] GetLongBaseNames() + { + return new string[] { "lumens" }; + } + + public IUnit[] GetCommonSIUnits() + { + return new IUnit[] + { + Lumen // Include lumens as a common unit for luminous flux + }; + } + + public IUnit[] GetExcludedSIUnits() + { + return new IUnit[] + { + SI.Deca, + SI.Hecto, + SI.Milli, + SI.Centi, + SI.Deci, + SI.Yocto, + SI.Zepto, + SI.Atto, + SI.Femto, + SI.Pico, + SI.Nano, + SI.Micro, + SI.Yotta, + SI.Zetta, + SI.Exa, + SI.Peta, + SI.Tera, + SI.Giga, + SI.Mega, + SI.Kilo, + Byte, + }; + } + + public LuminousFlux New(double baseVal) + { + return new LuminousFlux(baseVal); + } + + public LuminousFlux Add(LuminousFlux q) + { + return new LuminousFlux(BaseValue + q.BaseValue); + } + + public LuminousFlux Subtract(LuminousFlux q) + { + return new LuminousFlux(BaseValue - q.BaseValue); + } + + public LuminousFlux Multiply(double n) + { + return new LuminousFlux(BaseValue * n); + } + + public LuminousFlux Multiply(LuminousFlux a, Ratio r) + { + return a * r.BaseValue; + } + + public LuminousFlux Multiply(Ratio r, LuminousFlux a) + { + return a * r.BaseValue; + } + + public LuminousFlux Divide(double n) + { + return new LuminousFlux(BaseValue / n); + } + + public Ratio Divide(LuminousFlux q) + { + return new Ratio(BaseValue / q.BaseValue); + } + + public static LuminousFlux Parse(string str, Unit defaultUnit = null) + { + return Unit.Parse(str, defaultUnit); + } + + public static bool TryParse(string str, out LuminousFlux q, Unit defaultUnit = null) + { + return Unit.TryParse(str, out q, defaultUnit); + } + + public static LuminousFlux operator +(LuminousFlux a, LuminousFlux b) + { + return a.Add(b); + } + + public static LuminousFlux operator -(LuminousFlux a, LuminousFlux b) + { + return a.Subtract(b); + } + + public static LuminousFlux operator *(LuminousFlux a, double n) + { + return a.Multiply(n); + } + + public static LuminousFlux operator /(LuminousFlux a, double n) + { + return a.Divide(n); + } + + public static Ratio operator /(LuminousFlux a, LuminousFlux b) + { + return a.Divide(b); + } + + public static LuminousFlux operator -(LuminousFlux a) + { + return a.Multiply(-1.0); + } + + public override string ToString() + { + return this.FormatAuto(); + } + } +} From c3358a231d60462831c0205516cb7e61f9bb8b2e Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 11:48:51 +0100 Subject: [PATCH 16/54] IntracranialPressure(mmHg) IF YOUR USING THIS VALUE YOUR A MEDICAL STUDENT OR WEIRD - Linka. --- NEOSPlus/Quantity/IntracranialPressure.cs | 196 ++++++++++++++++++++++ NEOSPlus/Quantity/Lumens.cs | 3 +- NEOSPlus/Quantity/Ohms.cs | 1 + NEOSPlus/Quantity/Pressure.cs | 1 + 4 files changed, 200 insertions(+), 1 deletion(-) create mode 100644 NEOSPlus/Quantity/IntracranialPressure.cs diff --git a/NEOSPlus/Quantity/IntracranialPressure.cs b/NEOSPlus/Quantity/IntracranialPressure.cs new file mode 100644 index 0000000..6fe5ad5 --- /dev/null +++ b/NEOSPlus/Quantity/IntracranialPressure.cs @@ -0,0 +1,196 @@ +using QuantityX; +using System; +//IF YOUR USING THIS VALUE YOUR A MEDICAL STUDENT OR WEIRD - Linka. +namespace NEOSPlus.Quantity +{ + public readonly struct IntracranialPressure : IQuantitySI, IQuantitySI, IQuantity, IQuantity, IComparable, IEquatable + { + public readonly double BaseValue; + + // Define the unit for Intracranial Pressure (ICP) as millimeters of mercury (mmHg) + public static readonly Unit MillimetersOfMercury = new UnitSI(1, "mmHg", "millimeters of mercury"); + + // Define the unit for ICP in kilopascals (kPa) + public static readonly Unit Kilopascals = new UnitSI(0.133322, "kPa", "kilopascals"); + + // Define the unit for ICP in pounds per square inch (psi) + public static readonly Unit PoundsPerSquareInch = new UnitSI(0.0193368, "psi", "pounds per square inch"); + + // Define the unit for ICP in centimeters of water (cmH2O) + public static readonly Unit CentimetersOfWater = new UnitSI(13.5951, "cmH2O", "centimeters of water"); + + double IQuantity.BaseValue => BaseValue; + + public double SIPower => 1.0; + + // Default unit for Intracranial Pressure + public Unit DefaultUnit => MillimetersOfMercury; + + public IntracranialPressure(double baseValue = 0.0) + { + this = default(IntracranialPressure); + BaseValue = baseValue; + } + + public bool Equals(IntracranialPressure other) + { + return BaseValue == other.BaseValue; + } + + public int CompareTo(IntracranialPressure other) + { + return BaseValue.CompareTo(other.BaseValue); + } + + public string[] GetShortBaseNames() + { + return new string[] { "mmHg", "kPa", "psi", "cmH2O" }; + } + + public string[] GetLongBaseNames() + { + return new string[] { "millimeters of mercury", "kilopascals", "pounds per square inch", "centimeters of water" }; + } + + public IUnit[] GetCommonSIUnits() + { + return new IUnit[] + { + SI.MillimetersOfMercury, // Include mmHg as a common unit for ICP + SI.Kilopascals, + SI.PoundsPerSquareInch, + SI.CentimetersOfWater + }; + } + + public IUnit[] GetExcludedSIUnits() + { + return new IUnit[] + { + SI.Lumen + SI.Deca, + SI.Hecto, + SI.Milli, + SI.Centi, + SI.Deci, + SI.Yocto, + SI.Zepto, + SI.Atto, + SI.Femto, + SI.Pico, + SI.Nano, + SI.Micro, + SI.Yotta, + SI.Zetta, + SI.Exa, + SI.Peta, + SI.Tera, + SI.Giga, + SI.Mega, + SI.Kilo, + Byte, }; + } + + public IntracranialPressure New(double baseVal) + { + return new IntracranialPressure(baseVal); + } + + public IntracranialPressure Add(IntracranialPressure q) + { + return new IntracranialPressure(BaseValue + q.BaseValue); + } + + public IntracranialPressure Subtract(IntracranialPressure q) + { + return new IntracranialPressure(BaseValue - q.BaseValue); + } + + public IntracranialPressure Multiply(double n) + { + return new IntracranialPressure(BaseValue * n); + } + + public IntracranialPressure Multiply(IntracranialPressure a, Ratio r) + { + return a * r.BaseValue; + } + + public IntracranialPressure Multiply(Ratio r, IntracranialPressure a) + { + return a * r.BaseValue; + } + + public IntracranialPressure Divide(double n) + { + return new IntracranialPressure(BaseValue / n); + } + + public Ratio Divide(IntracranialPressure q) + { + return new Ratio(BaseValue / q.BaseValue); + } + + public static IntracranialPressure Parse(string str, Unit defaultUnit = null) + { + return Unit.Parse(str, defaultUnit); + } + + public static bool TryParse(string str, out IntracranialPressure q, Unit defaultUnit = null) + { + return Unit.TryParse(str, out q, defaultUnit); + } + + public static IntracranialPressure operator +(IntracranialPressure a, IntracranialPressure b) + { + return a.Add(b); + } + + public static IntracranialPressure operator -(IntracranialPressure a, IntracranialPressure b) + { + return a.Subtract(b); + } + + public static IntracranialPressure operator *(IntracranialPressure a, double n) + { + return a.Multiply(n); + } + + public static IntracranialPressure operator /(IntracranialPressure a, double n) + { + return a.Divide(n); + } + + public static Ratio operator /(IntracranialPressure a, IntracranialPressure b) + { + return a.Divide(b); + } + + public static IntracranialPressure operator -(IntracranialPressure a) + { + return a.Multiply(-1.0); + } + + public override string ToString() + { + return this.FormatAuto(); + } + + // Conversion methods + public double ToKilopascals() + { + return BaseValue * 0.133322; + } + + public double ToPoundsPerSquareInch() + { + return BaseValue * 0.0193368; + } + + public double ToCentimetersOfWater() + { + return BaseValue * 13.5951; + } + + } +} diff --git a/NEOSPlus/Quantity/Lumens.cs b/NEOSPlus/Quantity/Lumens.cs index ae13faa..20c4735 100644 --- a/NEOSPlus/Quantity/Lumens.cs +++ b/NEOSPlus/Quantity/Lumens.cs @@ -1,4 +1,5 @@ using QuantityX; +using System; namespace NEOSPlus.Quantity { @@ -46,7 +47,7 @@ public IUnit[] GetCommonSIUnits() { return new IUnit[] { - Lumen // Include lumens as a common unit for luminous flux + SI.Lumen }; } diff --git a/NEOSPlus/Quantity/Ohms.cs b/NEOSPlus/Quantity/Ohms.cs index fc806ce..d03e1c9 100644 --- a/NEOSPlus/Quantity/Ohms.cs +++ b/NEOSPlus/Quantity/Ohms.cs @@ -54,6 +54,7 @@ public IUnit[] GetExcludedSIUnits() { return new IUnit[] { + SI.Lumen SI.Pascal, SI.Atmosphere, SI.Deca, diff --git a/NEOSPlus/Quantity/Pressure.cs b/NEOSPlus/Quantity/Pressure.cs index 98fdf87..905e1d6 100644 --- a/NEOSPlus/Quantity/Pressure.cs +++ b/NEOSPlus/Quantity/Pressure.cs @@ -58,6 +58,7 @@ public IUnit[] GetExludedSIUnits() { return new IUnit[] { + SI.Lumen SI.Deca, SI.Hecto, SI.Milli, From e0a8e681cc34fa6935e035f42ceb0d9501fd011d Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 11:53:31 +0100 Subject: [PATCH 17/54] Update Pressure.cs More Pressure --- NEOSPlus/Quantity/Pressure.cs | 73 +++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 33 deletions(-) diff --git a/NEOSPlus/Quantity/Pressure.cs b/NEOSPlus/Quantity/Pressure.cs index 905e1d6..315be48 100644 --- a/NEOSPlus/Quantity/Pressure.cs +++ b/NEOSPlus/Quantity/Pressure.cs @@ -1,5 +1,4 @@ using QuantityX; -using System; namespace NEOSPlus.Quantity { @@ -10,6 +9,10 @@ namespace NEOSPlus.Quantity // Define pressure units public static readonly Unit Pascal = new UnitSI(1, "Pa", "pascal"); public static readonly Unit Atmosphere = new Unit(101325, "atm", "atmosphere"); + public static readonly Unit Bar = new UnitSI(100000, "bar", "bar"); + public static readonly Unit Millibar = new UnitSI(100, "mbar", "millibar"); + public static readonly Unit Microbar = new UnitSI(0.1, "µbar", "microbar"); + public static readonly Unit Nanobar = new UnitSI(0.0001, "nbar", "nanobar"); double IQuantity.BaseValue => BaseValue; @@ -36,12 +39,12 @@ public int CompareTo(Data other) public string[] GetShortBaseNames() { - return new string[] { "Pa", "atm" }; + return new string[] { "Pa", "atm", "bar", "mbar", "µbar", "nbar" }; } public string[] GetLongBaseNames() { - return new string[] { "pascals", "atmospheres" }; + return new string[] { "pascals", "atmospheres", "bars", "millibars", "microbars", "nanobars" }; } public IUnit[] GetCommonSIUnits() @@ -49,39 +52,43 @@ public IUnit[] GetCommonSIUnits() return new IUnit[] { SI.Pascal, - SI.Atmosphere, //do i need si data on these? + SI.Atmosphere, + SI.Bar, + SI.Millibar, + SI.Microbar, + SI.Nanobar, + }; + } + + public IUnit[] GetExcludedSIUnits() + { + return new IUnit[] + { + SI.Lumen, + SI.Deca, + SI.Hecto, + SI.Milli, + SI.Centi, + SI.Deci, + SI.Yocto, + SI.Zepto, + SI.Atto, + SI.Femto, + SI.Pico, + SI.Nano, + SI.Micro, + SI.Yotta, + SI.Zetta, + SI.Exa, + SI.Peta, + SI.Tera, + SI.Giga, + SI.Mega, + SI.Kilo, + Byte, }; } - - public IUnit[] GetExludedSIUnits() - { - return new IUnit[] - { - SI.Lumen - SI.Deca, - SI.Hecto, - SI.Milli, - SI.Centi, - SI.Deci, - SI.Yocto, - SI.Zepto, - SI.Atto, - SI.Femto, - SI.Pico, - SI.Nano, - SI.Micro, - SI.Yotta, - SI.Zetta, - SI.Exa, - SI.Peta, - SI.Tera, - SI.Giga, - SI.Mega, - SI.Kilo, - Byte, - }; - } public Data New(double baseVal) { return new Data(baseVal); From 7576806847c148ee718a31e7a955faad1c105834 Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 12:24:32 +0100 Subject: [PATCH 18/54] new stuff (Pacal, Bar) --- NEOSPlus/Quantity/Bar.cs | 177 +++++++++++++++++++ NEOSPlus/Quantity/{Pressure.cs => Pascal.cs} | 32 ++-- 2 files changed, 191 insertions(+), 18 deletions(-) create mode 100644 NEOSPlus/Quantity/Bar.cs rename NEOSPlus/Quantity/{Pressure.cs => Pascal.cs} (78%) diff --git a/NEOSPlus/Quantity/Bar.cs b/NEOSPlus/Quantity/Bar.cs new file mode 100644 index 0000000..1bc78ca --- /dev/null +++ b/NEOSPlus/Quantity/Bar.cs @@ -0,0 +1,177 @@ +using QuantityX; + +namespace NEOSPlus.Quantity +{ + public readonly struct Bar : IQuantitySI, IQuantitySI, IQuantity, IQuantity, IComparable, IEquatable + { + public readonly double BaseValue; + + // Define pressure units for Bar + public static readonly Unit Bar = new UnitSI(1, "bar", "bar"); + public static readonly Unit Millibar = new UnitSI(0.001, "mbar", "millibar"); + public static readonly Unit Microbar = new UnitSI(0.000001, "µbar", "microbar"); + public static readonly Unit Nanobar = new UnitSI(0.000000001, "nbar", "nanobar"); + + double IQuantity.BaseValue => BaseValue; + + public double SIPower => 1.0; + + // Default unit for Bar + public Unit DefaultUnit => Bar; + + public Bar(double baseValue = 0.0) + { + this = default(Bar); + BaseValue = baseValue; + } + + public bool Equals(Bar other) + { + return BaseValue == other.BaseValue; + } + + public int CompareTo(Bar other) + { + return BaseValue.CompareTo(other.BaseValue); + } + + public string[] GetShortBaseNames() + { + return new string[] { "bar", "mbar", "µbar", "nbar" }; + } + + public string[] GetLongBaseNames() + { + return new string[] { "bars", "millibars", "microbars", "nanobars" }; + } + + public IUnit[] GetCommonSIUnits() + { + return new IUnit[] + { + SI.Bar, + SI.Millibar, + SI.Microbar, + SI.Nanobar, + }; + } + + public IUnit[] GetExcludedSIUnits() + { + return new IUnit[] + { + SI.MillimetersOfMercury, + SI.Kilopascals, + SI.PoundsPerSquareInch, + SI.CentimetersOfWater + SI.Lumen + SI.Deca, + SI.Hecto, + SI.Milli, + SI.Centi, + SI.Deci, + SI.Yocto, + SI.Zepto, + SI.Atto, + SI.Femto, + SI.Pico, + SI.Nano, + SI.Micro, + SI.Yotta, + SI.Zetta, + SI.Exa, + SI.Peta, + SI.Tera, + SI.Giga, + SI.Mega, + SI.Kilo, + Byte, + }; + } + + public Bar New(double baseVal) + { + return new Bar(baseVal); + } + + public Bar Add(Bar q) + { + return new Bar(BaseValue + q.BaseValue); + } + + public Bar Subtract(Bar q) + { + return new Bar(BaseValue - q.BaseValue); + } + + public Bar Multiply(double n) + { + return new Bar(BaseValue * n); + } + + public Bar Multiply(Bar a, Ratio r) + { + return a * r.BaseValue; + } + + public Bar Multiply(Ratio r, Bar a) + { + return a * r.BaseValue; + } + + public Bar Divide(double n) + { + return new Bar(BaseValue / n); + } + + public Ratio Divide(Bar q) + { + return new Ratio(BaseValue / q.BaseValue); + } + + public static Bar Parse(string str, Unit defaultUnit = null) + { + return Unit.Parse(str, defaultUnit); + } + + public static bool TryParse(string str, out Bar q, Unit defaultUnit = null) + { + return Unit.TryParse(str, out q, defaultUnit); + } + + public static Bar operator +(Bar a, Bar b) + { + return a.Add(b); + } + + public static Bar operator -(Bar a, Bar b) + { + return a.Subtract(b); + } + + public static Bar operator *(Bar a, double n) + { + return a.Multiply(n); + } + + public static Bar operator /(Bar a, double n) + { + return a.Divide(n); + } + + public static Ratio operator /(Bar a, Bar b) + { + return a.Divide(b); + } + + public static Bar operator -(Bar a) + { + return a.Multiply(-1.0); + } + + public override string ToString() + { + return this.FormatAuto(); + } + } +} diff --git a/NEOSPlus/Quantity/Pressure.cs b/NEOSPlus/Quantity/Pascal.cs similarity index 78% rename from NEOSPlus/Quantity/Pressure.cs rename to NEOSPlus/Quantity/Pascal.cs index 315be48..c68161b 100644 --- a/NEOSPlus/Quantity/Pressure.cs +++ b/NEOSPlus/Quantity/Pascal.cs @@ -8,11 +8,10 @@ namespace NEOSPlus.Quantity // Define pressure units public static readonly Unit Pascal = new UnitSI(1, "Pa", "pascal"); - public static readonly Unit Atmosphere = new Unit(101325, "atm", "atmosphere"); - public static readonly Unit Bar = new UnitSI(100000, "bar", "bar"); - public static readonly Unit Millibar = new UnitSI(100, "mbar", "millibar"); - public static readonly Unit Microbar = new UnitSI(0.1, "µbar", "microbar"); - public static readonly Unit Nanobar = new UnitSI(0.0001, "nbar", "nanobar"); + public static readonly Unit Hectopascal = new UnitSI(100, "hPa", "hectopascal"); + public static readonly Unit Kilopascal = new UnitSI(1000, "kPa", "kilopascal"); + public static readonly Unit Megapascal = new UnitSI(1000000, "MPa", "megapascal"); + public static readonly Unit Gigapascal = new UnitSI(1000000000, "GPa", "gigapascal"); double IQuantity.BaseValue => BaseValue; @@ -39,12 +38,12 @@ public int CompareTo(Data other) public string[] GetShortBaseNames() { - return new string[] { "Pa", "atm", "bar", "mbar", "µbar", "nbar" }; + return new string[] { "Pa", "hPa", "kPa", "MPa", "GPa" }; } public string[] GetLongBaseNames() { - return new string[] { "pascals", "atmospheres", "bars", "millibars", "microbars", "nanobars" }; + return new string[] { "pascals", "hectopascals", "kilopascals", "megapascals", "gigapascals" }; } public IUnit[] GetCommonSIUnits() @@ -52,11 +51,10 @@ public IUnit[] GetCommonSIUnits() return new IUnit[] { SI.Pascal, - SI.Atmosphere, - SI.Bar, - SI.Millibar, - SI.Microbar, - SI.Nanobar, + SI.Hectopascal, + SI.Kilopascal, + SI.Megapascal, + SI.Gigapascal, }; } @@ -65,10 +63,11 @@ public IUnit[] GetExcludedSIUnits() return new IUnit[] { SI.Lumen, + SI.Bar, + SI.Millibar, + SI.Microbar, + SI.Nanobar, SI.Deca, - SI.Hecto, - SI.Milli, - SI.Centi, SI.Deci, SI.Yocto, SI.Zepto, @@ -82,10 +81,7 @@ public IUnit[] GetExcludedSIUnits() SI.Exa, SI.Peta, SI.Tera, - SI.Giga, SI.Mega, - SI.Kilo, - Byte, }; } From 249f127c16a2f156e916c3700f2c072b17b5d090 Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 12:51:11 +0100 Subject: [PATCH 19/54] Update QuantityInjector.cs Rejig --- NEOSPlus/Quantity/QuantityInjector.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/NEOSPlus/Quantity/QuantityInjector.cs b/NEOSPlus/Quantity/QuantityInjector.cs index a4d767e..4f8dcd8 100644 --- a/NEOSPlus/Quantity/QuantityInjector.cs +++ b/NEOSPlus/Quantity/QuantityInjector.cs @@ -18,12 +18,22 @@ internal static void Inject() var quantities = typeof(FrooxEngine.GenericTypes).GetField("quantities", BindingFlags.Static | BindingFlags.NonPublic); - // Append the 'Data' type to the existing array of types - var newArray = (quantities.GetValue(null) as Type[]).Append(typeof(Data)).ToArray(); + // Get all types in the 'NEOSPlus.Quantity' namespace that are value types + var quantityTypes = typeof(QuantityInjector).Assembly.GetTypes() + .Where(type => type.Namespace == "NEOSPlus.Quantity" && type.IsValueType); + + // Append all quantity types to the existing array of types + var newArray = (quantities.GetValue(null) as Type[]).Concat(quantityTypes).ToArray(); // Set the modified array back to the 'quantities' field quantities.SetValue(null, newArray); + // Log the injected types + foreach (var type in quantityTypes) + { + Unilog.Log($"Injected quantity type: {type.FullName}"); + } + // Update the quantity cache UpdateQuantityCache(); } From 0de3f58c0eb19d2681c3da943e53d6f7d2fbe9a7 Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 13:12:52 +0100 Subject: [PATCH 20/54] Debug For copy to plugin removed ohms --- NEOSPlus/NEOSPlus.csproj | 2 +- NEOSPlus/Quantity/Ohms.cs | 169 -------------------------------------- 2 files changed, 1 insertion(+), 170 deletions(-) delete mode 100644 NEOSPlus/Quantity/Ohms.cs diff --git a/NEOSPlus/NEOSPlus.csproj b/NEOSPlus/NEOSPlus.csproj index a4432b0..f4e29d6 100644 --- a/NEOSPlus/NEOSPlus.csproj +++ b/NEOSPlus/NEOSPlus.csproj @@ -18,7 +18,7 @@ E:\SteamLibrary/steamapps/common/NeosVR/ - copy "$(TargetPath)" "$(NeosPath)\Libraries" + echo Copying "$(TargetPath)" to "$(NeosPath)\Libraries" cd "$(ProjectDir)" diff --git a/NEOSPlus/Quantity/Ohms.cs b/NEOSPlus/Quantity/Ohms.cs deleted file mode 100644 index d03e1c9..0000000 --- a/NEOSPlus/Quantity/Ohms.cs +++ /dev/null @@ -1,169 +0,0 @@ -using QuantityX; - -namespace NEOSPlus.Quantity -{ - public readonly struct Resistance : IQuantitySI, IQuantitySI, IQuantity, IQuantity, IComparable, IEquatable - { - public readonly double BaseValue; - - // Define resistance units (ohms) - public static readonly Unit Ohm = new UnitSI(1, "Ω", "ohm"); - - double IQuantity.BaseValue => BaseValue; - - public double SIPower => 1.0; - - // Default unit for resistance - public Unit DefaultUnit => Ohm; - - public Resistance(double baseValue = 0.0) - { - this = default(Resistance); - BaseValue = baseValue; - } - - public bool Equals(Resistance other) - { - return BaseValue == other.BaseValue; - } - - public int CompareTo(Resistance other) - { - return BaseValue.CompareTo(other.BaseValue); - } - - public string[] GetShortBaseNames() - { - return new string[] { "Ω", "ohm" }; - } - - public string[] GetLongBaseNames() - { - return new string[] { "ohms" }; - } - - public IUnit[] GetCommonSIUnits() - { - return new IUnit[] - { - SI.Ohm - }; - } - - public IUnit[] GetExcludedSIUnits() - { - return new IUnit[] - { - SI.Lumen - SI.Pascal, - SI.Atmosphere, - SI.Deca, - SI.Hecto, - SI.Milli, - SI.Centi, - SI.Deci, - SI.Yocto, - SI.Zepto, - SI.Atto, - SI.Femto, - SI.Pico, - SI.Nano, - SI.Micro, - SI.Yotta, - SI.Zetta, - SI.Exa, - SI.Peta, - SI.Tera, - SI.Giga, - SI.Mega, - SI.Kilo, - Byte, - }; - } - - public Resistance New(double baseVal) - { - return new Resistance(baseVal); - } - - public Resistance Add(Resistance q) - { - return new Resistance(BaseValue + q.BaseValue); - } - - public Resistance Subtract(Resistance q) - { - return new Resistance(BaseValue - q.BaseValue); - } - - public Resistance Multiply(double n) - { - return new Resistance(BaseValue * n); - } - - public Resistance Multiply(Resistance a, Ratio r) - { - return a * r.BaseValue; - } - - public Resistance Multiply(Ratio r, Resistance a) - { - return a * r.BaseValue; - } - - public Resistance Divide(double n) - { - return new Resistance(BaseValue / n); - } - - public Ratio Divide(Resistance q) - { - return new Ratio(BaseValue / q.BaseValue); - } - - public static Resistance Parse(string str, Unit defaultUnit = null) - { - return Unit.Parse(str, defaultUnit); - } - - public static bool TryParse(string str, out Resistance q, Unit defaultUnit = null) - { - return Unit.TryParse(str, out q, defaultUnit); - } - - public static Resistance operator +(Resistance a, Resistance b) - { - return a.Add(b); - } - - public static Resistance operator -(Resistance a, Resistance b) - { - return a.Subtract(b); - } - - public static Resistance operator *(Resistance a, double n) - { - return a.Multiply(n); - } - - public static Resistance operator /(Resistance a, double n) - { - return a.Divide(n); - } - - public static Ratio operator /(Resistance a, Resistance b) - { - return a.Divide(b); - } - - public static Resistance operator -(Resistance a) - { - return a.Multiply(-1.0); - } - - public override string ToString() - { - return this.FormatAuto(); - } - } -} From cb7302eaea11287bce0c66ab772dc66c9ba75ce5 Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 13:41:37 +0100 Subject: [PATCH 21/54] Create ParralaxOcclusion.shader --- NEOSPlus/Shaders/ParralaxOcclusion.shader | 1 + 1 file changed, 1 insertion(+) create mode 100644 NEOSPlus/Shaders/ParralaxOcclusion.shader diff --git a/NEOSPlus/Shaders/ParralaxOcclusion.shader b/NEOSPlus/Shaders/ParralaxOcclusion.shader new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/NEOSPlus/Shaders/ParralaxOcclusion.shader @@ -0,0 +1 @@ + From dbd378341940448faae7ed2eb55af85c8c79c692 Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 13:41:56 +0100 Subject: [PATCH 22/54] Update ParralaxOcclusion.shader --- NEOSPlus/Shaders/ParralaxOcclusion.shader | 151 ++++++++++++++++++++++ 1 file changed, 151 insertions(+) diff --git a/NEOSPlus/Shaders/ParralaxOcclusion.shader b/NEOSPlus/Shaders/ParralaxOcclusion.shader index 8b13789..9c5cbf4 100644 --- a/NEOSPlus/Shaders/ParralaxOcclusion.shader +++ b/NEOSPlus/Shaders/ParralaxOcclusion.shader @@ -1 +1,152 @@ +Shader "Custom/ParallaxOcclusion" { + Properties{ + _Color("Color", Color) = (1,0,1,1) + _MainTex("Albedo (RGB)", 2D) = "white" {} + _TextureScale("Texture Scale", Float) = 1 + _BumpMap("Normal map (RGB)", 2D) = "bump" {} + _BumpScale("Bump scale", Range(0,1)) = 1 + _ParallaxMap("Height map (R)", 2D) = "white" {} + _Parallax("Height scale", Range(0,1)) = 0.05 + _Glossiness("Smoothness", Range(0,1)) = 0.5 + _Metallic("Metallic", Range(0,1)) = 0.0 + _ParallaxMinSamples("Parallax min samples", Range(2,100)) = 4 + _ParallaxMaxSamples("Parallax max samples", Range(2,100)) = 20 + } + SubShader{ + Tags { "RenderType" = "Opaque" } + LOD 200 + CGPROGRAM + #pragma surface surf Standard fullforwardshadows vertex:vert + #pragma target 3.0 + + sampler2D _MainTex; + sampler2D _BumpMap; + sampler2D _ParallaxMap; + + struct Input { + float2 texcoord; + float3 eye; + float sampleRatio; + }; + + half _Glossiness; + half _Metallic; + half _BumpScale; + half _Parallax; + fixed4 _Color; + uint _ParallaxMinSamples; + uint _ParallaxMaxSamples; + float _TextureScale; + + void parallax_vert( + float4 vertex, + float3 normal, + float4 tangent, + out float3 eye, + out float sampleRatio + ) { + float4x4 mW = unity_ObjectToWorld; + float3 binormal = cross( normal, tangent.xyz ) * tangent.w; + float3 EyePosition = _WorldSpaceCameraPos; + + // Need to do it this way for W-normalisation and.. stuff. + float4 localCameraPos = mul(unity_WorldToObject, float4(_WorldSpaceCameraPos, 1)); + float3 eyeLocal = vertex - localCameraPos; + float4 eyeGlobal = mul( float4(eyeLocal, 1), mW ); + float3 E = eyeGlobal.xyz; + + float3x3 tangentToWorldSpace; + + tangentToWorldSpace[0] = mul( normalize( tangent ), mW ); + tangentToWorldSpace[1] = mul( normalize( binormal ), mW ); + tangentToWorldSpace[2] = mul( normalize( normal ), mW ); + + float3x3 worldToTangentSpace = transpose(tangentToWorldSpace); + + eye = mul( E, worldToTangentSpace ); + sampleRatio = 1-dot( normalize(E), -normal ); + } + + float2 parallax_offset ( + float fHeightMapScale, + float3 eye, + float sampleRatio, + float2 texcoord, + sampler2D heightMap, + int nMinSamples, + int nMaxSamples + ) { + + float fParallaxLimit = -length( eye.xy ) / eye.z; + fParallaxLimit *= fHeightMapScale; + + float2 vOffsetDir = normalize( eye.xy ); + float2 vMaxOffset = vOffsetDir * fParallaxLimit; + + int nNumSamples = (int)lerp( nMinSamples, nMaxSamples, saturate(sampleRatio) ); + + float fStepSize = 1.0 / (float)nNumSamples; + + float2 dx = ddx( texcoord ); + float2 dy = ddy( texcoord ); + + float fCurrRayHeight = 1.0; + float2 vCurrOffset = float2( 0, 0 ); + float2 vLastOffset = float2( 0, 0 ); + + float fLastSampledHeight = 1; + float fCurrSampledHeight = 1; + + int nCurrSample = 0; + + while ( nCurrSample < nNumSamples ) + { + fCurrSampledHeight = tex2Dgrad(heightMap, texcoord + vCurrOffset, dx, dy ).r; + if ( fCurrSampledHeight > fCurrRayHeight ) + { + float delta1 = fCurrSampledHeight - fCurrRayHeight; + float delta2 = ( fCurrRayHeight + fStepSize ) - fLastSampledHeight; + + float ratio = delta1/(delta1+delta2); + + vCurrOffset = (ratio) * vLastOffset + (1.0-ratio) * vCurrOffset; + + nCurrSample = nNumSamples + 1; + } + else + { + nCurrSample++; + + fCurrRayHeight -= fStepSize; + + vLastOffset = vCurrOffset; + vCurrOffset += fStepSize * vMaxOffset; + + fLastSampledHeight = fCurrSampledHeight; + } + } + + return vCurrOffset; + } + + void vert(inout appdata_full IN, out Input OUT) { + parallax_vert(IN.vertex, IN.normal, IN.tangent, OUT.eye, OUT.sampleRatio); + OUT.texcoord = IN.texcoord; + } + + void surf(Input IN, inout SurfaceOutputStandard o) { + float2 offset = parallax_offset(_Parallax, IN.eye, IN.sampleRatio, IN.texcoord * _TextureScale, + _ParallaxMap, _ParallaxMinSamples, _ParallaxMaxSamples); + float2 uv = IN.texcoord * _TextureScale + offset; + fixed4 c = tex2D(_MainTex, uv) * _Color; + o.Albedo = c.rgb; + o.Normal = UnpackScaleNormal(tex2D(_BumpMap, uv), _BumpScale); + o.Metallic = _Metallic; + o.Smoothness = _Glossiness; + o.Alpha = c.a; + } + ENDCG + } + FallBack "Diffuse" +} From d9c2dc2252b7127dd023e59784dcfac0fe30f5d5 Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 13:50:22 +0100 Subject: [PATCH 23/54] Create ParralaxAlphav1.shader --- NEOSPlus/Shaders/ParralaxAlphav1.shader | 155 ++++++++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 NEOSPlus/Shaders/ParralaxAlphav1.shader diff --git a/NEOSPlus/Shaders/ParralaxAlphav1.shader b/NEOSPlus/Shaders/ParralaxAlphav1.shader new file mode 100644 index 0000000..18011f8 --- /dev/null +++ b/NEOSPlus/Shaders/ParralaxAlphav1.shader @@ -0,0 +1,155 @@ +Shader "Custom/ParallaxOcclusionAlphaCutout" { + Properties{ + _Color("Color", Color) = (1,0,1,1) + _MainTex("Albedo (RGB)", 2D) = "white" {} + _TextureScale("Texture Scale", Float) = 1 + _BumpMap("Normal map (RGB)", 2D) = "bump" {} + _BumpScale("Bump scale", Range(0,1)) = 1 + _ParallaxMap("Height map (R)", 2D) = "white" {} + _Parallax("Height scale", Range(0,1)) = 0.05 + _Glossiness("Smoothness", Range(0,1)) = 0.5 + _Metallic("Metallic", Range(0,1)) = 0.0 + _ParallaxMinSamples("Parallax min samples", Range(2,100)) = 4 + _ParallaxMaxSamples("Parallax max samples", Range(2,100)) = 20 + _AlphaCutoff("Alpha Cutoff", Range(0,1)) = 0.5 + } + SubShader{ + Tags { "RenderType" = "Opaque" } + LOD 200 + + CGPROGRAM + #pragma surface surf Lambert + + sampler2D _MainTex; + sampler2D _BumpMap; + sampler2D _ParallaxMap; + + struct Input { + float2 texcoord; + float3 eye; + float sampleRatio; + }; + + half _Glossiness; + half _Metallic; + half _BumpScale; + half _Parallax; + fixed4 _Color; + uint _ParallaxMinSamples; + uint _ParallaxMaxSamples; + float _TextureScale; + float _AlphaCutoff; + + void parallax_vert( + float4 vertex, + float3 normal, + float4 tangent, + out float3 eye, + out float sampleRatio + ) { + float4x4 mW = unity_ObjectToWorld; + float3 binormal = cross( normal, tangent.xyz ) * tangent.w; + float3 EyePosition = _WorldSpaceCameraPos; + + float4 localCameraPos = mul(unity_WorldToObject, float4(_WorldSpaceCameraPos, 1)); + float3 eyeLocal = vertex - localCameraPos; + float4 eyeGlobal = mul( float4(eyeLocal, 1), mW ); + float3 E = eyeGlobal.xyz; + + float3x3 tangentToWorldSpace; + + tangentToWorldSpace[0] = mul( normalize( tangent ), mW ); + tangentToWorldSpace[1] = mul( normalize( binormal ), mW ); + tangentToWorldSpace[2] = mul( normalize( normal ), mW ); + + float3x3 worldToTangentSpace = transpose(tangentToWorldSpace); + + eye = mul( E, worldToTangentSpace ); + sampleRatio = 1-dot( normalize(E), -normal ); + } + + float2 parallax_offset ( + float fHeightMapScale, + float3 eye, + float sampleRatio, + float2 texcoord, + sampler2D heightMap, + int nMinSamples, + int nMaxSamples + ) { + float fParallaxLimit = -length( eye.xy ) / eye.z; + fParallaxLimit *= fHeightMapScale; + + float2 vOffsetDir = normalize( eye.xy ); + float2 vMaxOffset = vOffsetDir * fParallaxLimit; + + int nNumSamples = (int)lerp( nMinSamples, nMaxSamples, saturate(sampleRatio) ); + + float fStepSize = 1.0 / (float)nNumSamples; + + float2 dx = ddx( texcoord ); + float2 dy = ddy( texcoord ); + + float fCurrRayHeight = 1.0; + float2 vCurrOffset = float2( 0, 0 ); + float2 vLastOffset = float2( 0, 0 ); + + float fLastSampledHeight = 1; + float fCurrSampledHeight = 1; + + int nCurrSample = 0; + + while ( nCurrSample < nNumSamples ) + { + fCurrSampledHeight = tex2Dgrad(heightMap, texcoord + vCurrOffset, dx, dy ).r; + if ( fCurrSampledHeight > fCurrRayHeight ) + { + float delta1 = fCurrSampledHeight - fCurrRayHeight; + float delta2 = ( fCurrRayHeight + fStepSize ) - fLastSampledHeight; + + float ratio = delta1/(delta1+delta2); + + vCurrOffset = (ratio) * vLastOffset + (1.0-ratio) * vCurrOffset; + + nCurrSample = nNumSamples + 1; + } + else + { + nCurrSample++; + + fCurrRayHeight -= fStepSize; + + vLastOffset = vCurrOffset; + vCurrOffset += fStepSize * vMaxOffset; + + fLastSampledHeight = fCurrSampledHeight; + } + } + + return vCurrOffset; + } + + void vert(inout appdata_full IN, out Input OUT) { + parallax_vert(IN.vertex, IN.normal, IN.tangent, OUT.eye, OUT.sampleRatio); + OUT.texcoord = IN.texcoord; + } + + void surf(Input IN, inout SurfaceOutput o) { + float2 offset = parallax_offset(_Parallax, IN.eye, IN.sampleRatio, IN.texcoord * _TextureScale, + _ParallaxMap, _ParallaxMinSamples, _ParallaxMaxSamples); + float2 uv = IN.texcoord * _TextureScale + offset; + fixed4 c = tex2D(_MainTex, uv) * _Color; + + // Apply alpha cutoff + clip(c.a - _AlphaCutoff); + + o.Albedo = c.rgb; + o.Normal = UnpackScaleNormal(tex2D(_BumpMap, uv), _BumpScale); + o.Metallic = _Metallic; + o.Smoothness = _Glossiness; + o.Alpha = c.a; + } + ENDCG + } + FallBack "Diffuse" +} From 9b1740a15f642928d1f42d4465058973c97826f7 Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 14:07:09 +0100 Subject: [PATCH 24/54] Update README.md --- README.md | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) diff --git a/README.md b/README.md index 240f43e..76f429f 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,127 @@ You can also use the Neos Plus Launcher for installation. Download it here: http ## Features A list of features can be found in the [wiki](https://github.com/Xlinka/NeosPlus/wiki/LogiX-Nodes). +## Contributors + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + GitHub Icon + +
+ Xlinka +
+ + GitHub Icon + +
+ Frozenreflex +
+ + GitHub Icon + +
+ dfgHiatus +
+ + GitHub Icon + +
+ Nytra +
+ + GitHub Icon + +
+ LeCloutPanda +
+ + GitHub Icon + +
+ jeanahelver +
+ + GitHub Icon + +
+ art0007i +
+ + GitHub Icon + +
+ Zandario +
+ + GitHub Icon + +
+ DoubleStyx +
+ + GitHub Icon + +
+ ty802 +
+ + GitHub Icon + +
+ Lexevolution +
+ + GitHub Icon + +
+ Psychpsyo +
+ + GitHub Icon + +
+ sirkitree +
+ + GitHub Icon + +
+ JackTheFoxOtter +
+ + GitHub Icon + +
+ rassi0429 +
+ + # 설치방법 중요: 네오스 플러스는 모드가 아닌 플러그인 입니다. 이 두가지는 서로 설치 방법이 다름을 인지하여 주세요. 먼저 Releases 탭에서 NEOSPlus.dll 파일을 다운로드 받아 네오스가 설치된 경로아래에 있는 Libraries 폴더에 넣어주세요. From 9dbc2ab9aecf56ea7ad00edddf6e8c3231a306f3 Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 19:40:05 +0100 Subject: [PATCH 25/54] Update New QuantityX stuff --- NEOSPlus/Quantity/Bar.cs | 177 ------------------- NEOSPlus/Quantity/Data.cs | 1 - NEOSPlus/Quantity/Decibel.cs | 154 +++++++++++++++++ NEOSPlus/Quantity/IntracranialPressure.cs | 196 ---------------------- NEOSPlus/Quantity/Lumens.cs | 67 ++++---- NEOSPlus/Quantity/Pascal.cs | 126 ++++++-------- NEOSPlus/Quantity/QuantityInjector.cs | 2 +- 7 files changed, 237 insertions(+), 486 deletions(-) delete mode 100644 NEOSPlus/Quantity/Bar.cs create mode 100644 NEOSPlus/Quantity/Decibel.cs delete mode 100644 NEOSPlus/Quantity/IntracranialPressure.cs diff --git a/NEOSPlus/Quantity/Bar.cs b/NEOSPlus/Quantity/Bar.cs deleted file mode 100644 index 1bc78ca..0000000 --- a/NEOSPlus/Quantity/Bar.cs +++ /dev/null @@ -1,177 +0,0 @@ -using QuantityX; - -namespace NEOSPlus.Quantity -{ - public readonly struct Bar : IQuantitySI, IQuantitySI, IQuantity, IQuantity, IComparable, IEquatable - { - public readonly double BaseValue; - - // Define pressure units for Bar - public static readonly Unit Bar = new UnitSI(1, "bar", "bar"); - public static readonly Unit Millibar = new UnitSI(0.001, "mbar", "millibar"); - public static readonly Unit Microbar = new UnitSI(0.000001, "µbar", "microbar"); - public static readonly Unit Nanobar = new UnitSI(0.000000001, "nbar", "nanobar"); - - double IQuantity.BaseValue => BaseValue; - - public double SIPower => 1.0; - - // Default unit for Bar - public Unit DefaultUnit => Bar; - - public Bar(double baseValue = 0.0) - { - this = default(Bar); - BaseValue = baseValue; - } - - public bool Equals(Bar other) - { - return BaseValue == other.BaseValue; - } - - public int CompareTo(Bar other) - { - return BaseValue.CompareTo(other.BaseValue); - } - - public string[] GetShortBaseNames() - { - return new string[] { "bar", "mbar", "µbar", "nbar" }; - } - - public string[] GetLongBaseNames() - { - return new string[] { "bars", "millibars", "microbars", "nanobars" }; - } - - public IUnit[] GetCommonSIUnits() - { - return new IUnit[] - { - SI.Bar, - SI.Millibar, - SI.Microbar, - SI.Nanobar, - }; - } - - public IUnit[] GetExcludedSIUnits() - { - return new IUnit[] - { - SI.MillimetersOfMercury, - SI.Kilopascals, - SI.PoundsPerSquareInch, - SI.CentimetersOfWater - SI.Lumen - SI.Deca, - SI.Hecto, - SI.Milli, - SI.Centi, - SI.Deci, - SI.Yocto, - SI.Zepto, - SI.Atto, - SI.Femto, - SI.Pico, - SI.Nano, - SI.Micro, - SI.Yotta, - SI.Zetta, - SI.Exa, - SI.Peta, - SI.Tera, - SI.Giga, - SI.Mega, - SI.Kilo, - Byte, - }; - } - - public Bar New(double baseVal) - { - return new Bar(baseVal); - } - - public Bar Add(Bar q) - { - return new Bar(BaseValue + q.BaseValue); - } - - public Bar Subtract(Bar q) - { - return new Bar(BaseValue - q.BaseValue); - } - - public Bar Multiply(double n) - { - return new Bar(BaseValue * n); - } - - public Bar Multiply(Bar a, Ratio r) - { - return a * r.BaseValue; - } - - public Bar Multiply(Ratio r, Bar a) - { - return a * r.BaseValue; - } - - public Bar Divide(double n) - { - return new Bar(BaseValue / n); - } - - public Ratio Divide(Bar q) - { - return new Ratio(BaseValue / q.BaseValue); - } - - public static Bar Parse(string str, Unit defaultUnit = null) - { - return Unit.Parse(str, defaultUnit); - } - - public static bool TryParse(string str, out Bar q, Unit defaultUnit = null) - { - return Unit.TryParse(str, out q, defaultUnit); - } - - public static Bar operator +(Bar a, Bar b) - { - return a.Add(b); - } - - public static Bar operator -(Bar a, Bar b) - { - return a.Subtract(b); - } - - public static Bar operator *(Bar a, double n) - { - return a.Multiply(n); - } - - public static Bar operator /(Bar a, double n) - { - return a.Divide(n); - } - - public static Ratio operator /(Bar a, Bar b) - { - return a.Divide(b); - } - - public static Bar operator -(Bar a) - { - return a.Multiply(-1.0); - } - - public override string ToString() - { - return this.FormatAuto(); - } - } -} diff --git a/NEOSPlus/Quantity/Data.cs b/NEOSPlus/Quantity/Data.cs index 3f74354..af48e3e 100644 --- a/NEOSPlus/Quantity/Data.cs +++ b/NEOSPlus/Quantity/Data.cs @@ -61,7 +61,6 @@ public IUnit[] GetExludedSIUnits() { return new IUnit[] { - SI.Lumen SI.Deca, SI.Hecto, SI.Milli, diff --git a/NEOSPlus/Quantity/Decibel.cs b/NEOSPlus/Quantity/Decibel.cs new file mode 100644 index 0000000..220f7b4 --- /dev/null +++ b/NEOSPlus/Quantity/Decibel.cs @@ -0,0 +1,154 @@ +using System; +using QuantityX; + +namespace NEOSPlus.Quantity +{ + public readonly struct Decibel : IQuantitySI, IQuantitySI, IQuantity, IQuantity, IComparable, IEquatable + { + public readonly double BaseValue; + + public static readonly Unit dB = new UnitSI(0, "", ""); + + double IQuantity.BaseValue => BaseValue; + + public double SIPower => 1.0; + + public Unit DefaultUnit => dB; + + public Decibel(double baseValue = 0.0) + { + this = default(Decibel); + BaseValue = baseValue; + } + + public bool Equals(Decibel other) + { + return BaseValue == other.BaseValue; + } + + public int CompareTo(Decibel other) + { + return BaseValue.CompareTo(other.BaseValue); + } + + public string[] GetShortBaseNames() + { + return new string[] { "dB" }; + } + + public string[] GetLongBaseNames() + { + return new string[] { "decibels", "decibel" }; + } + + public IUnit[] GetCommonSIUnits() + { + return new IUnit[] + { + dB, + }; + } + + public IUnit[] GetExludedSIUnits() + { + return new IUnit[] + { + SI.Yotta, + SI.Zetta, + SI.Exa, + SI.Peta, + SI.Tera, + SI.Giga, + SI.Mega, + SI.Kilo, + SI.Deca, + SI.Hecto, + SI.Milli, + SI.Centi, + SI.Deci, + SI.Yocto, + SI.Zepto, + SI.Atto, + SI.Femto, + SI.Pico, + SI.Nano, + SI.Micro, + }; + } + + public Decibel New(double baseVal) + { + return new Decibel(baseVal); + } + + public Decibel Add(Decibel q) + { + return new Decibel(BaseValue + q.BaseValue); + } + + public Decibel Subtract(Decibel q) + { + return new Decibel(BaseValue - q.BaseValue); + } + + public Decibel Multiply(double n) + { + return new Decibel(BaseValue * n); + } + + public Decibel Divide(double n) + { + return new Decibel(BaseValue / n); + } + + public Ratio Divide(Decibel q) + { + return new Ratio(BaseValue / q.BaseValue); + } + + public static Decibel Parse(string str, Unit defaultUnit = null) + { + return Unit.Parse(str, defaultUnit); + } + + public static bool TryParse(string str, out Decibel q, Unit defaultUnit = null) + { + return Unit.TryParse(str, out q, defaultUnit); + } + + public static Decibel operator +(Decibel a, Decibel b) + { + return a.Add(b); + } + + public static Decibel operator -(Decibel a, Decibel b) + { + return a.Subtract(b); + } + + public static Decibel operator *(Decibel a, double n) + { + return a.Multiply(n); + } + + public static Decibel operator /(Decibel a, double n) + { + return a.Divide(n); + } + + public static Ratio operator /(Decibel a, Decibel b) + { + return a.Divide(b); + } + + public static Decibel operator -(Decibel a) + { + return a.Multiply(-1.0); + } + + public override string ToString() + { + return this.FormatAuto(); + } + } +} diff --git a/NEOSPlus/Quantity/IntracranialPressure.cs b/NEOSPlus/Quantity/IntracranialPressure.cs deleted file mode 100644 index 6fe5ad5..0000000 --- a/NEOSPlus/Quantity/IntracranialPressure.cs +++ /dev/null @@ -1,196 +0,0 @@ -using QuantityX; -using System; -//IF YOUR USING THIS VALUE YOUR A MEDICAL STUDENT OR WEIRD - Linka. -namespace NEOSPlus.Quantity -{ - public readonly struct IntracranialPressure : IQuantitySI, IQuantitySI, IQuantity, IQuantity, IComparable, IEquatable - { - public readonly double BaseValue; - - // Define the unit for Intracranial Pressure (ICP) as millimeters of mercury (mmHg) - public static readonly Unit MillimetersOfMercury = new UnitSI(1, "mmHg", "millimeters of mercury"); - - // Define the unit for ICP in kilopascals (kPa) - public static readonly Unit Kilopascals = new UnitSI(0.133322, "kPa", "kilopascals"); - - // Define the unit for ICP in pounds per square inch (psi) - public static readonly Unit PoundsPerSquareInch = new UnitSI(0.0193368, "psi", "pounds per square inch"); - - // Define the unit for ICP in centimeters of water (cmH2O) - public static readonly Unit CentimetersOfWater = new UnitSI(13.5951, "cmH2O", "centimeters of water"); - - double IQuantity.BaseValue => BaseValue; - - public double SIPower => 1.0; - - // Default unit for Intracranial Pressure - public Unit DefaultUnit => MillimetersOfMercury; - - public IntracranialPressure(double baseValue = 0.0) - { - this = default(IntracranialPressure); - BaseValue = baseValue; - } - - public bool Equals(IntracranialPressure other) - { - return BaseValue == other.BaseValue; - } - - public int CompareTo(IntracranialPressure other) - { - return BaseValue.CompareTo(other.BaseValue); - } - - public string[] GetShortBaseNames() - { - return new string[] { "mmHg", "kPa", "psi", "cmH2O" }; - } - - public string[] GetLongBaseNames() - { - return new string[] { "millimeters of mercury", "kilopascals", "pounds per square inch", "centimeters of water" }; - } - - public IUnit[] GetCommonSIUnits() - { - return new IUnit[] - { - SI.MillimetersOfMercury, // Include mmHg as a common unit for ICP - SI.Kilopascals, - SI.PoundsPerSquareInch, - SI.CentimetersOfWater - }; - } - - public IUnit[] GetExcludedSIUnits() - { - return new IUnit[] - { - SI.Lumen - SI.Deca, - SI.Hecto, - SI.Milli, - SI.Centi, - SI.Deci, - SI.Yocto, - SI.Zepto, - SI.Atto, - SI.Femto, - SI.Pico, - SI.Nano, - SI.Micro, - SI.Yotta, - SI.Zetta, - SI.Exa, - SI.Peta, - SI.Tera, - SI.Giga, - SI.Mega, - SI.Kilo, - Byte, }; - } - - public IntracranialPressure New(double baseVal) - { - return new IntracranialPressure(baseVal); - } - - public IntracranialPressure Add(IntracranialPressure q) - { - return new IntracranialPressure(BaseValue + q.BaseValue); - } - - public IntracranialPressure Subtract(IntracranialPressure q) - { - return new IntracranialPressure(BaseValue - q.BaseValue); - } - - public IntracranialPressure Multiply(double n) - { - return new IntracranialPressure(BaseValue * n); - } - - public IntracranialPressure Multiply(IntracranialPressure a, Ratio r) - { - return a * r.BaseValue; - } - - public IntracranialPressure Multiply(Ratio r, IntracranialPressure a) - { - return a * r.BaseValue; - } - - public IntracranialPressure Divide(double n) - { - return new IntracranialPressure(BaseValue / n); - } - - public Ratio Divide(IntracranialPressure q) - { - return new Ratio(BaseValue / q.BaseValue); - } - - public static IntracranialPressure Parse(string str, Unit defaultUnit = null) - { - return Unit.Parse(str, defaultUnit); - } - - public static bool TryParse(string str, out IntracranialPressure q, Unit defaultUnit = null) - { - return Unit.TryParse(str, out q, defaultUnit); - } - - public static IntracranialPressure operator +(IntracranialPressure a, IntracranialPressure b) - { - return a.Add(b); - } - - public static IntracranialPressure operator -(IntracranialPressure a, IntracranialPressure b) - { - return a.Subtract(b); - } - - public static IntracranialPressure operator *(IntracranialPressure a, double n) - { - return a.Multiply(n); - } - - public static IntracranialPressure operator /(IntracranialPressure a, double n) - { - return a.Divide(n); - } - - public static Ratio operator /(IntracranialPressure a, IntracranialPressure b) - { - return a.Divide(b); - } - - public static IntracranialPressure operator -(IntracranialPressure a) - { - return a.Multiply(-1.0); - } - - public override string ToString() - { - return this.FormatAuto(); - } - - // Conversion methods - public double ToKilopascals() - { - return BaseValue * 0.133322; - } - - public double ToPoundsPerSquareInch() - { - return BaseValue * 0.0193368; - } - - public double ToCentimetersOfWater() - { - return BaseValue * 13.5951; - } - - } -} diff --git a/NEOSPlus/Quantity/Lumens.cs b/NEOSPlus/Quantity/Lumens.cs index 20c4735..072936c 100644 --- a/NEOSPlus/Quantity/Lumens.cs +++ b/NEOSPlus/Quantity/Lumens.cs @@ -1,5 +1,5 @@ +using System; using QuantityX; -using System; namespace NEOSPlus.Quantity { @@ -7,14 +7,12 @@ namespace NEOSPlus.Quantity { public readonly double BaseValue; - // Define luminous flux unit (lumen) - public static readonly Unit Lumen = new UnitSI(1, "lm", "lumen"); + public static readonly Unit Lumen = new UnitSI(0, "", ""); double IQuantity.BaseValue => BaseValue; public double SIPower => 1.0; - // Default unit for luminous flux public Unit DefaultUnit => Lumen; public LuminousFlux(double baseValue = 0.0) @@ -35,50 +33,51 @@ public int CompareTo(LuminousFlux other) public string[] GetShortBaseNames() { - return new string[] { "lm", "lumen" }; + return new string[] { "lm" }; } public string[] GetLongBaseNames() { - return new string[] { "lumens" }; + return new string[] { "lumens", "lumen" }; } public IUnit[] GetCommonSIUnits() { return new IUnit[] { - SI.Lumen + SI.Mega, + SI.Kilo, + Lumen, + SI.Milli, + SI.Micro }; } - public IUnit[] GetExcludedSIUnits() + + public IUnit[] GetExludedSIUnits() { return new IUnit[] { - SI.Deca, - SI.Hecto, - SI.Milli, - SI.Centi, - SI.Deci, - SI.Yocto, - SI.Zepto, - SI.Atto, - SI.Femto, - SI.Pico, - SI.Nano, - SI.Micro, - SI.Yotta, - SI.Zetta, - SI.Exa, - SI.Peta, - SI.Tera, - SI.Giga, - SI.Mega, - SI.Kilo, - Byte, + SI.Yotta, + SI.Zetta, + SI.Exa, + SI.Peta, + SI.Tera, + SI.Giga, + SI.Deca, + SI.Hecto, + SI.Centi, + SI.Deci, + SI.Nano, + SI.Pico, + SI.Femto, + SI.Atto, + SI.Zepto, + SI.Yocto }; } + public LuminousFlux New(double baseVal) { return new LuminousFlux(baseVal); @@ -99,16 +98,6 @@ public LuminousFlux Multiply(double n) return new LuminousFlux(BaseValue * n); } - public LuminousFlux Multiply(LuminousFlux a, Ratio r) - { - return a * r.BaseValue; - } - - public LuminousFlux Multiply(Ratio r, LuminousFlux a) - { - return a * r.BaseValue; - } - public LuminousFlux Divide(double n) { return new LuminousFlux(BaseValue / n); diff --git a/NEOSPlus/Quantity/Pascal.cs b/NEOSPlus/Quantity/Pascal.cs index c68161b..12649d5 100644 --- a/NEOSPlus/Quantity/Pascal.cs +++ b/NEOSPlus/Quantity/Pascal.cs @@ -1,166 +1,148 @@ +using System; using QuantityX; namespace NEOSPlus.Quantity { - public readonly struct Data : IQuantitySI, IQuantitySI, IQuantity, IQuantity, IComparable, IEquatable + public readonly struct Pressure : IQuantitySI, IQuantitySI, IQuantity, IQuantity, IComparable, IEquatable { public readonly double BaseValue; - // Define pressure units - public static readonly Unit Pascal = new UnitSI(1, "Pa", "pascal"); - public static readonly Unit Hectopascal = new UnitSI(100, "hPa", "hectopascal"); - public static readonly Unit Kilopascal = new UnitSI(1000, "kPa", "kilopascal"); - public static readonly Unit Megapascal = new UnitSI(1000000, "MPa", "megapascal"); - public static readonly Unit Gigapascal = new UnitSI(1000000000, "GPa", "gigapascal"); + public static readonly Unit Pascal = new UnitSI(0, "", ""); + public static readonly Unit Bar = new Unit(1e5, new UnitGroup[1] { UnitGroup.Common }, new string[1] { "bar" }, new string[1] { "bar" }); double IQuantity.BaseValue => BaseValue; public double SIPower => 1.0; - // Default unit for pressure - public Unit DefaultUnit => Pascal; + public Unit DefaultUnit => Pascal; - public Data(double baseValue = 0.0) + public Pressure(double baseValue = 0.0) { - this = default(Data); + this = default(Pressure); BaseValue = baseValue; } - public bool Equals(Data other) + public bool Equals(Pressure other) { return BaseValue == other.BaseValue; } - public int CompareTo(Data other) + public int CompareTo(Pressure other) { return BaseValue.CompareTo(other.BaseValue); } public string[] GetShortBaseNames() { - return new string[] { "Pa", "hPa", "kPa", "MPa", "GPa" }; + return new string[] { "Pa" }; } public string[] GetLongBaseNames() { - return new string[] { "pascals", "hectopascals", "kilopascals", "megapascals", "gigapascals" }; + return new string[] { "pascals", "pascal" }; } public IUnit[] GetCommonSIUnits() { return new IUnit[] { - SI.Pascal, - SI.Hectopascal, - SI.Kilopascal, - SI.Megapascal, - SI.Gigapascal, + SI.Kilo, + SI.Mega, + SI.Giga, + Bar }; } - public IUnit[] GetExcludedSIUnits() + public IUnit[] GetExludedSIUnits() { return new IUnit[] { - SI.Lumen, - SI.Bar, - SI.Millibar, - SI.Microbar, - SI.Nanobar, - SI.Deca, - SI.Deci, - SI.Yocto, - SI.Zepto, - SI.Atto, - SI.Femto, - SI.Pico, - SI.Nano, - SI.Micro, - SI.Yotta, - SI.Zetta, - SI.Exa, - SI.Peta, - SI.Tera, - SI.Mega, + SI.Yotta, + SI.Zetta, + SI.Exa, + SI.Peta, + SI.Tera, + SI.Deca, + SI.Hecto, + SI.Centi, + SI.Deci, + SI.Milli, + SI.Micro, + SI.Nano, + SI.Pico, + SI.Femto, + SI.Atto, + SI.Zepto, + SI.Yocto }; } - public Data New(double baseVal) + public Pressure New(double baseVal) { - return new Data(baseVal); + return new Pressure(baseVal); } - public Data Add(Data q) + public Pressure Add(Pressure q) { - return new Data(BaseValue + q.BaseValue); + return new Pressure(BaseValue + q.BaseValue); } - public Data Subtract(Data q) + public Pressure Subtract(Pressure q) { - return new Data(BaseValue - q.BaseValue); + return new Pressure(BaseValue - q.BaseValue); } - public Data Multiply(double n) + public Pressure Multiply(double n) { - return new Data(BaseValue * n); + return new Pressure(BaseValue * n); } - public Data Multiply(Data a, Ratio r) + public Pressure Divide(double n) { - return a * r.BaseValue; + return new Pressure(BaseValue / n); } - public Data Multiply(Ratio r, Data a) - { - return a * r.BaseValue; - } - - public Data Divide(double n) - { - return new Data(BaseValue / n); - } - - public Ratio Divide(Data q) + public Ratio Divide(Pressure q) { return new Ratio(BaseValue / q.BaseValue); } - public static Data Parse(string str, Unit defaultUnit = null) + public static Pressure Parse(string str, Unit defaultUnit = null) { - return Unit.Parse(str, defaultUnit); + return Unit.Parse(str, defaultUnit); } - public static bool TryParse(string str, out Data q, Unit defaultUnit = null) + public static bool TryParse(string str, out Pressure q, Unit defaultUnit = null) { - return Unit.TryParse(str, out q, defaultUnit); + return Unit.TryParse(str, out q, defaultUnit); } - public static Data operator +(Data a, Data b) + public static Pressure operator +(Pressure a, Pressure b) { return a.Add(b); } - public static Data operator -(Data a, Data b) + public static Pressure operator -(Pressure a, Pressure b) { return a.Subtract(b); } - public static Data operator *(Data a, double n) + public static Pressure operator *(Pressure a, double n) { return a.Multiply(n); } - public static Data operator /(Data a, double n) + public static Pressure operator /(Pressure a, double n) { return a.Divide(n); } - public static Ratio operator /(Data a, Data b) + public static Ratio operator /(Pressure a, Pressure b) { return a.Divide(b); } - public static Data operator -(Data a) + public static Pressure operator -(Pressure a) { return a.Multiply(-1.0); } diff --git a/NEOSPlus/Quantity/QuantityInjector.cs b/NEOSPlus/Quantity/QuantityInjector.cs index 4f8dcd8..967011c 100644 --- a/NEOSPlus/Quantity/QuantityInjector.cs +++ b/NEOSPlus/Quantity/QuantityInjector.cs @@ -31,7 +31,7 @@ internal static void Inject() // Log the injected types foreach (var type in quantityTypes) { - Unilog.Log($"Injected quantity type: {type.FullName}"); + UniLog.Log($"Injected quantity type: {type.FullName}"); } // Update the quantity cache From 518473ab181be7e3af278196c07f2dfae9a1f383 Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 21:24:27 +0100 Subject: [PATCH 26/54] Frequency and Magnetic (Tesla and Guass) Quantity Types --- NEOSPlus/Quantity/Frequency.cs | 154 +++++++++++++++++++++++++++++++++ NEOSPlus/Quantity/Magnetic.cs | 136 +++++++++++++++++++++++++++++ 2 files changed, 290 insertions(+) create mode 100644 NEOSPlus/Quantity/Frequency.cs create mode 100644 NEOSPlus/Quantity/Magnetic.cs diff --git a/NEOSPlus/Quantity/Frequency.cs b/NEOSPlus/Quantity/Frequency.cs new file mode 100644 index 0000000..8914aab --- /dev/null +++ b/NEOSPlus/Quantity/Frequency.cs @@ -0,0 +1,154 @@ +using System; +using QuantityX; + +namespace NEOSPlus.Quantity +{ + public readonly struct Frequency : IQuantitySI, IQuantitySI, IQuantity, IQuantity, IComparable, IEquatable + { + public readonly double BaseValue; + + public static readonly Unit Hertz = new UnitSI(0, "", ""); + + double IQuantity.BaseValue => BaseValue; + + public double SIPower => 1.0; + + public Unit DefaultUnit => Hertz; + + public Frequency(double baseValue = 0.0) + { + this = default(Frequency); + BaseValue = baseValue; + } + + public bool Equals(Frequency other) + { + return BaseValue == other.BaseValue; + } + + public int CompareTo(Frequency other) + { + return BaseValue.CompareTo(other.BaseValue); + } + + public string[] GetShortBaseNames() + { + return new string[] { "Hz" }; + } + + public string[] GetLongBaseNames() + { + return new string[] { "hertz" }; + } + + public IUnit[] GetCommonSIUnits() + { + return new IUnit[] + { + Hertz, + SI.Kilo, + SI.Mega, + SI.Giga, + SI.Tera + }; + } + + public IUnit[] GetExludedSIUnits() + { + return new IUnit[] + { + SI.Yotta, + SI.Zetta, + SI.Exa, + SI.Peta, + SI.Deca, + SI.Hecto, + SI.Milli, + SI.Centi, + SI.Deci, + SI.Yocto, + SI.Zepto, + SI.Atto, + SI.Femto, + SI.Pico, + SI.Nano, + SI.Micro, + }; + } + + public Frequency New(double baseVal) + { + return new Frequency(baseVal); + } + + public Frequency Add(Frequency q) + { + return new Frequency(BaseValue + q.BaseValue); + } + + public Frequency Subtract(Frequency q) + { + return new Frequency(BaseValue - q.BaseValue); + } + + public Frequency Multiply(double n) + { + return new Frequency(BaseValue * n); + } + + public Frequency Divide(double n) + { + return new Frequency(BaseValue / n); + } + + public Ratio Divide(Frequency q) + { + return new Ratio(BaseValue / q.BaseValue); + } + + public static Frequency Parse(string str, Unit defaultUnit = null) + { + return Unit.Parse(str, defaultUnit); + } + + public static bool TryParse(string str, out Frequency q, Unit defaultUnit = null) + { + return Unit.TryParse(str, out q, defaultUnit); + } + + public static Frequency operator +(Frequency a, Frequency b) + { + return a.Add(b); + } + + public static Frequency operator -(Frequency a, Frequency b) + { + return a.Subtract(b); + } + + public static Frequency operator *(Frequency a, double n) + { + return a.Multiply(n); + } + + public static Frequency operator /(Frequency a, double n) + { + return a.Divide(n); + } + + public static Ratio operator /(Frequency a, Frequency b) + { + return a.Divide(b); + } + + public static Frequency operator -(Frequency a) + { + return a.Multiply(-1.0); + } + + public override string ToString() + { + return this.FormatAuto(); + } + } +} diff --git a/NEOSPlus/Quantity/Magnetic.cs b/NEOSPlus/Quantity/Magnetic.cs new file mode 100644 index 0000000..6c23087 --- /dev/null +++ b/NEOSPlus/Quantity/Magnetic.cs @@ -0,0 +1,136 @@ +using System; +using QuantityX; + +namespace NEOSPlus.Quantity +{ + public readonly struct MagneticField : IQuantitySI, IQuantitySI, IQuantity, IQuantity, IComparable, IEquatable + { + public readonly double BaseValue; + + public static readonly Unit Gauss = new UnitSI(0, "", ""); + public static readonly Unit Tesla = new Unit(1e4, new UnitGroup[1] { UnitGroup.Common }, new string[1] { "T" }, new string[1] { " tesla" }); + + double IQuantity.BaseValue => BaseValue; + + public double SIPower => 1.0; + + public Unit DefaultUnit => Gauss; + + public MagneticField(double baseValue = 0.0) + { + this = default(MagneticField); + BaseValue = baseValue; + } + + public bool Equals(MagneticField other) + { + return BaseValue == other.BaseValue; + } + + public int CompareTo(MagneticField other) + { + return BaseValue.CompareTo(other.BaseValue); + } + + public string[] GetShortBaseNames() + { + return new string[] { "G" }; + } + + public string[] GetLongBaseNames() + { + return new string[] { "gauss" }; + } + + public IUnit[] GetCommonSIUnits() + { + return new IUnit[] + { + Gauss, + Tesla + }; + } + + public IUnit[] GetExludedSIUnits() + { + return new IUnit[] + { + }; + } + + public MagneticField New(double baseVal) + { + return new MagneticField(baseVal); + } + + public MagneticField Add(MagneticField q) + { + return new MagneticField(BaseValue + q.BaseValue); + } + + public MagneticField Subtract(MagneticField q) + { + return new MagneticField(BaseValue - q.BaseValue); + } + + public MagneticField Multiply(double n) + { + return new MagneticField(BaseValue * n); + } + + public MagneticField Divide(double n) + { + return new MagneticField(BaseValue / n); + } + + public Ratio Divide(MagneticField q) + { + return new Ratio(BaseValue / q.BaseValue); + } + + public static MagneticField Parse(string str, Unit defaultUnit = null) + { + return Unit.Parse(str, defaultUnit); + } + + public static bool TryParse(string str, out MagneticField q, Unit defaultUnit = null) + { + return Unit.TryParse(str, out q, defaultUnit); + } + + public static MagneticField operator +(MagneticField a, MagneticField b) + { + return a.Add(b); + } + + public static MagneticField operator -(MagneticField a, MagneticField b) + { + return a.Subtract(b); + } + + public static MagneticField operator *(MagneticField a, double n) + { + return a.Multiply(n); + } + + public static MagneticField operator /(MagneticField a, double n) + { + return a.Divide(n); + } + + public static Ratio operator /(MagneticField a, MagneticField b) + { + return a.Divide(b); + } + + public static MagneticField operator -(MagneticField a) + { + return a.Multiply(-1.0); + } + + public override string ToString() + { + return this.FormatAuto(); + } + } +} From 011bccad2fc39977c9a512bc80cb434918494001 Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 21:36:30 +0100 Subject: [PATCH 27/54] Update ParralaxAlphav1.shader --- NEOSPlus/Shaders/ParralaxAlphav1.shader | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/NEOSPlus/Shaders/ParralaxAlphav1.shader b/NEOSPlus/Shaders/ParralaxAlphav1.shader index 18011f8..3c531ba 100644 --- a/NEOSPlus/Shaders/ParralaxAlphav1.shader +++ b/NEOSPlus/Shaders/ParralaxAlphav1.shader @@ -14,22 +14,19 @@ Shader "Custom/ParallaxOcclusionAlphaCutout" { _AlphaCutoff("Alpha Cutoff", Range(0,1)) = 0.5 } SubShader{ - Tags { "RenderType" = "Opaque" } + Tags { "RenderType" = "TransparentCutout" } LOD 200 - CGPROGRAM - #pragma surface surf Lambert - + #pragma surface surf Standard fullforwardshadows vertex:vert + #pragma target 3.0 sampler2D _MainTex; sampler2D _BumpMap; sampler2D _ParallaxMap; - struct Input { float2 texcoord; float3 eye; float sampleRatio; }; - half _Glossiness; half _Metallic; half _BumpScale; @@ -134,15 +131,11 @@ Shader "Custom/ParallaxOcclusionAlphaCutout" { OUT.texcoord = IN.texcoord; } - void surf(Input IN, inout SurfaceOutput o) { - float2 offset = parallax_offset(_Parallax, IN.eye, IN.sampleRatio, IN.texcoord * _TextureScale, - _ParallaxMap, _ParallaxMinSamples, _ParallaxMaxSamples); + void surf(Input IN, inout SurfaceOutputStandard o) { + float2 offset = parallax_offset(_Parallax, IN.eye, IN.sampleRatio, IN.texcoord * _TextureScale, _ParallaxMap, _ParallaxMinSamples, _ParallaxMaxSamples); float2 uv = IN.texcoord * _TextureScale + offset; fixed4 c = tex2D(_MainTex, uv) * _Color; - - // Apply alpha cutoff clip(c.a - _AlphaCutoff); - o.Albedo = c.rgb; o.Normal = UnpackScaleNormal(tex2D(_BumpMap, uv), _BumpScale); o.Metallic = _Metallic; From 43167e3daae4c7902d3d21c8ac2b4d8fc2073380 Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 22:10:14 +0100 Subject: [PATCH 28/54] Update ci.yml --- .github/workflows/ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f023ced..df6d9d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,9 +9,9 @@ on: env: SOLUTION_FILE_PATH: NEOSPlus.sln BUILD_CONFIGURATION: Release + jobs: build: - runs-on: windows-latest steps: @@ -32,8 +32,12 @@ jobs: $web.DownloadFile("https://assets.neos.com/install/Pro/Data/$cvstring.7z","$env:TEMP\neosupdate.7z") .\7zr.exe x -y "$env:TEMP\neosupdate.7z" * Remove-Item "$env:TEMP\neosupdate.7z" + - name: Extract DLLs + shell: pwsh + run: | + cd NeosVR/Neos_Data/Managed + $dll_file_name = "$cvstring_YTDLP.7z" + .\7zr.exe x -y "$dll_file_name" -o"${{env.GITHUB_WORKSPACE}}/Path/To/Extract/To" - name: Build working-directory: ${{env.GITHUB_WORKSPACE}} - # Add additional options to the MSBuild command line here (like platform or verbosity level). - # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference - run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} \ No newline at end of file + run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} From a3a5f2da3284b2bf1555e33d65b1938544b298d1 Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 22:17:03 +0100 Subject: [PATCH 29/54] Update ci.yml attempt 2 --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df6d9d4..2ffa145 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,9 +35,10 @@ jobs: - name: Extract DLLs shell: pwsh run: | - cd NeosVR/Neos_Data/Managed - $dll_file_name = "$cvstring_YTDLP.7z" - .\7zr.exe x -y "$dll_file_name" -o"${{env.GITHUB_WORKSPACE}}/Path/To/Extract/To" + $dll_file_name = "${cvstring}_YTDLP.7z" # Construct the DLL file name using cvstring + $sevenZipPath = Join-Path $env:GITHUB_WORKSPACE "NeosVR\7zr.exe" + $extractToPath = Join-Path $env:GITHUB_WORKSPACE "NeosVR\Neos_Data\Managed" + & $sevenZipPath x -y "$dll_file_name" -o"$extractToPath" - name: Build working-directory: ${{env.GITHUB_WORKSPACE}} run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} From 40d2403f725ed0b0ae387a2d8305a22343fe5d5c Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 22:18:26 +0100 Subject: [PATCH 30/54] Update ci.yml test 3 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ffa145..28dc1d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,13 +29,13 @@ jobs: $web = [System.Net.WebClient]::new() $web.DownloadFile("https://www.7-zip.org/a/7zr.exe","$PWD\7zr.exe") $cvstring = $web.DownloadString('https://cloudxstorage.blob.core.windows.net/install/Pro/Public') - $web.DownloadFile("https://assets.neos.com/install/Pro/Data/$cvstring.7z","$env:TEMP\neosupdate.7z") + $web.DownloadFile("https://assets.neos.com/install/Pro/Data/$cvstring","$env:TEMP\neosupdate.7z") .\7zr.exe x -y "$env:TEMP\neosupdate.7z" * Remove-Item "$env:TEMP\neosupdate.7z" - name: Extract DLLs shell: pwsh run: | - $dll_file_name = "${cvstring}_YTDLP.7z" # Construct the DLL file name using cvstring + $dll_file_name = $cvstring # Directly use cvstring as the DLL file name $sevenZipPath = Join-Path $env:GITHUB_WORKSPACE "NeosVR\7zr.exe" $extractToPath = Join-Path $env:GITHUB_WORKSPACE "NeosVR\Neos_Data\Managed" & $sevenZipPath x -y "$dll_file_name" -o"$extractToPath" From ff2d5436c027200067b88f189bcc51d7c51677a0 Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 22:26:05 +0100 Subject: [PATCH 31/54] Update ci.yml --- .github/workflows/ci.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 28dc1d6..39b81ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,16 +29,10 @@ jobs: $web = [System.Net.WebClient]::new() $web.DownloadFile("https://www.7-zip.org/a/7zr.exe","$PWD\7zr.exe") $cvstring = $web.DownloadString('https://cloudxstorage.blob.core.windows.net/install/Pro/Public') - $web.DownloadFile("https://assets.neos.com/install/Pro/Data/$cvstring","$env:TEMP\neosupdate.7z") + Write-Host "CVString is $cvstring" # Debugging line + $web.DownloadFile("https://assets.neos.com/install/Pro/Data/$cvstring.7z","$env:TEMP\neosupdate.7z") .\7zr.exe x -y "$env:TEMP\neosupdate.7z" * Remove-Item "$env:TEMP\neosupdate.7z" - - name: Extract DLLs - shell: pwsh - run: | - $dll_file_name = $cvstring # Directly use cvstring as the DLL file name - $sevenZipPath = Join-Path $env:GITHUB_WORKSPACE "NeosVR\7zr.exe" - $extractToPath = Join-Path $env:GITHUB_WORKSPACE "NeosVR\Neos_Data\Managed" - & $sevenZipPath x -y "$dll_file_name" -o"$extractToPath" - name: Build working-directory: ${{env.GITHUB_WORKSPACE}} run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} From c1afcceb35b5d5639d31f1e96df7be715f922392 Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 22:38:39 +0100 Subject: [PATCH 32/54] Update ci.yml --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39b81ba..6f17173 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,7 @@ on: env: SOLUTION_FILE_PATH: NEOSPlus.sln BUILD_CONFIGURATION: Release + NEOS_PATH: ${{ github.workspace }}/NeosVR jobs: build: @@ -29,10 +30,12 @@ jobs: $web = [System.Net.WebClient]::new() $web.DownloadFile("https://www.7-zip.org/a/7zr.exe","$PWD\7zr.exe") $cvstring = $web.DownloadString('https://cloudxstorage.blob.core.windows.net/install/Pro/Public') - Write-Host "CVString is $cvstring" # Debugging line $web.DownloadFile("https://assets.neos.com/install/Pro/Data/$cvstring.7z","$env:TEMP\neosupdate.7z") .\7zr.exe x -y "$env:TEMP\neosupdate.7z" * Remove-Item "$env:TEMP\neosupdate.7z" + - name: Update .csproj to set NeosPath + run: | + (Get-Content -path ${{env.SOLUTION_FILE_PATH}} -Raw) -replace '.*?', "${{ env.NEOS_PATH }}/" | Set-Content -Path ${{env.SOLUTION_FILE_PATH}} - name: Build working-directory: ${{env.GITHUB_WORKSPACE}} run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} From a58e6fb259bc3804f26657685b288f42f6f1161b Mon Sep 17 00:00:00 2001 From: xLinka Date: Tue, 5 Sep 2023 22:44:36 +0100 Subject: [PATCH 33/54] Update ci.yml --- .github/workflows/ci.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f17173..0315434 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,6 @@ on: env: SOLUTION_FILE_PATH: NEOSPlus.sln BUILD_CONFIGURATION: Release - NEOS_PATH: ${{ github.workspace }}/NeosVR jobs: build: @@ -22,20 +21,18 @@ jobs: - name: Restore Nuget working-directory: ${{env.GITHUB_WORKSPACE}} run: nuget restore ${{env.SOLUTION_FILE_PATH}} - - name: Download Neos + - name: Download and Extract Neos shell: pwsh run: | - New-Item -Type Directory NeosVR - cd NeosVR + $neosInstallPath = "C:\Neos\app" + New-Item -Type Directory -Path $neosInstallPath -Force + cd $neosInstallPath $web = [System.Net.WebClient]::new() $web.DownloadFile("https://www.7-zip.org/a/7zr.exe","$PWD\7zr.exe") $cvstring = $web.DownloadString('https://cloudxstorage.blob.core.windows.net/install/Pro/Public') $web.DownloadFile("https://assets.neos.com/install/Pro/Data/$cvstring.7z","$env:TEMP\neosupdate.7z") .\7zr.exe x -y "$env:TEMP\neosupdate.7z" * Remove-Item "$env:TEMP\neosupdate.7z" - - name: Update .csproj to set NeosPath - run: | - (Get-Content -path ${{env.SOLUTION_FILE_PATH}} -Raw) -replace '.*?', "${{ env.NEOS_PATH }}/" | Set-Content -Path ${{env.SOLUTION_FILE_PATH}} - name: Build working-directory: ${{env.GITHUB_WORKSPACE}} run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} From 11daacd37bdc68a9ebeb1125f5917379a6b98312 Mon Sep 17 00:00:00 2001 From: frozenreflex Date: Tue, 5 Sep 2023 17:09:53 -0500 Subject: [PATCH 34/54] Cleanup --- NEOSPlus/Quantity/QuantityInjector.cs | 83 ++++++++++----------------- 1 file changed, 29 insertions(+), 54 deletions(-) diff --git a/NEOSPlus/Quantity/QuantityInjector.cs b/NEOSPlus/Quantity/QuantityInjector.cs index 967011c..41fbe4b 100644 --- a/NEOSPlus/Quantity/QuantityInjector.cs +++ b/NEOSPlus/Quantity/QuantityInjector.cs @@ -16,11 +16,11 @@ internal static void Inject() { // Get the 'quantities' field using reflection from 'FrooxEngine.GenericTypes' var quantities = - typeof(FrooxEngine.GenericTypes).GetField("quantities", BindingFlags.Static | BindingFlags.NonPublic); + typeof(GenericTypes).GetField("quantities", BindingFlags.Static | BindingFlags.NonPublic); // Get all types in the 'NEOSPlus.Quantity' namespace that are value types var quantityTypes = typeof(QuantityInjector).Assembly.GetTypes() - .Where(type => type.Namespace == "NEOSPlus.Quantity" && type.IsValueType); + .Where(type => type.Namespace == "NEOSPlus.Quantity" && type.IsValueType).ToArray(); // Append all quantity types to the existing array of types var newArray = (quantities.GetValue(null) as Type[]).Concat(quantityTypes).ToArray(); @@ -29,10 +29,7 @@ internal static void Inject() quantities.SetValue(null, newArray); // Log the injected types - foreach (var type in quantityTypes) - { - UniLog.Log($"Injected quantity type: {type.FullName}"); - } + foreach (var type in quantityTypes) UniLog.Log($"Injected quantity type: {type.FullName}"); // Update the quantity cache UpdateQuantityCache(); @@ -43,96 +40,74 @@ internal static void UpdateQuantityCache() { // Get the 'unitCache' and 'unitNameCache' fields using reflection from 'QuantityX.QuantityX' var unitCache = - typeof(QuantityX.QuantityX).GetField("unitCache", BindingFlags.Static | BindingFlags.NonPublic) + typeof(QuantityX.QuantityX).GetField("unitCache", BindingFlags.Static | BindingFlags.NonPublic)! .GetValue(null) as Dictionary>; var unitNameCache = - typeof(QuantityX.QuantityX).GetField("unitNameCache", BindingFlags.Static | BindingFlags.NonPublic) + typeof(QuantityX.QuantityX).GetField("unitNameCache", BindingFlags.Static | BindingFlags.NonPublic)! .GetValue(null) as Dictionary>; // Get all types in the assembly containing the 'QuantityInjector' class - Type[] types = typeof(QuantityInjector).Assembly.GetTypes(); + var types = typeof(QuantityInjector).Assembly.GetTypes(); - foreach (Type type in types) + foreach (var type in types) { // Check if the type is assignable to 'IQuantity' and is a value type if (!typeof(IQuantity).IsAssignableFrom(type) || !type.IsValueType) - { continue; - } // Create an instance of the quantity type - IQuantity quantity = (IQuantity)Activator.CreateInstance(type); + var quantity = (IQuantity)Activator.CreateInstance(type); // Create a list to store associated units - List unitList = new List(); - unitCache.Add(type, unitList); - - bool isQuantitySI = false; + var unitList = new List(); + unitCache!.Add(type, unitList); // Get interfaces implemented by the quantity type - Type[] interfaces = type.GetInterfaces(); + var interfaces = type.GetInterfaces(); // Check if the quantity type implements a generic interface of 'IQuantitySI' - foreach (Type interfaceType in interfaces) - { - if (interfaceType.IsGenericType && interfaceType.GetGenericTypeDefinition() == typeof(IQuantitySI<>)) - { - isQuantitySI = true; - break; - } - } + var isQuantitySi = interfaces.Any(interfaceType => interfaceType.IsGenericType && interfaceType.GetGenericTypeDefinition() == typeof(IQuantitySI<>)); - BindingFlags bindingAttr = BindingFlags.Static | BindingFlags.Public; + const BindingFlags bindingAttr = BindingFlags.Static | BindingFlags.Public; // Create a list to store fields - List fieldLists = new List { type.GetFields(bindingAttr) }; + var fieldLists = new List { type.GetFields(bindingAttr) }; - if (isQuantitySI) + if (isQuantitySi) { // If it's a quantitySI, add common SI units - IQuantitySI quantitySI = (IQuantitySI)quantity; - IUnit[] commonSIUnits = quantitySI.GetCommonSIUnits(); + var quantitySi = (IQuantitySI)quantity; + var commonSiUnits = quantitySi.GetCommonSIUnits(); - foreach (IUnit unit in commonSIUnits) + foreach (var unit in commonSiUnits) { UnitGroup.Common.RegisterUnit(unit); UnitGroup.CommonMetric.RegisterUnit(unit); } // Exclude specific SI units - commonSIUnits = quantitySI.GetExludedSIUnits(); - foreach (IUnit unit2 in commonSIUnits) - { - UnitGroup.Metric.RemoveUnit(unit2); - } + commonSiUnits = quantitySi.GetExludedSIUnits(); + foreach (var unit2 in commonSiUnits) UnitGroup.Metric.RemoveUnit(unit2); - Type siType = typeof(SI<>).MakeGenericType(type); + var siType = typeof(SI<>).MakeGenericType(type); fieldLists.Add(siType.GetFields(bindingAttr)); } - foreach (FieldInfo[] fields in fieldLists) - { - foreach (FieldInfo fieldInfo in fields) - { - if (typeof(IUnit).IsAssignableFrom(fieldInfo.FieldType)) - { - // Get the unit and add it to the unit list - var unit = (IUnit)fieldInfo.GetValue(null); - unitList.Add(unit); - } - } - } + unitList.AddRange(from fields in fieldLists + from fieldInfo in fields + where typeof(IUnit).IsAssignableFrom(fieldInfo.FieldType) + select (IUnit) fieldInfo.GetValue(null)); unitList.Sort(); // Create a dictionary to store unit names - Dictionary unitNameDictionary = new Dictionary(); - unitNameCache.Add(type, unitNameDictionary); + var unitNameDictionary = new Dictionary(); + unitNameCache!.Add(type, unitNameDictionary); - foreach (IUnit unitItem in unitList) + foreach (var unitItem in unitList) { - foreach (string unitName in unitItem.GetUnitNames()) + foreach (var unitName in unitItem.GetUnitNames()) { unitNameDictionary.Add(unitName.Trim(), unitItem); } From a488795e258ee8178e89a5870df49b70ee93aad9 Mon Sep 17 00:00:00 2001 From: art0007i Date: Wed, 6 Sep 2023 09:02:28 +0200 Subject: [PATCH 35/54] change copy to plugin to be better --- NEOSPlus/NEOSPlus.csproj | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/NEOSPlus/NEOSPlus.csproj b/NEOSPlus/NEOSPlus.csproj index f4e29d6..c788991 100644 --- a/NEOSPlus/NEOSPlus.csproj +++ b/NEOSPlus/NEOSPlus.csproj @@ -7,6 +7,8 @@ 10 Copyright © 2022 NEOSPlus + + false
$(MSBuildThisFileDirectory)NeosVR\ @@ -17,9 +19,6 @@ E:\Neos\app\ E:\SteamLibrary/steamapps/common/NeosVR/ - - echo Copying "$(TargetPath)" to "$(NeosPath)\Libraries" - cd "$(ProjectDir)" powershell -NoProfile -ExecutionPolicy Bypass ./Scripts/PostBuild.ps1 '$(NeosPath)' $(ConfigurationName) @@ -82,4 +81,8 @@ + + + + From 86b43a3ba9c112eb3522112d1b2a0f33fdbd1280 Mon Sep 17 00:00:00 2001 From: art0007i Date: Wed, 6 Sep 2023 09:03:47 +0200 Subject: [PATCH 36/54] don't need this --- NEOSPlus.sln | 5 ----- 1 file changed, 5 deletions(-) diff --git a/NEOSPlus.sln b/NEOSPlus.sln index 8e8a3ed..714a122 100644 --- a/NEOSPlus.sln +++ b/NEOSPlus.sln @@ -10,23 +10,18 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution AutoPostX|Any CPU = AutoPostX|Any CPU - CopyToPlugin|Any CPU = CopyToPlugin|Any CPU Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {08A94620-ECB7-41FD-8C9C-C11F2EBFC776}.AutoPostX|Any CPU.ActiveCfg = AutoPostX|Any CPU {08A94620-ECB7-41FD-8C9C-C11F2EBFC776}.AutoPostX|Any CPU.Build.0 = AutoPostX|Any CPU - {08A94620-ECB7-41FD-8C9C-C11F2EBFC776}.CopyToPlugin|Any CPU.ActiveCfg = Debug|Any CPU - {08A94620-ECB7-41FD-8C9C-C11F2EBFC776}.CopyToPlugin|Any CPU.Build.0 = Debug|Any CPU {08A94620-ECB7-41FD-8C9C-C11F2EBFC776}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {08A94620-ECB7-41FD-8C9C-C11F2EBFC776}.Debug|Any CPU.Build.0 = Debug|Any CPU {08A94620-ECB7-41FD-8C9C-C11F2EBFC776}.Release|Any CPU.ActiveCfg = Release|Any CPU {08A94620-ECB7-41FD-8C9C-C11F2EBFC776}.Release|Any CPU.Build.0 = Release|Any CPU {88053493-5CC5-41EA-B598-816373CF48FE}.AutoPostX|Any CPU.ActiveCfg = AutoPostX|Any CPU {88053493-5CC5-41EA-B598-816373CF48FE}.AutoPostX|Any CPU.Build.0 = AutoPostX|Any CPU - {88053493-5CC5-41EA-B598-816373CF48FE}.CopyToPlugin|Any CPU.ActiveCfg = CopyToPlugin|Any CPU - {88053493-5CC5-41EA-B598-816373CF48FE}.CopyToPlugin|Any CPU.Build.0 = CopyToPlugin|Any CPU {88053493-5CC5-41EA-B598-816373CF48FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {88053493-5CC5-41EA-B598-816373CF48FE}.Debug|Any CPU.Build.0 = Debug|Any CPU {88053493-5CC5-41EA-B598-816373CF48FE}.Release|Any CPU.ActiveCfg = Release|Any CPU From c2e1790a91b742bc820aaaf99d96c4ab0af720ac Mon Sep 17 00:00:00 2001 From: art0007i Date: Wed, 6 Sep 2023 09:08:23 +0200 Subject: [PATCH 37/54] align --- NEOSPlus/NEOSPlus.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEOSPlus/NEOSPlus.csproj b/NEOSPlus/NEOSPlus.csproj index c788991..2896afb 100644 --- a/NEOSPlus/NEOSPlus.csproj +++ b/NEOSPlus/NEOSPlus.csproj @@ -7,7 +7,7 @@ 10 Copyright © 2022 NEOSPlus - + false From 660a87689c574c1a9c14f7f490f45a12d1764f03 Mon Sep 17 00:00:00 2001 From: xLinka Date: Wed, 6 Sep 2023 10:16:54 +0100 Subject: [PATCH 38/54] Create Capacitance.cs --- NEOSPlus/Quantity/Capacitance.cs | 1 + 1 file changed, 1 insertion(+) create mode 100644 NEOSPlus/Quantity/Capacitance.cs diff --git a/NEOSPlus/Quantity/Capacitance.cs b/NEOSPlus/Quantity/Capacitance.cs new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/NEOSPlus/Quantity/Capacitance.cs @@ -0,0 +1 @@ + From 7d8e8f00811e33c97d45fbdd96bfa3b405dfad34 Mon Sep 17 00:00:00 2001 From: xLinka Date: Wed, 6 Sep 2023 10:17:46 +0100 Subject: [PATCH 39/54] Update Capacitance.cs --- NEOSPlus/Quantity/Capacitance.cs | 144 +++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) diff --git a/NEOSPlus/Quantity/Capacitance.cs b/NEOSPlus/Quantity/Capacitance.cs index 8b13789..8991c96 100644 --- a/NEOSPlus/Quantity/Capacitance.cs +++ b/NEOSPlus/Quantity/Capacitance.cs @@ -1 +1,145 @@ +using System; +using QuantityX; + +namespace NEOSPlus.Quantity +{ + public readonly struct Capacitance : IQuantitySI, IQuantitySI, IQuantity, IQuantity, IComparable, IEquatable + { + public readonly double BaseValue; + + public static readonly Unit Farad = new UnitSI(0, "F", "farad"); + + double IQuantity.BaseValue => BaseValue; + + public double SIPower => 1.0; + + public Unit DefaultUnit => Farad; + + public Capacitance(double baseValue = 0.0) + { + this = default(Capacitance); + BaseValue = baseValue; + } + + public bool Equals(Capacitance other) + { + return BaseValue == other.BaseValue; + } + + public int CompareTo(Capacitance other) + { + return BaseValue.CompareTo(other.BaseValue); + } + + public string[] GetShortBaseNames() + { + return new string[] { "F" }; + } + + public string[] GetLongBaseNames() + { + return new string[] { "farads", "farad" }; + } + + public IUnit[] GetCommonSIUnits() + { + return new IUnit[] + { + SI.Pico, + SI.Nano, + SI.Micro, + SI.Milli, + Farad, + SI.Kilo, + SI.Mega, + SI.Giga + }; + } + + public IUnit[] GetExludedSIUnits() + { + return new IUnit[] + { + SI.Yotta, + SI.Zetta, + SI.Exa, + SI.Peta, + SI.Tera, + SI.Deca, + SI.Hecto, + SI.Centi, + SI.Deci, + SI.Yocto, + SI.Zepto, + SI.Atto, + SI.Femto + }; + } + + public Capacitance New(double baseVal) + { + return new Capacitance(baseVal); + } + + public Capacitance Add(Capacitance q) + { + return new Capacitance(BaseValue + q.BaseValue); + } + + public Capacitance Subtract(Capacitance q) + { + return new Capacitance(BaseValue - q.BaseValue); + } + + public Capacitance Multiply(double n) + { + return new Capacitance(BaseValue * n); + } + + public Capacitance Divide(double n) + { + return new Capacitance(BaseValue / n); + } + + public Ratio Divide(Capacitance q) + { + return new Ratio(BaseValue / q.BaseValue); + } + + public static Capacitance operator +(Capacitance a, Capacitance b) + { + return a.Add(b); + } + + public static Capacitance operator -(Capacitance a, Capacitance b) + { + return a.Subtract(b); + } + + public static Capacitance operator *(Capacitance a, double n) + { + return a.Multiply(n); + } + + public static Capacitance operator /(Capacitance a, double n) + { + return a.Divide(n); + } + + public static Ratio operator /(Capacitance a, Capacitance b) + { + return a.Divide(b); + } + + public static Capacitance operator -(Capacitance a) + { + return a.Multiply(-1.0); + } + + public override string ToString() + { + return this.FormatAuto(); + } + } +} From a2efab681327acb502d25c19c0e7278e8b82dda1 Mon Sep 17 00:00:00 2001 From: xLinka Date: Wed, 6 Sep 2023 10:57:05 +0100 Subject: [PATCH 40/54] Create Joules.cs --- NEOSPlus/Quantity/Joules.cs | 1 + 1 file changed, 1 insertion(+) create mode 100644 NEOSPlus/Quantity/Joules.cs diff --git a/NEOSPlus/Quantity/Joules.cs b/NEOSPlus/Quantity/Joules.cs new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/NEOSPlus/Quantity/Joules.cs @@ -0,0 +1 @@ + From d6df105c05bdda7b806fc7451e87b8697efda628 Mon Sep 17 00:00:00 2001 From: xLinka Date: Wed, 6 Sep 2023 10:57:54 +0100 Subject: [PATCH 41/54] Update Joules.cs --- NEOSPlus/Quantity/Joules.cs | 144 ++++++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) diff --git a/NEOSPlus/Quantity/Joules.cs b/NEOSPlus/Quantity/Joules.cs index 8b13789..5b1dc56 100644 --- a/NEOSPlus/Quantity/Joules.cs +++ b/NEOSPlus/Quantity/Joules.cs @@ -1 +1,145 @@ +using System; +using QuantityX; + +namespace NEOSPlus.Quantity +{ + public readonly struct Joule : IQuantitySI, IQuantitySI, IQuantity, IQuantity, IComparable, IEquatable + { + public readonly double BaseValue; + + public static readonly Unit Joules = new UnitSI(0, "J", "joule"); + + double IQuantity.BaseValue => BaseValue; + + public double SIPower => 1.0; + + public Unit DefaultUnit => Joules; + + public Joule(double baseValue = 0.0) + { + this = default(Joule); + BaseValue = baseValue; + } + + public bool Equals(Joule other) + { + return BaseValue == other.BaseValue; + } + + public int CompareTo(Joule other) + { + return BaseValue.CompareTo(other.BaseValue); + } + + public string[] GetShortBaseNames() + { + return new string[] { "J" }; + } + + public string[] GetLongBaseNames() + { + return new string[] { "joules", "joule" }; + } + + public IUnit[] GetCommonSIUnits() + { + return new IUnit[] + { + SI.Pico, + SI.Nano, + SI.Micro, + SI.Milli, + Joules, + SI.Kilo, + SI.Mega, + SI.Giga, + SI.Tera, + SI.Peta + }; + } + + public IUnit[] GetExludedSIUnits() + { + return new IUnit[] + { + SI.Yotta, + SI.Zetta, + SI.Exa, + SI.Deca, + SI.Hecto, + SI.Centi, + SI.Deci, + SI.Yocto, + SI.Zepto, + SI.Atto, + SI.Femto + }; + } + + public Joule New(double baseVal) + { + return new Joule(baseVal); + } + + public Joule Add(Joule q) + { + return new Joule(BaseValue + q.BaseValue); + } + + public Joule Subtract(Joule q) + { + return new Joule(BaseValue - q.BaseValue); + } + + public Joule Multiply(double n) + { + return new Joule(BaseValue * n); + } + + public Joule Divide(double n) + { + return new Joule(BaseValue / n); + } + + public Ratio Divide(Joule q) + { + return new Ratio(BaseValue / q.BaseValue); + } + + public static Joule operator +(Joule a, Joule b) + { + return a.Add(b); + } + + public static Joule operator -(Joule a, Joule b) + { + return a.Subtract(b); + } + + public static Joule operator *(Joule a, double n) + { + return a.Multiply(n); + } + + public static Joule operator /(Joule a, double n) + { + return a.Divide(n); + } + + public static Ratio operator /(Joule a, Joule b) + { + return a.Divide(b); + } + + public static Joule operator -(Joule a) + { + return a.Multiply(-1.0); + } + + public override string ToString() + { + return this.FormatAuto(); + } + } +} From ca25eff308d8670fba56150245a468e246e24ccc Mon Sep 17 00:00:00 2001 From: xLinka Date: Wed, 6 Sep 2023 14:34:03 +0100 Subject: [PATCH 42/54] Update issue templates --- .github/ISSUE_TEMPLATE/issue-ticket.md | 46 ++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/issue-ticket.md diff --git a/.github/ISSUE_TEMPLATE/issue-ticket.md b/.github/ISSUE_TEMPLATE/issue-ticket.md new file mode 100644 index 0000000..dd459ca --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue-ticket.md @@ -0,0 +1,46 @@ +--- +name: Issue Ticket +about: Create a report to help us improve +title: '' +labels: Bug +assignees: '' + +--- + +🔍 **Issue Description** + +**Describe the bug in detail:** + +[Please provide a clear and concise description of the bug you've encountered.] + +**Expected Behavior** + +[Describe what you expected to happen.] + +**Actual Behavior** + +[Describe what actually happened.] + +**Steps to Reproduce** + +[Provide step-by-step instructions to reproduce the bug. Be as detailed as possible.] + +**Screenshots/Logs** + +[If applicable, include screenshots or logs that can help us understand the bug better.] + +🔗 **Related Issues/PRs** + +[Are there any existing issues or pull requests related to this bug?] + +💡 **Additional Context** + +[Add any additional context about the bug here. Are there any workarounds or other details that might be helpful?] + +🧐 **Extra Hardware (if applicable)** + +[Specify any extra hardware or configuration details that are relevant to the bug.] + +📎 **Attachments (if any)** + +[Attach any relevant files or additional information here.] From fb44d1705ee6ce7ceb8aa549cd920abf04b6d48a Mon Sep 17 00:00:00 2001 From: xLinka Date: Wed, 6 Sep 2023 14:35:36 +0100 Subject: [PATCH 43/54] Update issue-ticket.md --- .github/ISSUE_TEMPLATE/issue-ticket.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/issue-ticket.md b/.github/ISSUE_TEMPLATE/issue-ticket.md index dd459ca..f6e18f7 100644 --- a/.github/ISSUE_TEMPLATE/issue-ticket.md +++ b/.github/ISSUE_TEMPLATE/issue-ticket.md @@ -1,5 +1,5 @@ --- -name: Issue Ticket +name: Bug Report about: Create a report to help us improve title: '' labels: Bug @@ -44,3 +44,7 @@ assignees: '' 📎 **Attachments (if any)** [Attach any relevant files or additional information here.] + +🚀 **NeosPlus Version** + +[Specify the version of NeosPlus where you encountered this bug.] From 28a70636559288920ae045b7265b11867b09a6b7 Mon Sep 17 00:00:00 2001 From: xLinka Date: Wed, 6 Sep 2023 14:37:31 +0100 Subject: [PATCH 44/54] Create Feature-Request.md --- .github/ISSUE_TEMPLATE/Feature-Request.md | 38 +++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/Feature-Request.md diff --git a/.github/ISSUE_TEMPLATE/Feature-Request.md b/.github/ISSUE_TEMPLATE/Feature-Request.md new file mode 100644 index 0000000..b6f47e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/Feature-Request.md @@ -0,0 +1,38 @@ +--- +name: Feature Request +about: Suggest a new idea or feature +title: '' +labels: Enhancement +assignees: '' + +--- + +💡 **Feature Request** + +**Describe the new feature or idea:** + +[Please provide a clear and detailed description of the feature you are suggesting.] + +**Use Case** + +[Explain how this feature would benefit users or improve the project. Provide specific scenarios or examples if possible.] + +🚀 **Proposed Implementation** + +[If you have any ideas on how this feature could be implemented, please share them here. This could include technical details or design suggestions.] + +💬 **Additional Context** + +[Is there any additional context or information you'd like to add regarding this feature request?] + +📅 **Target Release (if applicable)** + +[Specify if there's a specific release or timeframe you have in mind for this feature.] + +📋 **Related Issues/PRs** + +[Are there any existing issues or pull requests related to this feature request?] + +📎 **Attachments (if any)** + +[Attach any relevant files or additional information here.] From e0c741a1f2563a696a0c48880990e97ac718c289 Mon Sep 17 00:00:00 2001 From: xLinka Date: Wed, 6 Sep 2023 14:50:00 +0100 Subject: [PATCH 45/54] Create LogixNodeRequest.md --- .github/ISSUE_TEMPLATE/LogixNodeRequest.md | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/LogixNodeRequest.md diff --git a/.github/ISSUE_TEMPLATE/LogixNodeRequest.md b/.github/ISSUE_TEMPLATE/LogixNodeRequest.md new file mode 100644 index 0000000..b0a6c5b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/LogixNodeRequest.md @@ -0,0 +1,34 @@ +--- +name: Logix Node Request +about: Request a new Logix Node for NeosPlus +title: '' +labels: ['Logix', 'New Node'] +assignees: '' + +--- + +📊 **Logix Node Request** + +**Describe the new Logix Node you'd like to request:** + +[Please provide a clear and detailed description of the Logix Node you would like to see added to NeosPlus.] + +**Use Case** + +[Explain how this Logix Node would benefit users, what problems it would solve, or what creative possibilities it would open up within NeosVR.] + +🚀 **Proposed Implementation** + +[If you have any ideas on how this Logix Node could be implemented, please share them here. This could include technical details or design suggestions.] + +💬 **Additional Context** + +[Is there any additional context or information you'd like to add regarding this Logix Node request?] + +📋 **Related Issues/PRs** + +[Are there any existing issues or pull requests related to this Logix Node request?] + +📎 **Attachments (if any)** + +[Attach any relevant files, diagrams, or additional information here.] From db3bfaeb50b5bb1c3e062aa7fc2ac67f52161b58 Mon Sep 17 00:00:00 2001 From: xLinka Date: Wed, 6 Sep 2023 14:57:46 +0100 Subject: [PATCH 46/54] Create ShaderRequest.md --- .github/ISSUE_TEMPLATE/ShaderRequest.md | 34 +++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/ShaderRequest.md diff --git a/.github/ISSUE_TEMPLATE/ShaderRequest.md b/.github/ISSUE_TEMPLATE/ShaderRequest.md new file mode 100644 index 0000000..dc45e9e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/ShaderRequest.md @@ -0,0 +1,34 @@ +--- +name: Shader Request +about: Request a new shader for NeosPlus +title: '' +labels: ['shader', 'Enhancement'] +assignees: '' + +--- + +🎨 **Shader Request** + +**Describe the new shader you'd like to request:** + +[Please provide a clear and detailed description of the shader you would like to see added to NeosPlus.] + +**Use Case** + +[Explain how this shader would enhance the visual experience, solve specific problems, or open up creative possibilities within NeosVR.] + +🚀 **Proposed Implementation** + +[If you have shader code or implementation ideas, please share them here. If you're supplying shader code, make sure it's available under the MIT license or an equivalent open-source license.] + +```glsl +// Paste your shader code here (if available and MIT licensed). +``` + +💬 **Additional Context** + +[Is there any additional context or information you'd like to add regarding this Logix Node request?] + +📋 **Related Issues/PRs** + +[Are there any existing issues or pull requests related to this Logix Node request?] From cb6737dd32cc3b40c635c57ed7948cf948032f21 Mon Sep 17 00:00:00 2001 From: xLinka Date: Wed, 6 Sep 2023 15:21:42 +0100 Subject: [PATCH 47/54] Create ComponentRequest.md --- .github/ISSUE_TEMPLATE/ComponentRequest.md | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/ComponentRequest.md diff --git a/.github/ISSUE_TEMPLATE/ComponentRequest.md b/.github/ISSUE_TEMPLATE/ComponentRequest.md new file mode 100644 index 0000000..5d5c607 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/ComponentRequest.md @@ -0,0 +1,34 @@ +--- +name: Component Request +about: Request a new component for NeosPlus +title: '' +labels: ['New Component', 'Enhancement'] +assignees: '' + +--- + +🔌 **Component Request** + +**Describe the new component you'd like to request:** + +[Please provide a clear and detailed description of the component you would like to see added to NeosPlus.] + +**Use Case** + +[Explain how this component would benefit users, what functionality it would add, or how it enhances the NeosVR experience.] + +🚀 **Proposed Implementation** + +[If you have any ideas on how this component could be implemented, please share them here. This could include technical details or design suggestions.] + +💬 **Additional Context** + +[Is there any additional context or information you'd like to add regarding this component request?] + +📋 **Related Issues/PRs** + +[Are there any existing issues or pull requests related to this component request?] + +📎 **Attachments (if any)** + +[Attach any relevant files, images, diagrams, or additional information here.] From c4dbfe979c850f535b31f216698a28e408d4dcb8 Mon Sep 17 00:00:00 2001 From: xLinka Date: Wed, 6 Sep 2023 16:14:42 +0100 Subject: [PATCH 48/54] Create SECURITY.md --- SECURITY.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..2a3c247 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,23 @@ +## Reporting a Security Vulnerability + +At NeosPlus, we take security seriously. We value the contributions of security researchers and the community in helping us maintain a secure environment for our users. If you believe you have discovered a security vulnerability in our project, we kindly request that you report it to us in a responsible manner. Your cooperation helps us address and resolve security issues promptly. + +**Please do not create public issues for security vulnerabilities.** + +To report a security vulnerability, follow these steps: + + +1. **Contact a maintainer on Discord:** Additionally, you can reach out to one of our main maintainers privately on our Discord server. Please send a direct message to one of the following maintainers: + - @xlinka + +3. **Provide necessary details:** When reporting the vulnerability, please include the following information: + - A detailed description of the vulnerability, including how it can be exploited. + - Steps to reproduce the vulnerability, if applicable. + - Any proof-of-concept code or evidence you can provide. + - Your contact information so we can communicate with you regarding the issue. + +4. **Response:** Once we receive your report, we will acknowledge it as soon as possible, typically within 2 business days. Our team will assess the report, investigate the issue, and determine the impact and severity. + +5. **Resolution:** We will work diligently to address and resolve the issue in a timely manner. This may involve developing and releasing a security patch or update. + +6. **Public Disclosure:** After the vulnerability has been patched and users have had an opportunity to update, we may publish a security advisory to inform the community about the issue. From c691345db098c0052528dda6807511b423f14719 Mon Sep 17 00:00:00 2001 From: xLinka Date: Wed, 6 Sep 2023 16:19:38 +0100 Subject: [PATCH 49/54] Create PULL_REQUEST_TEMPLATE.md --- .github/PULL_REQUEST_TEMPLATE.md | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..9e9eb22 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,36 @@ +## Pull Request + +### Description + +[Provide a brief description of the purpose and goals of this pull request.] + +### Related Issues + +[Reference any related issues or feature requests that this PR addresses. Use the format `Fixes #123` or `Closes #456`.] + +### Changes Made + +[List the changes made in this pull request. Include specific details about code modifications, new features, bug fixes, or any other relevant changes.] + +### Screenshots (if applicable) + +[Include any relevant screenshots or images that help reviewers understand the changes visually.] + +### Testing (if applicable) + +[Describe the testing process you have followed. Include information about the test environment, steps to reproduce, and any test results or outcomes.] + +### Checklist + +Please review and check off the following items as applicable: + +- [ ] The code follows the project's coding conventions and style guidelines. +- [ ] All existing tests pass successfully. +- [ ] I have added new tests to cover the changes (if applicable). +- [ ] Documentation has been updated or added to reflect the changes (if applicable). +- [ ] The code has been reviewed and approved by at least one other contributor. +- [ ] The branch is up-to-date with the latest changes from the main branch. + +### Additional Information + +[Include any additional context, notes, or information that may be relevant to the review and merging of this PR.] From 933a2932d3f07b7a471675b34fb64ca11cae4cc7 Mon Sep 17 00:00:00 2001 From: xLinka Date: Wed, 13 Sep 2023 18:34:20 +0100 Subject: [PATCH 50/54] Physics Nodes CentipetalForce Drag Kinectic Friction Refraction --- .../Math/Physics/CentripetalForceNode.cs | 12 +++++++ NEOSPlus/Logix/Math/Physics/DragNode.cs | 27 ++++++++++++++++ .../Logix/Math/Physics/KineticFrictionNode.cs | 23 +++++++++++++ NEOSPlus/Logix/Math/Physics/Refractions.cs | 32 +++++++++++++++++++ 4 files changed, 94 insertions(+) create mode 100644 NEOSPlus/Logix/Math/Physics/CentripetalForceNode.cs create mode 100644 NEOSPlus/Logix/Math/Physics/DragNode.cs create mode 100644 NEOSPlus/Logix/Math/Physics/KineticFrictionNode.cs create mode 100644 NEOSPlus/Logix/Math/Physics/Refractions.cs diff --git a/NEOSPlus/Logix/Math/Physics/CentripetalForceNode.cs b/NEOSPlus/Logix/Math/Physics/CentripetalForceNode.cs new file mode 100644 index 0000000..9b82e75 --- /dev/null +++ b/NEOSPlus/Logix/Math/Physics/CentripetalForceNode.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NEOSPlus.Logix.Math.Physics +{ + internal class FileName + { + } +} diff --git a/NEOSPlus/Logix/Math/Physics/DragNode.cs b/NEOSPlus/Logix/Math/Physics/DragNode.cs new file mode 100644 index 0000000..aeaec07 --- /dev/null +++ b/NEOSPlus/Logix/Math/Physics/DragNode.cs @@ -0,0 +1,27 @@ +using System; +using BaseX; + +namespace FrooxEngine.LogiX.Math; + +[NodeName("Drag Calculation")] +[Category(new string[] { "LogiX/Math/Physics" })] +internal class DragNode : LogixNode +{ + public readonly Input FluidDensity; // rho + public readonly Input ObjectVelocity; // v + public readonly Input DragCoefficient; // Cd + public readonly Input CrossSectionalArea; // A + + public readonly Output DragForce; + + protected override void OnEvaluate() + { + float rho = FluidDensity.EvaluateRaw(); + float3 v = ObjectVelocity.EvaluateRaw(); + float Cd = DragCoefficient.EvaluateRaw(); + float A = CrossSectionalArea.EvaluateRaw(); + + float3 dragForce = 0.5f * rho * v * v * Cd * A; // Calculate the drag force + DragForce.Value = -dragForce; // Drag acts in the opposite direction of motion + } +} diff --git a/NEOSPlus/Logix/Math/Physics/KineticFrictionNode.cs b/NEOSPlus/Logix/Math/Physics/KineticFrictionNode.cs new file mode 100644 index 0000000..5c3b389 --- /dev/null +++ b/NEOSPlus/Logix/Math/Physics/KineticFrictionNode.cs @@ -0,0 +1,23 @@ +using System; +using BaseX; + +namespace FrooxEngine.LogiX.Math; + +[NodeName("Kinetic Friction Calculation")] +[Category(new string[] { "LogiX/Math/Physics" })] +internal class KineticFrictionNode : LogixNode +{ + public readonly Input NormalForce; // Assuming it's a 3D force, change as needed + public readonly Input KineticFrictionCoefficient; + + public readonly Output KineticFrictionalForce; + + protected override void OnEvaluate() + { + float3 normal = NormalForce.EvaluateRaw(); + float coefficient = KineticFrictionCoefficient.EvaluateRaw(0f); // Default to 0 if not provided + + // Kinetic friction formula: f_kinetic = mu_kinetic * N + KineticFrictionalForce.Value = coefficient * normal; + } +} diff --git a/NEOSPlus/Logix/Math/Physics/Refractions.cs b/NEOSPlus/Logix/Math/Physics/Refractions.cs new file mode 100644 index 0000000..2e00d4f --- /dev/null +++ b/NEOSPlus/Logix/Math/Physics/Refractions.cs @@ -0,0 +1,32 @@ +using System; +using BaseX; + +namespace FrooxEngine.LogiX.Math; + +[NodeName("Refraction Calculation")] +[Category(new string[] { "LogiX/Math/Physics" })] +internal class RefractionNode : LogixNode +{ + public readonly Input RefractiveIndex1; // Refractive index of medium 1 + public readonly Input RefractiveIndex2; // Refractive index of medium 2 + public readonly Input AngleOfIncidence; // Angle of incidence in degrees + + public readonly Output AngleOfRefraction; // Angle of refraction in degrees + + protected override void OnEvaluate() + { + float n1 = RefractiveIndex1.EvaluateRaw(); + float n2 = RefractiveIndex2.EvaluateRaw(); + float theta1Rad = AngleOfIncidence.EvaluateRaw() * (float)MathX.PI / 180.0f; // Convert angle to radians + // for the love of god why does mathx not have a toradians function + + // Calculate using Snell's Law + float sinTheta2 = n1 * (float)MathX.Sin(theta1Rad) / n2; + + // Ensure value is within [-1, 1] due to numerical inaccuracies + sinTheta2 = MathX.Min(MathX.Max(sinTheta2, -1.0f), 1.0f); + + float theta2Rad = (float)MathX.Asin(sinTheta2); + AngleOfRefraction.Value = theta2Rad * 180.0f / (float)MathX.PI; // Convert angle back to degrees + } +} From 031cda9b90f67277c126088fd32de3283fd1d3b7 Mon Sep 17 00:00:00 2001 From: xLinka Date: Thu, 14 Sep 2023 10:34:41 +0100 Subject: [PATCH 51/54] Update CentripetalForceNode.cs --- .../Math/Physics/CentripetalForceNode.cs | 29 ++++++++++++++----- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/NEOSPlus/Logix/Math/Physics/CentripetalForceNode.cs b/NEOSPlus/Logix/Math/Physics/CentripetalForceNode.cs index 9b82e75..d16a8e4 100644 --- a/NEOSPlus/Logix/Math/Physics/CentripetalForceNode.cs +++ b/NEOSPlus/Logix/Math/Physics/CentripetalForceNode.cs @@ -1,12 +1,27 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System; +using BaseX; -namespace NEOSPlus.Logix.Math.Physics +namespace FrooxEngine.LogiX.Math.Physics; + +[NodeName("Centripetal Force Calculation")] +[Category(new string[] { "LogiX/Math/Physics" })] +internal class CentripetalForceNode : LogixNode { - internal class FileName + public readonly Input Mass; // Mass of the object + public readonly Input Velocity; // Tangential velocity of the object + public readonly Input Radius; // Radius of the circular path + + public readonly Output CentripetalForce; // Centripetal force acting on the object + + protected override void OnEvaluate() { + float m = Mass.EvaluateRaw(); + float v = Velocity.EvaluateRaw(); + float r = Radius.EvaluateRaw(); + + float force = (m * v * v) / r; + + CentripetalForce.Value = force; } } + From 66bb3ed691837e41679c6c070d855c1e4b69b8f9 Mon Sep 17 00:00:00 2001 From: xLinka Date: Thu, 14 Sep 2023 10:42:01 +0100 Subject: [PATCH 52/54] refactor putting all in folder NeosPlus/ --- .../Logix/Collections/CollectionsAppend.cs | 2 +- .../Logix/Collections/CollectionsClear.cs | 2 +- .../Logix/Collections/CollectionsCount.cs | 2 +- NEOSPlus/Logix/Collections/CollectionsGet.cs | 2 +- .../Logix/Collections/CollectionsInsert.cs | 2 +- .../Logix/Collections/CollectionsIterate.cs | 2 +- .../Logix/Collections/CollectionsRemove.cs | 2 +- NEOSPlus/Logix/Collections/CollectionsSet.cs | 2 +- .../SyncCollections/CollectionsSyncSet.cs | 2 +- NEOSPlus/Logix/DynamicMesh/Bone/AddBone.cs | 2 +- NEOSPlus/Logix/DynamicMesh/Bone/GetBone.cs | 2 +- .../Logix/DynamicMesh/Bone/PackBoneBinding.cs | 2 +- .../Logix/DynamicMesh/Bone/SetBoneBinding.cs | 2 +- .../Logix/DynamicMesh/Bone/StripEmptyBone.cs | 2 +- .../DynamicMesh/Bone/UnpackBoneBindings.cs | 2 +- .../Logix/DynamicMesh/DynamicMeshInput.cs | 2 +- NEOSPlus/Logix/DynamicMesh/MeshInfo.cs | 2 +- NEOSPlus/Logix/DynamicMesh/MeshInput.cs | 2 +- .../DynamicMesh/MeshOperations/AppendMesh.cs | 2 +- .../DynamicMesh/MeshOperations/BakeMesh.cs | 2 +- .../DynamicMesh/MeshOperations/ClearMesh.cs | 2 +- .../DynamicMesh/MeshOperations/GetMesh.cs | 2 +- .../DynamicMesh/MeshOperations/RefreshMesh.cs | 2 +- .../MeshOperations/SubmeshActions.cs | 8 +++--- .../Logix/DynamicMesh/Triangle/AddTriangle.cs | 2 +- .../Logix/DynamicMesh/Triangle/GetTriangle.cs | 2 +- .../DynamicMesh/Triangle/RemoveTriangles.cs | 2 +- .../Triangle/SetTriangleIndexies.cs | 2 +- .../Logix/DynamicMesh/Vertex/AddVertex.cs | 2 +- .../Logix/DynamicMesh/Vertex/GetVertex.cs | 2 +- .../Logix/DynamicMesh/Vertex/GetVertexPos.cs | 2 +- .../Logix/DynamicMesh/Vertex/SetVertex.cs | 2 +- .../Logix/DynamicMesh/Vertex/UnpackVertex.cs | 2 +- .../Input Devices/ViveTrackerByBodyNode.cs | 2 +- .../Logix/Input Devices/ViveTrackerByIndex.cs | 2 +- .../Logix/Input Devices/ViveTrackerCount.cs | 2 +- NEOSPlus/Logix/Input/ParseEnum.cs | 2 +- .../Grabbable/FindGrabbableFromSlot.cs | 2 +- NEOSPlus/Logix/Json/JsonAddToObject.cs | 2 +- NEOSPlus/Logix/Json/JsonAppendToArray.cs | 2 +- NEOSPlus/Logix/Json/JsonCountArrayChildren.cs | 2 +- .../Logix/Json/JsonCountObjectChildren.cs | 2 +- NEOSPlus/Logix/Json/JsonEmpty.cs | 6 ++--- NEOSPlus/Logix/Json/JsonGetFromArray.cs | 2 +- NEOSPlus/Logix/Json/JsonGetFromObject.cs | 2 +- NEOSPlus/Logix/Json/JsonInsertToArray.cs | 2 +- NEOSPlus/Logix/Json/JsonParseString.cs | 2 +- NEOSPlus/Logix/Json/JsonParseStringArray.cs | 2 +- NEOSPlus/Logix/Json/JsonQuickGetFromObject.cs | 2 +- NEOSPlus/Logix/Json/JsonRemoveFromArray.cs | 2 +- NEOSPlus/Logix/Json/JsonRemoveFromObject.cs | 2 +- NEOSPlus/Logix/Json/JsonToString.cs | 2 +- NEOSPlus/Logix/Locomotion/IsUserInNoClip.cs | 2 +- NEOSPlus/Logix/Math/Constants/Cheese.cs | 2 +- .../Logix/Math/Constants/EpsilonDouble.cs | 2 +- NEOSPlus/Logix/Math/Constants/EpsilonFloat.cs | 2 +- NEOSPlus/Logix/Math/EulersTotientFunction.cs | 2 +- NEOSPlus/Logix/Math/Factorial.cs | 2 +- NEOSPlus/Logix/Math/IsPrimeNumber.cs | 2 +- .../GaussJordanElimination_double2x2.cs | 2 +- .../GaussJordanElimination_double3x3.cs | 2 +- .../GaussJordanElimination_double4x4.cs | 2 +- .../Matrix/GaussJordanElimination_float2x2.cs | 2 +- .../Matrix/GaussJordanElimination_float3x3.cs | 2 +- .../Matrix/GaussJordanElimination_float4x4.cs | 2 +- .../Matrix/GaussianElimination_double2x2.cs | 2 +- .../Matrix/GaussianElimination_double3x3.cs | 2 +- .../Matrix/GaussianElimination_double4x4.cs | 2 +- .../Matrix/GaussianElimination_float2x2.cs | 2 +- .../Matrix/GaussianElimination_float3x3.cs | 2 +- .../Matrix/GaussianElimination_float4x4.cs | 2 +- .../Math/Physics/CentripetalForceNode.cs | 27 ++++++++++++++----- .../Logix/Math/Physics/KineticFrictionNode.cs | 2 +- NEOSPlus/Logix/Math/Physics/Refractions.cs | 2 +- NEOSPlus/Logix/Math/Random/RandomBool2.cs | 2 +- NEOSPlus/Logix/Math/Random/RandomBool3.cs | 2 +- NEOSPlus/Logix/Math/Random/RandomBool4.cs | 2 +- NEOSPlus/Logix/Math/Random/RandomCharacter.cs | 2 +- NEOSPlus/Logix/Math/Random/RandomDouble.cs | 2 +- NEOSPlus/Logix/Math/Random/RandomEuler.cs | 2 +- NEOSPlus/Logix/Math/Random/RandomInt2.cs | 2 +- NEOSPlus/Logix/Math/Random/RandomInt3.cs | 2 +- NEOSPlus/Logix/Math/Random/RandomInt4.cs | 2 +- NEOSPlus/Logix/Math/Random/RandomLetter.cs | 2 +- NEOSPlus/Logix/Math/Sorting/SortNode.cs | 2 +- .../ART-NET/ArtNetChannelDataExtractor.cs | 2 +- .../Network/ART-NET/ArtNetReceiverConnect.cs | 2 +- .../ART-NET/ArtNetUniverseDataReceiver.cs | 2 +- NEOSPlus/Logix/Network/GetStockPrice.cs | 2 +- NEOSPlus/Logix/Network/HTTPRequest.cs | 2 +- NEOSPlus/Logix/Network/RSSFeed.cs | 2 +- NEOSPlus/Logix/Network/YouTube/SearchVideo.cs | 2 +- NEOSPlus/Logix/Operators/GetValue.cs | 2 +- NEOSPlus/Logix/Operators/ZeroOneI.cs | 2 +- NEOSPlus/Logix/Playback/IsPaused.cs | 2 +- NEOSPlus/Logix/Playback/IsStopped.cs | 2 +- NEOSPlus/Logix/References/ExtractIDs.cs | 2 +- NEOSPlus/Logix/Slots/CreateEmptySlot.cs | 2 +- NEOSPlus/Logix/Slots/GetChildrenWithTag.cs | 2 +- NEOSPlus/Logix/Slots/GetGrandparent.cs | 2 +- NEOSPlus/Logix/String/CountSubstring.cs | 2 +- NEOSPlus/Logix/String/DecodeBase64.cs | 2 +- NEOSPlus/Logix/String/DecodeMorse.cs | 2 +- NEOSPlus/Logix/String/EncodeBase64.cs | 2 +- NEOSPlus/Logix/String/EncodeMD5.cs | 2 +- NEOSPlus/Logix/String/EncodeMorse.cs | 2 +- NEOSPlus/Logix/String/EncodeSha256.cs | 2 +- NEOSPlus/Logix/String/HMAC.cs | 2 +- NEOSPlus/Logix/String/HammingDistance.cs | 2 +- .../String/HammingDistanceNonNullable.cs | 2 +- .../Logix/Transform/ValueInequalityDriver.cs | 2 +- NEOSPlus/Logix/Users/AllUsers.cs | 2 +- NEOSPlus/Logix/Users/IsUserEyeTracking.cs | 2 +- NEOSPlus/Logix/Users/IsUserInSeatedMode.cs | 2 +- NEOSPlus/Logix/Users/IsUserScaling.cs | 2 +- NEOSPlus/Logix/Users/SetUserScaling.cs | 2 +- NEOSPlus/Logix/Utility/Write To Log.cs | 2 +- NEOSPlus/Logix/Web3/Crypto/CoinGecko.cs | 2 +- .../Logix/Web3/Crypto/Current Gas Price.cs | 2 +- .../Logix/Web3/Crypto/Market Token Price.cs | 2 +- 120 files changed, 145 insertions(+), 130 deletions(-) diff --git a/NEOSPlus/Logix/Collections/CollectionsAppend.cs b/NEOSPlus/Logix/Collections/CollectionsAppend.cs index 3ef1b18..b142de4 100644 --- a/NEOSPlus/Logix/Collections/CollectionsAppend.cs +++ b/NEOSPlus/Logix/Collections/CollectionsAppend.cs @@ -7,7 +7,7 @@ namespace FrooxEngine.LogiX.Collections { [NodeName("Append")] - [Category("LogiX/Collections")] + [Category("LogiX/NeosPlus/Collections")] [NodeDefaultType(typeof(CollectionsAppend>))] public class CollectionsAppend : LogixNode where TU : ICollection { diff --git a/NEOSPlus/Logix/Collections/CollectionsClear.cs b/NEOSPlus/Logix/Collections/CollectionsClear.cs index 88d1384..574d026 100644 --- a/NEOSPlus/Logix/Collections/CollectionsClear.cs +++ b/NEOSPlus/Logix/Collections/CollectionsClear.cs @@ -7,7 +7,7 @@ namespace FrooxEngine.LogiX.Collections { [NodeName("Clear")] - [Category("LogiX/Collections")] + [Category("LogiX/NeosPlus/Collections")] [NodeDefaultType(typeof(CollectionsClear, SyncFieldList>))] public class CollectionsClear : LogixNode where TU : SyncElementList where T : class, ISyncMember, new() { diff --git a/NEOSPlus/Logix/Collections/CollectionsCount.cs b/NEOSPlus/Logix/Collections/CollectionsCount.cs index 5adde0c..03ac108 100644 --- a/NEOSPlus/Logix/Collections/CollectionsCount.cs +++ b/NEOSPlus/Logix/Collections/CollectionsCount.cs @@ -10,7 +10,7 @@ namespace FrooxEngine.LogiX.Collections { [NodeName("Count")] - [Category("LogiX/Collections")] + [Category("LogiX/NeosPlus/Collections")] [NodeDefaultType(typeof(CollectionsCount>))] public class CollectionsCount : LogixOperator where TU : IEnumerable { diff --git a/NEOSPlus/Logix/Collections/CollectionsGet.cs b/NEOSPlus/Logix/Collections/CollectionsGet.cs index b556a56..0c60bd3 100644 --- a/NEOSPlus/Logix/Collections/CollectionsGet.cs +++ b/NEOSPlus/Logix/Collections/CollectionsGet.cs @@ -10,7 +10,7 @@ namespace FrooxEngine.LogiX.Collections { [NodeName("Get")] - [Category("LogiX/Collections")] + [Category("LogiX/NeosPlus/Collections")] [NodeDefaultType(typeof(CollectionsGet>))] public class CollectionsGet : LogixOperator where TU : IEnumerable { diff --git a/NEOSPlus/Logix/Collections/CollectionsInsert.cs b/NEOSPlus/Logix/Collections/CollectionsInsert.cs index 9bf1412..3181bb8 100644 --- a/NEOSPlus/Logix/Collections/CollectionsInsert.cs +++ b/NEOSPlus/Logix/Collections/CollectionsInsert.cs @@ -7,7 +7,7 @@ namespace FrooxEngine.LogiX.Collections { [NodeName("Insert")] - [Category("LogiX/Collections")] + [Category("LogiX/NeosPlus/Collections")] [NodeDefaultType(typeof(CollectionsInsert>))] public class CollectionsInsert : LogixNode where TU : IList { diff --git a/NEOSPlus/Logix/Collections/CollectionsIterate.cs b/NEOSPlus/Logix/Collections/CollectionsIterate.cs index e16cb7a..579fc42 100644 --- a/NEOSPlus/Logix/Collections/CollectionsIterate.cs +++ b/NEOSPlus/Logix/Collections/CollectionsIterate.cs @@ -7,7 +7,7 @@ namespace FrooxEngine.LogiX.Collections { [NodeName("Foreach")] - [Category("LogiX/Collections")] + [Category("LogiX/NeosPlus/Collections")] [NodeDefaultType(typeof(CollectionsIterate>))] public class CollectionsIterate : LogixNode where TU : IEnumerable { diff --git a/NEOSPlus/Logix/Collections/CollectionsRemove.cs b/NEOSPlus/Logix/Collections/CollectionsRemove.cs index 1b30b41..f3f7f72 100644 --- a/NEOSPlus/Logix/Collections/CollectionsRemove.cs +++ b/NEOSPlus/Logix/Collections/CollectionsRemove.cs @@ -7,7 +7,7 @@ namespace FrooxEngine.LogiX.Collections { [NodeName("Remove")] - [Category("LogiX/Collections")] + [Category("LogiX/NeosPlus/Collections")] [NodeDefaultType(typeof(CollectionsRemove>))] public class CollectionsRemove : LogixNode where TU : IList { diff --git a/NEOSPlus/Logix/Collections/CollectionsSet.cs b/NEOSPlus/Logix/Collections/CollectionsSet.cs index 1ed5bc4..616bd47 100644 --- a/NEOSPlus/Logix/Collections/CollectionsSet.cs +++ b/NEOSPlus/Logix/Collections/CollectionsSet.cs @@ -7,7 +7,7 @@ namespace FrooxEngine.LogiX.Collections { [NodeName("Set")] - [Category("LogiX/Collections")] + [Category("LogiX/NeosPlus/Collections")] [NodeDefaultType(typeof(CollectionsSet>))] public class CollectionsSet : LogixNode where TU : IList { diff --git a/NEOSPlus/Logix/Collections/SyncCollections/CollectionsSyncSet.cs b/NEOSPlus/Logix/Collections/SyncCollections/CollectionsSyncSet.cs index d2f4879..64c5ca4 100644 --- a/NEOSPlus/Logix/Collections/SyncCollections/CollectionsSyncSet.cs +++ b/NEOSPlus/Logix/Collections/SyncCollections/CollectionsSyncSet.cs @@ -8,7 +8,7 @@ namespace FrooxEngine.LogiX.Collections { [HiddenNode] [NodeName("SyncSet")] - [Category("LogiX/Collections")] + [Category("LogiX/NeosPlus/Collections")] [NodeDefaultType(typeof(CollectionsSyncSet>))] public class CollectionsSyncSet : LogixNode where TU : ISyncList, IEnumerable { diff --git a/NEOSPlus/Logix/DynamicMesh/Bone/AddBone.cs b/NEOSPlus/Logix/DynamicMesh/Bone/AddBone.cs index 220313e..5008785 100644 --- a/NEOSPlus/Logix/DynamicMesh/Bone/AddBone.cs +++ b/NEOSPlus/Logix/DynamicMesh/Bone/AddBone.cs @@ -2,7 +2,7 @@ namespace FrooxEngine { - [Category("LogiX/Mesh/Bone")] + [Category("LogiX/NeosPlus/Mesh/Bone")] public class AddBone : LogixNode { public readonly Input DynamicMesh; diff --git a/NEOSPlus/Logix/DynamicMesh/Bone/GetBone.cs b/NEOSPlus/Logix/DynamicMesh/Bone/GetBone.cs index 63769a9..4dc3ba2 100644 --- a/NEOSPlus/Logix/DynamicMesh/Bone/GetBone.cs +++ b/NEOSPlus/Logix/DynamicMesh/Bone/GetBone.cs @@ -4,7 +4,7 @@ // Rad was here namespace FrooxEngine.LogiX.Math { - [Category("LogiX/Mesh/Bone")] + [Category("LogiX/NeosPlus/Mesh/Bone")] public class GetBoneBinding : LogixOperator { public readonly Input> Mesh; diff --git a/NEOSPlus/Logix/DynamicMesh/Bone/PackBoneBinding.cs b/NEOSPlus/Logix/DynamicMesh/Bone/PackBoneBinding.cs index 2a9bbe9..5fb98aa 100644 --- a/NEOSPlus/Logix/DynamicMesh/Bone/PackBoneBinding.cs +++ b/NEOSPlus/Logix/DynamicMesh/Bone/PackBoneBinding.cs @@ -5,7 +5,7 @@ namespace FrooxEngine { - [Category("LogiX/Mesh/Bone")] + [Category("LogiX/NeosPlus/Mesh/Bone")] public class PackBoneBinding : LogixOperator { public readonly Input CopyBoneBind; diff --git a/NEOSPlus/Logix/DynamicMesh/Bone/SetBoneBinding.cs b/NEOSPlus/Logix/DynamicMesh/Bone/SetBoneBinding.cs index 494da52..abc379f 100644 --- a/NEOSPlus/Logix/DynamicMesh/Bone/SetBoneBinding.cs +++ b/NEOSPlus/Logix/DynamicMesh/Bone/SetBoneBinding.cs @@ -5,7 +5,7 @@ namespace FrooxEngine { - [Category("LogiX/Mesh/Bone")] + [Category("LogiX/NeosPlus/Mesh/Bone")] public class SetBoneBinding : LogixNode { public readonly Input Vertex; diff --git a/NEOSPlus/Logix/DynamicMesh/Bone/StripEmptyBone.cs b/NEOSPlus/Logix/DynamicMesh/Bone/StripEmptyBone.cs index db9c7ac..273f952 100644 --- a/NEOSPlus/Logix/DynamicMesh/Bone/StripEmptyBone.cs +++ b/NEOSPlus/Logix/DynamicMesh/Bone/StripEmptyBone.cs @@ -5,7 +5,7 @@ namespace FrooxEngine { - [Category(new string[] {"LogiX/Mesh/Bone"})] + [Category(new string[] {"LogiX/NeosPlus/Mesh/Bone"})] public class StripEmptyBones : LogixNode { public readonly Input DynamicMesh; diff --git a/NEOSPlus/Logix/DynamicMesh/Bone/UnpackBoneBindings.cs b/NEOSPlus/Logix/DynamicMesh/Bone/UnpackBoneBindings.cs index 83b8a11..dc61123 100644 --- a/NEOSPlus/Logix/DynamicMesh/Bone/UnpackBoneBindings.cs +++ b/NEOSPlus/Logix/DynamicMesh/Bone/UnpackBoneBindings.cs @@ -2,7 +2,7 @@ namespace FrooxEngine.LogiX.Operators { - [Category("LogiX/Mesh/Bone")] + [Category("LogiX/NeosPlus/Mesh/Bone")] public class UnpackBoneBindings : LogixNode { public readonly Input BoneBind; diff --git a/NEOSPlus/Logix/DynamicMesh/DynamicMeshInput.cs b/NEOSPlus/Logix/DynamicMesh/DynamicMeshInput.cs index 3fcccdd..c2ffbee 100644 --- a/NEOSPlus/Logix/DynamicMesh/DynamicMeshInput.cs +++ b/NEOSPlus/Logix/DynamicMesh/DynamicMeshInput.cs @@ -6,7 +6,7 @@ namespace FrooxEngine { - [Category(new string[] {"LogiX/Mesh"})] + [Category(new string[] {"LogiX/NeosPlus/Mesh"})] public class DynamicMeshInput : LogixOperator { public readonly AssetRef Mesh; diff --git a/NEOSPlus/Logix/DynamicMesh/MeshInfo.cs b/NEOSPlus/Logix/DynamicMesh/MeshInfo.cs index 42be0b6..7e675cd 100644 --- a/NEOSPlus/Logix/DynamicMesh/MeshInfo.cs +++ b/NEOSPlus/Logix/DynamicMesh/MeshInfo.cs @@ -7,7 +7,7 @@ namespace FrooxEngine { - [Category(new string[] {"LogiX/Mesh"})] + [Category(new string[] {"LogiX/NeosPlus/Mesh"})] public class MeshInfo : LogixNode { public readonly Input DynamicMesh; diff --git a/NEOSPlus/Logix/DynamicMesh/MeshInput.cs b/NEOSPlus/Logix/DynamicMesh/MeshInput.cs index af7bb0a..88f9790 100644 --- a/NEOSPlus/Logix/DynamicMesh/MeshInput.cs +++ b/NEOSPlus/Logix/DynamicMesh/MeshInput.cs @@ -6,7 +6,7 @@ namespace FrooxEngine { - [Category(new string[] {"LogiX/Mesh"})] + [Category(new string[] {"LogiX/NeosPlus/Mesh"})] public class MeshInput : LogixOperator> { public readonly AssetRef Mesh; diff --git a/NEOSPlus/Logix/DynamicMesh/MeshOperations/AppendMesh.cs b/NEOSPlus/Logix/DynamicMesh/MeshOperations/AppendMesh.cs index 2c0ff90..1385dad 100644 --- a/NEOSPlus/Logix/DynamicMesh/MeshOperations/AppendMesh.cs +++ b/NEOSPlus/Logix/DynamicMesh/MeshOperations/AppendMesh.cs @@ -6,7 +6,7 @@ /// namespace FrooxEngine { - [Category("LogiX/Mesh/Operations")] + [Category("LogiX/NeosPlus/Mesh/Operations")] public class AppendMesh : LogixNode { public readonly Input DynamicMesh; diff --git a/NEOSPlus/Logix/DynamicMesh/MeshOperations/BakeMesh.cs b/NEOSPlus/Logix/DynamicMesh/MeshOperations/BakeMesh.cs index a8cc6a8..6068980 100644 --- a/NEOSPlus/Logix/DynamicMesh/MeshOperations/BakeMesh.cs +++ b/NEOSPlus/Logix/DynamicMesh/MeshOperations/BakeMesh.cs @@ -4,7 +4,7 @@ namespace FrooxEngine.LogiX.Assets { - [Category("LogiX/Mesh/Operations")] + [Category("LogiX/NeosPlus/Mesh/Operations")] public class BakeMesh : LogixNode { public readonly Input Mesh; diff --git a/NEOSPlus/Logix/DynamicMesh/MeshOperations/ClearMesh.cs b/NEOSPlus/Logix/DynamicMesh/MeshOperations/ClearMesh.cs index da78af1..fcd3283 100644 --- a/NEOSPlus/Logix/DynamicMesh/MeshOperations/ClearMesh.cs +++ b/NEOSPlus/Logix/DynamicMesh/MeshOperations/ClearMesh.cs @@ -5,7 +5,7 @@ /// namespace FrooxEngine { - [Category("LogiX/Mesh/Operations")] + [Category("LogiX/NeosPlus/Mesh/Operations")] public class ClearMesh : LogixNode { public readonly Input DynamicMesh; diff --git a/NEOSPlus/Logix/DynamicMesh/MeshOperations/GetMesh.cs b/NEOSPlus/Logix/DynamicMesh/MeshOperations/GetMesh.cs index 64a036d..a8d187e 100644 --- a/NEOSPlus/Logix/DynamicMesh/MeshOperations/GetMesh.cs +++ b/NEOSPlus/Logix/DynamicMesh/MeshOperations/GetMesh.cs @@ -5,7 +5,7 @@ /// namespace FrooxEngine.LogiX.Assets { - [Category("LogiX/Mesh/Operations")] + [Category("LogiX/NeosPlus/Mesh/Operations")] public class GetMesh : LogixOperator> { public readonly Input Root; diff --git a/NEOSPlus/Logix/DynamicMesh/MeshOperations/RefreshMesh.cs b/NEOSPlus/Logix/DynamicMesh/MeshOperations/RefreshMesh.cs index 67f05c4..374df1f 100644 --- a/NEOSPlus/Logix/DynamicMesh/MeshOperations/RefreshMesh.cs +++ b/NEOSPlus/Logix/DynamicMesh/MeshOperations/RefreshMesh.cs @@ -5,7 +5,7 @@ /// namespace FrooxEngine { - [Category("LogiX/Mesh/Operations")] + [Category("LogiX/NeosPlus/Mesh/Operations")] public class RefreshMesh : LogixNode { public readonly Input DynamicMesh; diff --git a/NEOSPlus/Logix/DynamicMesh/MeshOperations/SubmeshActions.cs b/NEOSPlus/Logix/DynamicMesh/MeshOperations/SubmeshActions.cs index 5a351b6..e982a28 100644 --- a/NEOSPlus/Logix/DynamicMesh/MeshOperations/SubmeshActions.cs +++ b/NEOSPlus/Logix/DynamicMesh/MeshOperations/SubmeshActions.cs @@ -3,7 +3,7 @@ namespace FrooxEngine { - [Category("LogiX/Mesh/Operations")] + [Category("LogiX/NeosPlus/Mesh/Operations")] public class GetSubmesh : LogixOperator { public readonly Input> DynamicMesh; @@ -11,7 +11,7 @@ public class GetSubmesh : LogixOperator public override Submesh Content => DynamicMesh.Evaluate()?.Asset?.Data?.GetSubmesh(Index.Evaluate()); } - [Category("LogiX/Mesh/Operations")] + [Category("LogiX/NeosPlus/Mesh/Operations")] public class SubmeshMerge : LogixNode { public readonly Input SubmeshFrom; @@ -28,7 +28,7 @@ public void Process() } } - [Category("LogiX/Mesh/Operations")] + [Category("LogiX/NeosPlus/Mesh/Operations")] public class RemoveSubmesh : LogixNode { public readonly Input SubMesh; @@ -57,7 +57,7 @@ public void Process() } } - [Category("LogiX/Mesh/Operations")] + [Category("LogiX/NeosPlus/Mesh/Operations")] public class AddSubmesh : LogixNode { public readonly Input DynamicMesh; diff --git a/NEOSPlus/Logix/DynamicMesh/Triangle/AddTriangle.cs b/NEOSPlus/Logix/DynamicMesh/Triangle/AddTriangle.cs index e6a5a24..1c9260b 100644 --- a/NEOSPlus/Logix/DynamicMesh/Triangle/AddTriangle.cs +++ b/NEOSPlus/Logix/DynamicMesh/Triangle/AddTriangle.cs @@ -2,7 +2,7 @@ namespace FrooxEngine { - [Category("LogiX/Mesh/Triangle")] + [Category("LogiX/NeosPlus/Mesh/Triangle")] public class AddTriangle : LogixNode { public readonly Input DynamicMesh; diff --git a/NEOSPlus/Logix/DynamicMesh/Triangle/GetTriangle.cs b/NEOSPlus/Logix/DynamicMesh/Triangle/GetTriangle.cs index d5c3412..cd90751 100644 --- a/NEOSPlus/Logix/DynamicMesh/Triangle/GetTriangle.cs +++ b/NEOSPlus/Logix/DynamicMesh/Triangle/GetTriangle.cs @@ -3,7 +3,7 @@ namespace FrooxEngine.LogiX.Math { - [Category(new string[] {"LogiX/Mesh/Triangle"})] + [Category(new string[] {"LogiX/NeosPlus/Mesh/Triangle"})] public class GetTriangle : LogixOperator { public readonly Input> Mesh; diff --git a/NEOSPlus/Logix/DynamicMesh/Triangle/RemoveTriangles.cs b/NEOSPlus/Logix/DynamicMesh/Triangle/RemoveTriangles.cs index ec53b14..e63a9be 100644 --- a/NEOSPlus/Logix/DynamicMesh/Triangle/RemoveTriangles.cs +++ b/NEOSPlus/Logix/DynamicMesh/Triangle/RemoveTriangles.cs @@ -2,7 +2,7 @@ namespace FrooxEngine { - [Category(new string[] {"LogiX/Mesh/Triangle"})] + [Category(new string[] {"LogiX/NeosPlus/Mesh/Triangle"})] public class RemoveTriangles : LogixNode { public readonly Input DynamicMesh; diff --git a/NEOSPlus/Logix/DynamicMesh/Triangle/SetTriangleIndexies.cs b/NEOSPlus/Logix/DynamicMesh/Triangle/SetTriangleIndexies.cs index 5404ece..af32e7a 100644 --- a/NEOSPlus/Logix/DynamicMesh/Triangle/SetTriangleIndexies.cs +++ b/NEOSPlus/Logix/DynamicMesh/Triangle/SetTriangleIndexies.cs @@ -2,7 +2,7 @@ namespace FrooxEngine { - [Category("LogiX/Mesh/Triangle")] + [Category("LogiX/NeosPlus/Mesh/Triangle")] public class SetTriangleIndexies : LogixNode { public readonly Input DynamicMesh; diff --git a/NEOSPlus/Logix/DynamicMesh/Vertex/AddVertex.cs b/NEOSPlus/Logix/DynamicMesh/Vertex/AddVertex.cs index 30da97b..7c1819f 100644 --- a/NEOSPlus/Logix/DynamicMesh/Vertex/AddVertex.cs +++ b/NEOSPlus/Logix/DynamicMesh/Vertex/AddVertex.cs @@ -3,7 +3,7 @@ namespace FrooxEngine { - [Category("LogiX/Mesh/Vertex")] + [Category("LogiX/NeosPlus/Mesh/Vertex")] public class AddVertex : LogixNode { public readonly Input DynamicMesh; diff --git a/NEOSPlus/Logix/DynamicMesh/Vertex/GetVertex.cs b/NEOSPlus/Logix/DynamicMesh/Vertex/GetVertex.cs index 5fffa5e..256f1e7 100644 --- a/NEOSPlus/Logix/DynamicMesh/Vertex/GetVertex.cs +++ b/NEOSPlus/Logix/DynamicMesh/Vertex/GetVertex.cs @@ -4,7 +4,7 @@ // Rad was here namespace FrooxEngine.LogiX.Math { - [Category("LogiX/Mesh/Vertex")] + [Category("LogiX/NeosPlus/Mesh/Vertex")] public class GetVertex : LogixOperator { public readonly Input> Mesh; diff --git a/NEOSPlus/Logix/DynamicMesh/Vertex/GetVertexPos.cs b/NEOSPlus/Logix/DynamicMesh/Vertex/GetVertexPos.cs index 00712ab..840a147 100644 --- a/NEOSPlus/Logix/DynamicMesh/Vertex/GetVertexPos.cs +++ b/NEOSPlus/Logix/DynamicMesh/Vertex/GetVertexPos.cs @@ -3,7 +3,7 @@ namespace FrooxEngine.LogiX.Math { - [Category("LogiX/Mesh/Vertex")] + [Category("LogiX/NeosPlus/Mesh/Vertex")] public class GetVertexPos : LogixOperator { public readonly Input> Mesh; diff --git a/NEOSPlus/Logix/DynamicMesh/Vertex/SetVertex.cs b/NEOSPlus/Logix/DynamicMesh/Vertex/SetVertex.cs index e3f0208..a4e7495 100644 --- a/NEOSPlus/Logix/DynamicMesh/Vertex/SetVertex.cs +++ b/NEOSPlus/Logix/DynamicMesh/Vertex/SetVertex.cs @@ -3,7 +3,7 @@ namespace FrooxEngine { - [Category("LogiX/Mesh/Vertex")] + [Category("LogiX/NeosPlus/Mesh/Vertex")] public class SetVertex : LogixNode { public readonly Input Vertex; diff --git a/NEOSPlus/Logix/DynamicMesh/Vertex/UnpackVertex.cs b/NEOSPlus/Logix/DynamicMesh/Vertex/UnpackVertex.cs index e6d81f3..9d6dd4e 100644 --- a/NEOSPlus/Logix/DynamicMesh/Vertex/UnpackVertex.cs +++ b/NEOSPlus/Logix/DynamicMesh/Vertex/UnpackVertex.cs @@ -2,7 +2,7 @@ namespace FrooxEngine.LogiX.Operators { - [Category("LogiX/Mesh/Vertex")] + [Category("LogiX/NeosPlus/Mesh/Vertex")] public class UnpackVertex : LogixNode { public readonly Input Vertex; diff --git a/NEOSPlus/Logix/Input Devices/ViveTrackerByBodyNode.cs b/NEOSPlus/Logix/Input Devices/ViveTrackerByBodyNode.cs index 9958129..9b3f425 100644 --- a/NEOSPlus/Logix/Input Devices/ViveTrackerByBodyNode.cs +++ b/NEOSPlus/Logix/Input Devices/ViveTrackerByBodyNode.cs @@ -7,7 +7,7 @@ namespace NEOSPlus.Logix.Input_Devices; -[Category("LogiX/Input Devices")] +[Category("LogiX/NeosPlus/Input Devices")] public class ViveTrackerByBodyNode : TrackerBatteryBase { public readonly Input BodyNode; diff --git a/NEOSPlus/Logix/Input Devices/ViveTrackerByIndex.cs b/NEOSPlus/Logix/Input Devices/ViveTrackerByIndex.cs index d49cc7a..9483fd4 100644 --- a/NEOSPlus/Logix/Input Devices/ViveTrackerByIndex.cs +++ b/NEOSPlus/Logix/Input Devices/ViveTrackerByIndex.cs @@ -8,7 +8,7 @@ namespace NEOSPlus.Logix.Input_Devices { - [Category("LogiX/Input Devices")] + [Category("LogiX/NeosPlus/Input Devices")] public class ViveTrackerByIndex : TrackerBatteryBase { public readonly Input TrackerIndex; diff --git a/NEOSPlus/Logix/Input Devices/ViveTrackerCount.cs b/NEOSPlus/Logix/Input Devices/ViveTrackerCount.cs index 5b65c52..dda1d60 100644 --- a/NEOSPlus/Logix/Input Devices/ViveTrackerCount.cs +++ b/NEOSPlus/Logix/Input Devices/ViveTrackerCount.cs @@ -8,7 +8,7 @@ namespace FrooxEngine.Logix.Input_Devices { - [Category("LogiX/Input Devices")] + [Category("LogiX/NeosPlus/Input Devices")] public class ViveTrackerCount : LogixNode { public readonly Input User; diff --git a/NEOSPlus/Logix/Input/ParseEnum.cs b/NEOSPlus/Logix/Input/ParseEnum.cs index d5929c2..bc0ee62 100644 --- a/NEOSPlus/Logix/Input/ParseEnum.cs +++ b/NEOSPlus/Logix/Input/ParseEnum.cs @@ -3,7 +3,7 @@ namespace FrooxEngine { - [Category("LogiX/Input")] + [Category("LogiX/NeosPlus/Input")] [GenericTypes(GenericTypes.Group.CommonEnums)] public class ParseEnum : LogixOperator where E : struct, Enum, IConvertible { diff --git a/NEOSPlus/Logix/Interaction/Grabbable/FindGrabbableFromSlot.cs b/NEOSPlus/Logix/Interaction/Grabbable/FindGrabbableFromSlot.cs index 6e1d6b7..a45d7bc 100644 --- a/NEOSPlus/Logix/Interaction/Grabbable/FindGrabbableFromSlot.cs +++ b/NEOSPlus/Logix/Interaction/Grabbable/FindGrabbableFromSlot.cs @@ -1,6 +1,6 @@ namespace FrooxEngine.LogiX.Interaction { - [Category("LogiX/Interaction/Grabbable")] + [Category("LogiX/NeosPlus/Interaction/Grabbable")] [NodeName("Find Grabbable")] public class FindGrabbableFromSlot : LogixNode { diff --git a/NEOSPlus/Logix/Json/JsonAddToObject.cs b/NEOSPlus/Logix/Json/JsonAddToObject.cs index da885c6..da4bb35 100644 --- a/NEOSPlus/Logix/Json/JsonAddToObject.cs +++ b/NEOSPlus/Logix/Json/JsonAddToObject.cs @@ -5,7 +5,7 @@ namespace FrooxEngine.LogiX.Json; [NodeName("Add To Object")] -[Category("LogiX/Json")] +[Category("LogiX/NeosPlus/Json")] [GenericTypes(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint), typeof(long), typeof(ulong), typeof(float), typeof(double), typeof(string), typeof(Uri), typeof(JToken), typeof(JObject), typeof(JArray))] diff --git a/NEOSPlus/Logix/Json/JsonAppendToArray.cs b/NEOSPlus/Logix/Json/JsonAppendToArray.cs index 67057cf..fa5c897 100644 --- a/NEOSPlus/Logix/Json/JsonAppendToArray.cs +++ b/NEOSPlus/Logix/Json/JsonAppendToArray.cs @@ -5,7 +5,7 @@ namespace FrooxEngine.LogiX.Json; [NodeName("Append To Array")] -[Category("LogiX/Json")] +[Category("LogiX/NeosPlus/Json")] [GenericTypes(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint), typeof(long), typeof(ulong), typeof(float), typeof(double), typeof(string), typeof(Uri), typeof(JToken), typeof(JObject), typeof(JArray))] diff --git a/NEOSPlus/Logix/Json/JsonCountArrayChildren.cs b/NEOSPlus/Logix/Json/JsonCountArrayChildren.cs index e541d13..4d28068 100644 --- a/NEOSPlus/Logix/Json/JsonCountArrayChildren.cs +++ b/NEOSPlus/Logix/Json/JsonCountArrayChildren.cs @@ -3,7 +3,7 @@ namespace FrooxEngine.LogiX.Json; [NodeName("Count Array Children")] -[Category("LogiX/Json")] +[Category("LogiX/NeosPlus/Json")] [OldTypeName("FrooxEngine.LogiX.Json.JSONCountArrayChildren")] public class JsonCountArrayChildren : LogixOperator { diff --git a/NEOSPlus/Logix/Json/JsonCountObjectChildren.cs b/NEOSPlus/Logix/Json/JsonCountObjectChildren.cs index 28d73b2..2499645 100644 --- a/NEOSPlus/Logix/Json/JsonCountObjectChildren.cs +++ b/NEOSPlus/Logix/Json/JsonCountObjectChildren.cs @@ -3,7 +3,7 @@ namespace FrooxEngine.LogiX.Json; [NodeName("Count Object Children")] -[Category("LogiX/Json")] +[Category("LogiX/NeosPlus/Json")] [OldTypeName("FrooxEngine.LogiX.Json.JSONCountChildren")] public class JsonCountObjectChildren : LogixOperator { diff --git a/NEOSPlus/Logix/Json/JsonEmpty.cs b/NEOSPlus/Logix/Json/JsonEmpty.cs index 52b5212..4b2ecf8 100644 --- a/NEOSPlus/Logix/Json/JsonEmpty.cs +++ b/NEOSPlus/Logix/Json/JsonEmpty.cs @@ -3,21 +3,21 @@ namespace FrooxEngine.LogiX.Json; [NodeName("Empty Object")] -[Category("LogiX/Json")] +[Category("LogiX/NeosPlus/Json")] public class JsonEmptyObject : LogixOperator { public override JObject Content => new(); } [NodeName("Empty Array")] -[Category("LogiX/Json")] +[Category("LogiX/NeosPlus/Json")] public class JsonEmptyArray : LogixOperator { public override JArray Content => new(); } [NodeName("Null Value")] -[Category("LogiX/Json")] +[Category("LogiX/NeosPlus/Json")] public class JsonNullValue : LogixOperator { public override JToken Content => JValue.CreateNull(); diff --git a/NEOSPlus/Logix/Json/JsonGetFromArray.cs b/NEOSPlus/Logix/Json/JsonGetFromArray.cs index 8536d6c..8054366 100644 --- a/NEOSPlus/Logix/Json/JsonGetFromArray.cs +++ b/NEOSPlus/Logix/Json/JsonGetFromArray.cs @@ -5,7 +5,7 @@ namespace FrooxEngine.LogiX.Json; [NodeName("Get From Array")] -[Category("LogiX/Json")] +[Category("LogiX/NeosPlus/Json")] [GenericTypes(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint), typeof(long), typeof(ulong), typeof(float), typeof(double), typeof(string), typeof(Uri), typeof(JToken), typeof(JObject), typeof(JArray))] diff --git a/NEOSPlus/Logix/Json/JsonGetFromObject.cs b/NEOSPlus/Logix/Json/JsonGetFromObject.cs index 8bd6e14..4449fcc 100644 --- a/NEOSPlus/Logix/Json/JsonGetFromObject.cs +++ b/NEOSPlus/Logix/Json/JsonGetFromObject.cs @@ -5,7 +5,7 @@ namespace FrooxEngine.LogiX.Json; [NodeName("Get From Object")] -[Category("LogiX/Json")] +[Category("LogiX/NeosPlus/Json")] [GenericTypes(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint), typeof(long), typeof(ulong), typeof(float), typeof(double), typeof(string), typeof(Uri), typeof(JToken), typeof(JObject), typeof(JArray))] diff --git a/NEOSPlus/Logix/Json/JsonInsertToArray.cs b/NEOSPlus/Logix/Json/JsonInsertToArray.cs index 737f89f..cb732ee 100644 --- a/NEOSPlus/Logix/Json/JsonInsertToArray.cs +++ b/NEOSPlus/Logix/Json/JsonInsertToArray.cs @@ -5,7 +5,7 @@ namespace FrooxEngine.LogiX.Json; [NodeName("Insert To Array")] -[Category("LogiX/Json")] +[Category("LogiX/NeosPlus/Json")] [GenericTypes(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint), typeof(long), typeof(ulong), typeof(float), typeof(double), typeof(string), typeof(Uri), typeof(JToken), typeof(JObject), typeof(JArray))] diff --git a/NEOSPlus/Logix/Json/JsonParseString.cs b/NEOSPlus/Logix/Json/JsonParseString.cs index 5ca7a88..92bc919 100644 --- a/NEOSPlus/Logix/Json/JsonParseString.cs +++ b/NEOSPlus/Logix/Json/JsonParseString.cs @@ -3,7 +3,7 @@ namespace FrooxEngine.LogiX.Json; [NodeName("Parse Object From String")] -[Category("LogiX/Json")] +[Category("LogiX/NeosPlus/Json")] [OldTypeName("FrooxEngine.LogiX.Json.ParseJSONString")] public class JsonParseString : LogixOperator { diff --git a/NEOSPlus/Logix/Json/JsonParseStringArray.cs b/NEOSPlus/Logix/Json/JsonParseStringArray.cs index 7a94ab4..17b463a 100644 --- a/NEOSPlus/Logix/Json/JsonParseStringArray.cs +++ b/NEOSPlus/Logix/Json/JsonParseStringArray.cs @@ -3,7 +3,7 @@ namespace FrooxEngine.LogiX.Json; [NodeName("Parse Array From String")] -[Category("LogiX/Json")] +[Category("LogiX/NeosPlus/Json")] [OldTypeName("FrooxEngine.LogiX.Json.ParseJSONStringArray")] public class JsonParseStringArray : LogixOperator { diff --git a/NEOSPlus/Logix/Json/JsonQuickGetFromObject.cs b/NEOSPlus/Logix/Json/JsonQuickGetFromObject.cs index 990770c..da435b5 100644 --- a/NEOSPlus/Logix/Json/JsonQuickGetFromObject.cs +++ b/NEOSPlus/Logix/Json/JsonQuickGetFromObject.cs @@ -5,7 +5,7 @@ namespace FrooxEngine.LogiX.Json; [NodeName("Quick Get From Object")] -[Category("LogiX/Json")] +[Category("LogiX/NeosPlus/Json")] [GenericTypes(typeof(byte), typeof(sbyte), typeof(short), typeof(ushort), typeof(int), typeof(uint), typeof(long), typeof(ulong), typeof(float), typeof(double), typeof(string), typeof(Uri), typeof(JToken), typeof(JObject), typeof(JArray))] diff --git a/NEOSPlus/Logix/Json/JsonRemoveFromArray.cs b/NEOSPlus/Logix/Json/JsonRemoveFromArray.cs index 75ff978..71672d4 100644 --- a/NEOSPlus/Logix/Json/JsonRemoveFromArray.cs +++ b/NEOSPlus/Logix/Json/JsonRemoveFromArray.cs @@ -5,7 +5,7 @@ namespace FrooxEngine.LogiX.Json; [NodeName("Remove From Array")] -[Category("LogiX/Json")] +[Category("LogiX/NeosPlus/Json")] public class JsonRemoveFromArray : LogixOperator { public readonly Input Array; diff --git a/NEOSPlus/Logix/Json/JsonRemoveFromObject.cs b/NEOSPlus/Logix/Json/JsonRemoveFromObject.cs index eb94ba5..4b2739a 100644 --- a/NEOSPlus/Logix/Json/JsonRemoveFromObject.cs +++ b/NEOSPlus/Logix/Json/JsonRemoveFromObject.cs @@ -5,7 +5,7 @@ namespace FrooxEngine.LogiX.Json; [NodeName("Remove From Object")] -[Category("LogiX/Json")] +[Category("LogiX/NeosPlus/Json")] public class JsonRemoveFromObject : LogixOperator { public readonly Input Input; diff --git a/NEOSPlus/Logix/Json/JsonToString.cs b/NEOSPlus/Logix/Json/JsonToString.cs index a00a5d1..4e42d59 100644 --- a/NEOSPlus/Logix/Json/JsonToString.cs +++ b/NEOSPlus/Logix/Json/JsonToString.cs @@ -3,7 +3,7 @@ namespace FrooxEngine.LogiX.Json; [NodeName("To String")] -[Category("LogiX/Json")] +[Category("LogiX/NeosPlus/Json")] [GenericTypes(typeof(JToken), typeof(JObject), typeof(JArray))] [OldTypeSpecialization("FrooxEngine.LogiX.Json.ToJSONString", typeof(JObject))] public class JsonToString : LogixOperator diff --git a/NEOSPlus/Logix/Locomotion/IsUserInNoClip.cs b/NEOSPlus/Logix/Locomotion/IsUserInNoClip.cs index 7359af8..de9ebbc 100644 --- a/NEOSPlus/Logix/Locomotion/IsUserInNoClip.cs +++ b/NEOSPlus/Logix/Locomotion/IsUserInNoClip.cs @@ -3,7 +3,7 @@ namespace FrooxEngine.LogiX.Locomotion { [NodeName("Is User in NoClip")] - [Category(new string[] {"LogiX/Locomotion"})] + [Category(new string[] {"LogiX/NeosPlus/Locomotion"})] public class IsUserInNoClip : LogixOperator { public readonly Input User; diff --git a/NEOSPlus/Logix/Math/Constants/Cheese.cs b/NEOSPlus/Logix/Math/Constants/Cheese.cs index d47a8b3..62e2813 100644 --- a/NEOSPlus/Logix/Math/Constants/Cheese.cs +++ b/NEOSPlus/Logix/Math/Constants/Cheese.cs @@ -2,7 +2,7 @@ namespace FrooxEngine.LogiX.Math { - [Category("LogiX/Math/Constants")] + [Category("LogiX/NeosPlus/Math/Constants")] [NodeName("Cheese")] [HiddenNode] public class Cheese : LogixOperator diff --git a/NEOSPlus/Logix/Math/Constants/EpsilonDouble.cs b/NEOSPlus/Logix/Math/Constants/EpsilonDouble.cs index 94a05c4..53cc7b5 100644 --- a/NEOSPlus/Logix/Math/Constants/EpsilonDouble.cs +++ b/NEOSPlus/Logix/Math/Constants/EpsilonDouble.cs @@ -2,7 +2,7 @@ namespace FrooxEngine.LogiX.Math { - [Category("LogiX/Math/Constants")] + [Category("LogiX/NeosPlus/Math/Constants")] [NodeName("Epsilon Double")] public class EpsilonDouble : LogixOperator { diff --git a/NEOSPlus/Logix/Math/Constants/EpsilonFloat.cs b/NEOSPlus/Logix/Math/Constants/EpsilonFloat.cs index baa24f9..782917b 100644 --- a/NEOSPlus/Logix/Math/Constants/EpsilonFloat.cs +++ b/NEOSPlus/Logix/Math/Constants/EpsilonFloat.cs @@ -2,7 +2,7 @@ namespace FrooxEngine.LogiX.Math { - [Category("LogiX/Math/Constants")] + [Category("LogiX/NeosPlus/Math/Constants")] [NodeName("Epsilon Float")] public class EpsilonFloat : LogixOperator { diff --git a/NEOSPlus/Logix/Math/EulersTotientFunction.cs b/NEOSPlus/Logix/Math/EulersTotientFunction.cs index ac0cbf1..18241bc 100644 --- a/NEOSPlus/Logix/Math/EulersTotientFunction.cs +++ b/NEOSPlus/Logix/Math/EulersTotientFunction.cs @@ -5,7 +5,7 @@ namespace FrooxEngine.LogiX.Math { [NodeName("Euler's Totient Function")] - [Category("LogiX/Operators")] + [Category("LogiX/NeosPlus/Operators")] public class EulersTotientFunction : LogixNode { public readonly Input Input; diff --git a/NEOSPlus/Logix/Math/Factorial.cs b/NEOSPlus/Logix/Math/Factorial.cs index f7fa9f3..c6adac5 100644 --- a/NEOSPlus/Logix/Math/Factorial.cs +++ b/NEOSPlus/Logix/Math/Factorial.cs @@ -3,7 +3,7 @@ namespace FrooxEngine.LogiX.Math { [NodeName("Factorial")] - [Category("LogiX/Math")] + [Category("LogiX/NeosPlus/Math")] public class Factorial : LogixOperator { public readonly Input Input; diff --git a/NEOSPlus/Logix/Math/IsPrimeNumber.cs b/NEOSPlus/Logix/Math/IsPrimeNumber.cs index 35a6788..8434671 100644 --- a/NEOSPlus/Logix/Math/IsPrimeNumber.cs +++ b/NEOSPlus/Logix/Math/IsPrimeNumber.cs @@ -3,7 +3,7 @@ namespace FrooxEngine.LogiX.Math { [NodeName("IsPrimeNumber")] - [Category("LogiX/Math")] + [Category("LogiX/NeosPlus/Math")] public class IsPrimeNumber : LogixOperator { public readonly Input input; diff --git a/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_double2x2.cs b/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_double2x2.cs index af8d8b8..d604a6a 100644 --- a/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_double2x2.cs +++ b/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_double2x2.cs @@ -7,7 +7,7 @@ namespace FrooxEngine.LogiX.Math { [NodeName("Reduced Row Echelon Form")] [NodeOverload("Reduced-Row-Echelon-Form")] - [Category(new string[] {"LogiX/Math/Matrix"})] + [Category(new string[] {"LogiX/NeosPlus/Math/Matrix"})] // GaussJordanElimination public sealed class GaussJordanElimination_d2x2 : LogixOperator diff --git a/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_double3x3.cs b/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_double3x3.cs index 3822e0f..c7c0b06 100644 --- a/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_double3x3.cs +++ b/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_double3x3.cs @@ -8,7 +8,7 @@ namespace FrooxEngine.LogiX.Math [HiddenNode] // Hide overload from node browser [NodeName("Reduced Row Echelon Form")] [NodeOverload("Reduced-Row-Echelon-Form")] - [Category(new string[] {"LogiX/Math/Matrix"})] + [Category(new string[] {"LogiX/NeosPlus/Math/Matrix"})] public sealed class GaussJordanElimination_double3x3 : LogixOperator { public readonly Input LinearEquationMatrix; diff --git a/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_double4x4.cs b/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_double4x4.cs index 16e7178..9876066 100644 --- a/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_double4x4.cs +++ b/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_double4x4.cs @@ -8,7 +8,7 @@ namespace FrooxEngine.LogiX.Math [HiddenNode] // Hide overload from node browser [NodeName("Reduced Row Echelon Form")] [NodeOverload("Reduced-Row-Echelon-Form")] - [Category(new string[] {"LogiX/Math/Matrix"})] + [Category(new string[] {"LogiX/NeosPlus/Math/Matrix"})] public sealed class GaussJordanElimination_double4x4 : LogixOperator { public readonly Input LinearEquationMatrix; diff --git a/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_float2x2.cs b/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_float2x2.cs index 9198d73..9b089f7 100644 --- a/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_float2x2.cs +++ b/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_float2x2.cs @@ -7,7 +7,7 @@ namespace FrooxEngine.LogiX.Math { [NodeName("Reduced Row Echelon Form")] [NodeOverload("Reduced-Row-Echelon-Form")] - [Category(new string[] {"LogiX/Math/Matrix"})] + [Category(new string[] {"LogiX/NeosPlus/Math/Matrix"})] // GaussJordanElimination public sealed class GaussJordanElimination_float2x2 : LogixOperator diff --git a/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_float3x3.cs b/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_float3x3.cs index 78e7bfa..7d8ef46 100644 --- a/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_float3x3.cs +++ b/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_float3x3.cs @@ -8,7 +8,7 @@ namespace FrooxEngine.LogiX.Math [HiddenNode] // Hide overload from node browser [NodeName("Reduced Row Echelon Form")] [NodeOverload("Reduced-Row-Echelon-Form")] - [Category(new string[] {"LogiX/Math/Matrix"})] + [Category(new string[] {"LogiX/NeosPlus/Math/Matrix"})] public sealed class GaussJordanElimination_float3x3 : LogixOperator { public readonly Input LinearEquationMatrix; diff --git a/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_float4x4.cs b/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_float4x4.cs index 328a0b4..4a51a4a 100644 --- a/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_float4x4.cs +++ b/NEOSPlus/Logix/Math/Matrix/GaussJordanElimination_float4x4.cs @@ -8,7 +8,7 @@ namespace FrooxEngine.LogiX.Math [HiddenNode] // Hide overload from node browser [NodeName("Reduced Row Echelon Form")] [NodeOverload("Reduced-Row-Echelon-Form")] - [Category(new string[] {"LogiX/Math/Matrix"})] + [Category(new string[] {"LogiX/NeosPlus/Math/Matrix"})] public sealed class GaussJordanElimination_float4x4 : LogixOperator { public readonly Input LinearEquationMatrix; diff --git a/NEOSPlus/Logix/Math/Matrix/GaussianElimination_double2x2.cs b/NEOSPlus/Logix/Math/Matrix/GaussianElimination_double2x2.cs index 553e1f3..3f115fc 100644 --- a/NEOSPlus/Logix/Math/Matrix/GaussianElimination_double2x2.cs +++ b/NEOSPlus/Logix/Math/Matrix/GaussianElimination_double2x2.cs @@ -5,7 +5,7 @@ namespace FrooxEngine.LogiX.Math { [NodeName("Reduced Echelon Form")] [NodeOverload("Reduced-Echelon-Form")] - [Category(new string[] {"LogiX/Math/Matrix"})] + [Category(new string[] {"LogiX/NeosPlus/Math/Matrix"})] // GaussJordanElimination public sealed class GaussianElimination_d2x2 : LogixOperator diff --git a/NEOSPlus/Logix/Math/Matrix/GaussianElimination_double3x3.cs b/NEOSPlus/Logix/Math/Matrix/GaussianElimination_double3x3.cs index 44dacfd..de52f08 100644 --- a/NEOSPlus/Logix/Math/Matrix/GaussianElimination_double3x3.cs +++ b/NEOSPlus/Logix/Math/Matrix/GaussianElimination_double3x3.cs @@ -8,7 +8,7 @@ namespace FrooxEngine.LogiX.Math [HiddenNode] // Hide overload from node browser [NodeName("Reduced Echelon Form")] [NodeOverload("Reduced-Echelon-Form")] - [Category(new string[] {"LogiX/Math/Matrix"})] + [Category(new string[] {"LogiX/NeosPlus/Math/Matrix"})] public sealed class GaussianElimination_double3x3 : LogixOperator { public readonly Input LinearEquationMatrix; diff --git a/NEOSPlus/Logix/Math/Matrix/GaussianElimination_double4x4.cs b/NEOSPlus/Logix/Math/Matrix/GaussianElimination_double4x4.cs index baf7057..79f2b9c 100644 --- a/NEOSPlus/Logix/Math/Matrix/GaussianElimination_double4x4.cs +++ b/NEOSPlus/Logix/Math/Matrix/GaussianElimination_double4x4.cs @@ -8,7 +8,7 @@ namespace FrooxEngine.LogiX.Math [HiddenNode] // Hide overload from node browser [NodeName("Reduced Echelon Form")] [NodeOverload("Reduced-Echelon-Form")] - [Category(new string[] {"LogiX/Math/Matrix"})] + [Category(new string[] {"LogiX/NeosPlus/Math/Matrix"})] public sealed class GaussianElimination_double4x4 : LogixOperator { public readonly Input LinearEquationMatrix; diff --git a/NEOSPlus/Logix/Math/Matrix/GaussianElimination_float2x2.cs b/NEOSPlus/Logix/Math/Matrix/GaussianElimination_float2x2.cs index fa7fccf..a799bd7 100644 --- a/NEOSPlus/Logix/Math/Matrix/GaussianElimination_float2x2.cs +++ b/NEOSPlus/Logix/Math/Matrix/GaussianElimination_float2x2.cs @@ -7,7 +7,7 @@ namespace FrooxEngine.LogiX.Math { [NodeName("Reduced Echelon Form")] [NodeOverload("Reduced-Echelon-Form")] - [Category(new string[] {"LogiX/Math/Matrix"})] + [Category(new string[] {"LogiX/NeosPlus/Math/Matrix"})] // GaussJordanElimination public sealed class GaussianElimination_float2x2 : LogixOperator diff --git a/NEOSPlus/Logix/Math/Matrix/GaussianElimination_float3x3.cs b/NEOSPlus/Logix/Math/Matrix/GaussianElimination_float3x3.cs index 868c470..f88ebe6 100644 --- a/NEOSPlus/Logix/Math/Matrix/GaussianElimination_float3x3.cs +++ b/NEOSPlus/Logix/Math/Matrix/GaussianElimination_float3x3.cs @@ -8,7 +8,7 @@ namespace FrooxEngine.LogiX.Math [HiddenNode] // Hide overload from node browser [NodeName("Reduced Echelon Form")] [NodeOverload("Reduced-Echelon-Form")] - [Category(new string[] {"LogiX/Math/Matrix"})] + [Category(new string[] {"LogiX/NeosPlus/Math/Matrix"})] public sealed class GaussianElimination : LogixOperator { public readonly Input LinearEquationMatrix; diff --git a/NEOSPlus/Logix/Math/Matrix/GaussianElimination_float4x4.cs b/NEOSPlus/Logix/Math/Matrix/GaussianElimination_float4x4.cs index d56a206..57e89c8 100644 --- a/NEOSPlus/Logix/Math/Matrix/GaussianElimination_float4x4.cs +++ b/NEOSPlus/Logix/Math/Matrix/GaussianElimination_float4x4.cs @@ -8,7 +8,7 @@ namespace FrooxEngine.LogiX.Math [HiddenNode] // Hide overload from node browser [NodeName("Reduced Echelon Form")] [NodeOverload("Reduced-Echelon-Form")] - [Category(new string[] {"LogiX/Math/Matrix"})] + [Category(new string[] {"LogiX/NeosPlus/Math/Matrix"})] public sealed class GaussianElimination_float4x4 : LogixOperator { public readonly Input LinearEquationMatrix; diff --git a/NEOSPlus/Logix/Math/Physics/CentripetalForceNode.cs b/NEOSPlus/Logix/Math/Physics/CentripetalForceNode.cs index 9b82e75..d60195c 100644 --- a/NEOSPlus/Logix/Math/Physics/CentripetalForceNode.cs +++ b/NEOSPlus/Logix/Math/Physics/CentripetalForceNode.cs @@ -1,12 +1,27 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using BaseX; -namespace NEOSPlus.Logix.Math.Physics +namespace FrooxEngine.LogiX.Math.Physics; + +[NodeName("Centripetal Force Calculation")] +[Category(new string[] { "LogiX/NeosPlus/Math/Physics" })] +internal class CentripetalForceNode : LogixNode { - internal class FileName + public readonly Input Mass; // Mass of the object + public readonly Input Velocity; // Tangential velocity of the object + public readonly Input Radius; // Radius of the circular path + + public readonly Output CentripetalForce; // Centripetal force acting on the object + + protected override void OnEvaluate() { + float m = Mass.EvaluateRaw(); + float v = Velocity.EvaluateRaw(); + float r = Radius.EvaluateRaw(); + + float force = (m * v * v) / r; + + CentripetalForce.Value = force; } } + diff --git a/NEOSPlus/Logix/Math/Physics/KineticFrictionNode.cs b/NEOSPlus/Logix/Math/Physics/KineticFrictionNode.cs index 5c3b389..e3c21e3 100644 --- a/NEOSPlus/Logix/Math/Physics/KineticFrictionNode.cs +++ b/NEOSPlus/Logix/Math/Physics/KineticFrictionNode.cs @@ -4,7 +4,7 @@ namespace FrooxEngine.LogiX.Math; [NodeName("Kinetic Friction Calculation")] -[Category(new string[] { "LogiX/Math/Physics" })] +[Category(new string[] { "LogiX/NeosPlus/Math/Physics" })] internal class KineticFrictionNode : LogixNode { public readonly Input NormalForce; // Assuming it's a 3D force, change as needed diff --git a/NEOSPlus/Logix/Math/Physics/Refractions.cs b/NEOSPlus/Logix/Math/Physics/Refractions.cs index 2e00d4f..ad1fb05 100644 --- a/NEOSPlus/Logix/Math/Physics/Refractions.cs +++ b/NEOSPlus/Logix/Math/Physics/Refractions.cs @@ -4,7 +4,7 @@ namespace FrooxEngine.LogiX.Math; [NodeName("Refraction Calculation")] -[Category(new string[] { "LogiX/Math/Physics" })] +[Category(new string[] { "LogiX/NeosPlus/Math/Physics" })] internal class RefractionNode : LogixNode { public readonly Input RefractiveIndex1; // Refractive index of medium 1 diff --git a/NEOSPlus/Logix/Math/Random/RandomBool2.cs b/NEOSPlus/Logix/Math/Random/RandomBool2.cs index b6d8f38..851d392 100644 --- a/NEOSPlus/Logix/Math/Random/RandomBool2.cs +++ b/NEOSPlus/Logix/Math/Random/RandomBool2.cs @@ -3,7 +3,7 @@ namespace FrooxEngine.LogiX.Math { - [Category("LogiX/Math/Random")] + [Category("LogiX/NeosPlus/Math/Random")] [NodeName("Random Bool2")] public class RandomBool2 : LogixNode { diff --git a/NEOSPlus/Logix/Math/Random/RandomBool3.cs b/NEOSPlus/Logix/Math/Random/RandomBool3.cs index e21aaf9..2271998 100644 --- a/NEOSPlus/Logix/Math/Random/RandomBool3.cs +++ b/NEOSPlus/Logix/Math/Random/RandomBool3.cs @@ -3,7 +3,7 @@ namespace FrooxEngine.LogiX.Math { - [Category("LogiX/Math/Random")] + [Category("LogiX/NeosPlus/Math/Random")] [NodeName("Random Bool3")] public class RandomBool3 : LogixNode { diff --git a/NEOSPlus/Logix/Math/Random/RandomBool4.cs b/NEOSPlus/Logix/Math/Random/RandomBool4.cs index 5212920..7ab834e 100644 --- a/NEOSPlus/Logix/Math/Random/RandomBool4.cs +++ b/NEOSPlus/Logix/Math/Random/RandomBool4.cs @@ -3,7 +3,7 @@ namespace FrooxEngine.LogiX.Math { - [Category("LogiX/Math/Random")] + [Category("LogiX/NeosPlus/Math/Random")] [NodeName("Random Bool4")] public class RandomBool4 : LogixNode { diff --git a/NEOSPlus/Logix/Math/Random/RandomCharacter.cs b/NEOSPlus/Logix/Math/Random/RandomCharacter.cs index 99c3d5f..9197683 100644 --- a/NEOSPlus/Logix/Math/Random/RandomCharacter.cs +++ b/NEOSPlus/Logix/Math/Random/RandomCharacter.cs @@ -2,7 +2,7 @@ namespace FrooxEngine.LogiX.Math { - [Category("LogiX/Math/Random")] + [Category("LogiX/NeosPlus/Math/Random")] [NodeName("Random Character")] public class RandomCharacter : LogixNode { diff --git a/NEOSPlus/Logix/Math/Random/RandomDouble.cs b/NEOSPlus/Logix/Math/Random/RandomDouble.cs index 243e44c..0697db6 100644 --- a/NEOSPlus/Logix/Math/Random/RandomDouble.cs +++ b/NEOSPlus/Logix/Math/Random/RandomDouble.cs @@ -3,7 +3,7 @@ namespace FrooxEngine.LogiX.Math { - [Category("LogiX/Math/Random")] + [Category("LogiX/NeosPlus/Math/Random")] [NodeName("Random Double")] public class RandomDouble : LogixNode { diff --git a/NEOSPlus/Logix/Math/Random/RandomEuler.cs b/NEOSPlus/Logix/Math/Random/RandomEuler.cs index 4cfbe89..df7c404 100644 --- a/NEOSPlus/Logix/Math/Random/RandomEuler.cs +++ b/NEOSPlus/Logix/Math/Random/RandomEuler.cs @@ -2,7 +2,7 @@ using FrooxEngine; using FrooxEngine.LogiX; -[Category("LogiX/Math/Random")] +[Category("LogiX/NeosPlus/Math/Random")] [NodeName("Random Euler Angles")] public class RandomEulerAngles : LogixNode { diff --git a/NEOSPlus/Logix/Math/Random/RandomInt2.cs b/NEOSPlus/Logix/Math/Random/RandomInt2.cs index 55ddd7f..7e121b4 100644 --- a/NEOSPlus/Logix/Math/Random/RandomInt2.cs +++ b/NEOSPlus/Logix/Math/Random/RandomInt2.cs @@ -3,7 +3,7 @@ namespace FrooxEngine.LogiX.Math { - [Category("LogiX/Math/Random")] + [Category("LogiX/NeosPlus/Math/Random")] [NodeName("Random Int2")] public class RandomInt2 : LogixNode { diff --git a/NEOSPlus/Logix/Math/Random/RandomInt3.cs b/NEOSPlus/Logix/Math/Random/RandomInt3.cs index 71fdc04..d6f9f2b 100644 --- a/NEOSPlus/Logix/Math/Random/RandomInt3.cs +++ b/NEOSPlus/Logix/Math/Random/RandomInt3.cs @@ -3,7 +3,7 @@ namespace FrooxEngine.LogiX.Math { - [Category("LogiX/Math/Random")] + [Category("LogiX/NeosPlus/Math/Random")] [NodeName("Random Int3")] public class RandomInt3 : LogixNode { diff --git a/NEOSPlus/Logix/Math/Random/RandomInt4.cs b/NEOSPlus/Logix/Math/Random/RandomInt4.cs index e815bc7..3b8cd8b 100644 --- a/NEOSPlus/Logix/Math/Random/RandomInt4.cs +++ b/NEOSPlus/Logix/Math/Random/RandomInt4.cs @@ -3,7 +3,7 @@ namespace FrooxEngine.LogiX.Math { - [Category("LogiX/Math/Random")] + [Category("LogiX/NeosPlus/Math/Random")] [NodeName("Random Int4")] public class RandomInt4 : LogixNode { diff --git a/NEOSPlus/Logix/Math/Random/RandomLetter.cs b/NEOSPlus/Logix/Math/Random/RandomLetter.cs index 8f3f688..33a30e7 100644 --- a/NEOSPlus/Logix/Math/Random/RandomLetter.cs +++ b/NEOSPlus/Logix/Math/Random/RandomLetter.cs @@ -2,7 +2,7 @@ namespace FrooxEngine.LogiX.Math { - [Category("LogiX/Math/Random")] + [Category("LogiX/NeosPlus/Math/Random")] [NodeName("Random Letter")] public class RandomLetter : LogixNode { diff --git a/NEOSPlus/Logix/Math/Sorting/SortNode.cs b/NEOSPlus/Logix/Math/Sorting/SortNode.cs index 0cd6373..1d605c1 100644 --- a/NEOSPlus/Logix/Math/Sorting/SortNode.cs +++ b/NEOSPlus/Logix/Math/Sorting/SortNode.cs @@ -12,7 +12,7 @@ namespace FrooxEngine.Logix.Math.Sorting { [NodeName("Sort")] - [Category("LogiX/Math")] + [Category("LogiX/NeosPlus/Math")] [NodeDefaultType(typeof(Sort))] public class Sort : LogixNode where T : IComparable { diff --git a/NEOSPlus/Logix/Network/ART-NET/ArtNetChannelDataExtractor.cs b/NEOSPlus/Logix/Network/ART-NET/ArtNetChannelDataExtractor.cs index bba5012..094b35b 100644 --- a/NEOSPlus/Logix/Network/ART-NET/ArtNetChannelDataExtractor.cs +++ b/NEOSPlus/Logix/Network/ART-NET/ArtNetChannelDataExtractor.cs @@ -1,7 +1,7 @@ using FrooxEngine; using FrooxEngine.LogiX; -[Category("LogiX/Network/ART-NET")] +[Category("LogiX/NeosPlus/Network/ART-NET")] public class ArtNetChannelDataExtractor : LogixNode { public readonly Input Data; diff --git a/NEOSPlus/Logix/Network/ART-NET/ArtNetReceiverConnect.cs b/NEOSPlus/Logix/Network/ART-NET/ArtNetReceiverConnect.cs index 2c59381..1407813 100644 --- a/NEOSPlus/Logix/Network/ART-NET/ArtNetReceiverConnect.cs +++ b/NEOSPlus/Logix/Network/ART-NET/ArtNetReceiverConnect.cs @@ -2,7 +2,7 @@ using FrooxEngine; using FrooxEngine.LogiX; -[Category(new string[] { "LogiX/Network/ART-NET" })] +[Category(new string[] { "LogiX/NeosPlus/Network/ART-NET" })] public class ArtNetReceiverConnect : LogixNode { public readonly Input Receiver; diff --git a/NEOSPlus/Logix/Network/ART-NET/ArtNetUniverseDataReceiver.cs b/NEOSPlus/Logix/Network/ART-NET/ArtNetUniverseDataReceiver.cs index 0ed43eb..7d22e33 100644 --- a/NEOSPlus/Logix/Network/ART-NET/ArtNetUniverseDataReceiver.cs +++ b/NEOSPlus/Logix/Network/ART-NET/ArtNetUniverseDataReceiver.cs @@ -3,7 +3,7 @@ using System; using BaseX; -[Category(new string[] { "LogiX/Network/ART-NET" })] +[Category(new string[] { "LogiX/NeosPlus/Network/ART-NET" })] public class ArtNetUniverseDataReceiver : ArtNetReceiverBaseNode { diff --git a/NEOSPlus/Logix/Network/GetStockPrice.cs b/NEOSPlus/Logix/Network/GetStockPrice.cs index cb80d33..e1d4f40 100644 --- a/NEOSPlus/Logix/Network/GetStockPrice.cs +++ b/NEOSPlus/Logix/Network/GetStockPrice.cs @@ -8,7 +8,7 @@ namespace FrooxEngine.LogiX.Network { - [Category("LogiX/Network")] + [Category("LogiX/NeosPlus/Network")] [NodeName("Get Stock Price")] public class GetStockPriceNode : LogixNode { diff --git a/NEOSPlus/Logix/Network/HTTPRequest.cs b/NEOSPlus/Logix/Network/HTTPRequest.cs index fe58a36..6214510 100644 --- a/NEOSPlus/Logix/Network/HTTPRequest.cs +++ b/NEOSPlus/Logix/Network/HTTPRequest.cs @@ -10,7 +10,7 @@ namespace FrooxEngine.LogiX.Network { - [Category("LogiX/Network")] + [Category("LogiX/NeosPlus/Network")] [NodeName("HTTP Request")] public class HTTPRequest : LogixNode { diff --git a/NEOSPlus/Logix/Network/RSSFeed.cs b/NEOSPlus/Logix/Network/RSSFeed.cs index a289d2d..0d9a1a1 100644 --- a/NEOSPlus/Logix/Network/RSSFeed.cs +++ b/NEOSPlus/Logix/Network/RSSFeed.cs @@ -9,7 +9,7 @@ namespace FrooxEngine.LogiX.Network { - [Category("LogiX/Network")] + [Category("LogiX/NeosPlus/Network")] [NodeName("RSS Feed")] public class RSSFeedNode : LogixNode { diff --git a/NEOSPlus/Logix/Network/YouTube/SearchVideo.cs b/NEOSPlus/Logix/Network/YouTube/SearchVideo.cs index f71b5c4..cd91aaa 100644 --- a/NEOSPlus/Logix/Network/YouTube/SearchVideo.cs +++ b/NEOSPlus/Logix/Network/YouTube/SearchVideo.cs @@ -10,7 +10,7 @@ namespace FrooxEngine.LogiX.Network { - [Category("LogiX/Network/YouTube")] + [Category("LogiX/NeosPlus/Network/YouTube")] [NodeName("Search YouTube Videos")] public class SearchVideosNode : LogixNode { diff --git a/NEOSPlus/Logix/Operators/GetValue.cs b/NEOSPlus/Logix/Operators/GetValue.cs index 50033f7..1be96a7 100644 --- a/NEOSPlus/Logix/Operators/GetValue.cs +++ b/NEOSPlus/Logix/Operators/GetValue.cs @@ -11,7 +11,7 @@ namespace FrooxEngine.LogiX.Operators /// By JackTheFoxOtter /// /// - [Category("LogiX/Operators")] + [Category("LogiX/NeosPlus/Operators")] [NodeName("Get Value")] public class GetValue : LogixOperator { diff --git a/NEOSPlus/Logix/Operators/ZeroOneI.cs b/NEOSPlus/Logix/Operators/ZeroOneI.cs index 9f04abc..4a02aaa 100644 --- a/NEOSPlus/Logix/Operators/ZeroOneI.cs +++ b/NEOSPlus/Logix/Operators/ZeroOneI.cs @@ -6,7 +6,7 @@ //01I Adds a integer output of bool namespace FrooxEngine.LogiX.Operators { - [Category("LogiX/Operators")] + [Category("LogiX/NeosPlus/Operators")] [NodeName("0 1 I")] public class ZeroOneI : LogixOperator { diff --git a/NEOSPlus/Logix/Playback/IsPaused.cs b/NEOSPlus/Logix/Playback/IsPaused.cs index 9d85e30..81c643c 100644 --- a/NEOSPlus/Logix/Playback/IsPaused.cs +++ b/NEOSPlus/Logix/Playback/IsPaused.cs @@ -2,7 +2,7 @@ namespace FrooxEngine.LogiX.Playback { - [Category("LogiX/Playback")] + [Category("LogiX/NeosPlus/Playback")] [NodeName("IsPaused")] public class IsPaused : LogixOperator { diff --git a/NEOSPlus/Logix/Playback/IsStopped.cs b/NEOSPlus/Logix/Playback/IsStopped.cs index 1d87b38..ec7a5ed 100644 --- a/NEOSPlus/Logix/Playback/IsStopped.cs +++ b/NEOSPlus/Logix/Playback/IsStopped.cs @@ -2,7 +2,7 @@ namespace FrooxEngine.LogiX.Playback { - [Category("LogiX/Playback")] + [Category("LogiX/NeosPlus/Playback")] [NodeName("IsStopped")] public class IsStopped : LogixOperator { diff --git a/NEOSPlus/Logix/References/ExtractIDs.cs b/NEOSPlus/Logix/References/ExtractIDs.cs index ad28baf..dbc5575 100644 --- a/NEOSPlus/Logix/References/ExtractIDs.cs +++ b/NEOSPlus/Logix/References/ExtractIDs.cs @@ -2,7 +2,7 @@ using FrooxEngine; using FrooxEngine.LogiX; -[Category("LogiX/References")] +[Category("LogiX/NeosPlus/References")] [NodeName("Extract IDs")] public class ExtractIDs : LogixNode { diff --git a/NEOSPlus/Logix/Slots/CreateEmptySlot.cs b/NEOSPlus/Logix/Slots/CreateEmptySlot.cs index 318019b..8e2affb 100644 --- a/NEOSPlus/Logix/Slots/CreateEmptySlot.cs +++ b/NEOSPlus/Logix/Slots/CreateEmptySlot.cs @@ -2,7 +2,7 @@ namespace FrooxEngine.LogiX.Slots { - [Category("LogiX/Slots")] + [Category("LogiX/NeosPlus/Slots")] [NodeName("Create Empty Slot")] public class CreateEmptySlot : LogixNode { diff --git a/NEOSPlus/Logix/Slots/GetChildrenWithTag.cs b/NEOSPlus/Logix/Slots/GetChildrenWithTag.cs index 3e7a863..3a8a2a1 100644 --- a/NEOSPlus/Logix/Slots/GetChildrenWithTag.cs +++ b/NEOSPlus/Logix/Slots/GetChildrenWithTag.cs @@ -2,7 +2,7 @@ using FrooxEngine.LogiX; using System.Collections.Generic; -[Category("LogiX/Slots")] +[Category("LogiX/NeosPlus/Slots")] [NodeName("Get Children With Tag")] public class GetChildrenWithTag : LogixNode { diff --git a/NEOSPlus/Logix/Slots/GetGrandparent.cs b/NEOSPlus/Logix/Slots/GetGrandparent.cs index 93401ca..f619524 100644 --- a/NEOSPlus/Logix/Slots/GetGrandparent.cs +++ b/NEOSPlus/Logix/Slots/GetGrandparent.cs @@ -8,7 +8,7 @@ namespace FrooxEngine.LogiX.Slots { - [Category("LogiX/Slots")] + [Category("LogiX/NeosPlus/Slots")] [NodeName("Get Grandparent")] public class GetGrandparent : LogixOperator { diff --git a/NEOSPlus/Logix/String/CountSubstring.cs b/NEOSPlus/Logix/String/CountSubstring.cs index 5950a85..c1292c5 100644 --- a/NEOSPlus/Logix/String/CountSubstring.cs +++ b/NEOSPlus/Logix/String/CountSubstring.cs @@ -8,7 +8,7 @@ namespace FrooxEngine.LogiX.String { - [Category("LogiX/String")] + [Category("LogiX/NeosPlus/String")] [NodeName("Count Substring")] public class CountSubstring : LogixOperator { diff --git a/NEOSPlus/Logix/String/DecodeBase64.cs b/NEOSPlus/Logix/String/DecodeBase64.cs index 1772cab..8829842 100644 --- a/NEOSPlus/Logix/String/DecodeBase64.cs +++ b/NEOSPlus/Logix/String/DecodeBase64.cs @@ -3,7 +3,7 @@ namespace FrooxEngine.LogiX.String { - [Category("LogiX/String")] + [Category("LogiX/NeosPlus/String")] [NodeName("Decode Base64")] public class DecodeBase64 : LogixOperator { diff --git a/NEOSPlus/Logix/String/DecodeMorse.cs b/NEOSPlus/Logix/String/DecodeMorse.cs index 76c8504..c760743 100644 --- a/NEOSPlus/Logix/String/DecodeMorse.cs +++ b/NEOSPlus/Logix/String/DecodeMorse.cs @@ -4,7 +4,7 @@ namespace FrooxEngine.LogiX.String; -[Category("LogiX/String")] +[Category("LogiX/NeosPlus/String")] [NodeName("Decode Morse")] public class DecodeMorse : LogixOperator { diff --git a/NEOSPlus/Logix/String/EncodeBase64.cs b/NEOSPlus/Logix/String/EncodeBase64.cs index 09bd03c..5649a44 100644 --- a/NEOSPlus/Logix/String/EncodeBase64.cs +++ b/NEOSPlus/Logix/String/EncodeBase64.cs @@ -3,7 +3,7 @@ namespace FrooxEngine.LogiX.String { - [Category("LogiX/String")] + [Category("LogiX/NeosPlus/String")] [NodeName("Encode Base64")] public class EncodeBase64 : LogixOperator { diff --git a/NEOSPlus/Logix/String/EncodeMD5.cs b/NEOSPlus/Logix/String/EncodeMD5.cs index e427694..6268beb 100644 --- a/NEOSPlus/Logix/String/EncodeMD5.cs +++ b/NEOSPlus/Logix/String/EncodeMD5.cs @@ -4,7 +4,7 @@ namespace FrooxEngine.LogiX.String { - [Category("LogiX/String")] + [Category("LogiX/NeosPlus/String")] [NodeName("Encode MD5")] public class EncodeMD5 : LogixOperator { diff --git a/NEOSPlus/Logix/String/EncodeMorse.cs b/NEOSPlus/Logix/String/EncodeMorse.cs index 22942c2..97707b9 100644 --- a/NEOSPlus/Logix/String/EncodeMorse.cs +++ b/NEOSPlus/Logix/String/EncodeMorse.cs @@ -4,7 +4,7 @@ namespace FrooxEngine.LogiX.String; -[Category("LogiX/String")] +[Category("LogiX/NeosPlus/String")] [NodeName("Encode Morse")] public class EncodeMorse : LogixOperator { diff --git a/NEOSPlus/Logix/String/EncodeSha256.cs b/NEOSPlus/Logix/String/EncodeSha256.cs index 17bbb0f..1ada8b1 100644 --- a/NEOSPlus/Logix/String/EncodeSha256.cs +++ b/NEOSPlus/Logix/String/EncodeSha256.cs @@ -4,7 +4,7 @@ namespace FrooxEngine.LogiX.String { - [Category("LogiX/String")] + [Category("LogiX/NeosPlus/String")] [NodeName("Encode Sha256")] public class EncodeSha256 : LogixOperator { diff --git a/NEOSPlus/Logix/String/HMAC.cs b/NEOSPlus/Logix/String/HMAC.cs index 0d16e7d..a415459 100644 --- a/NEOSPlus/Logix/String/HMAC.cs +++ b/NEOSPlus/Logix/String/HMAC.cs @@ -13,7 +13,7 @@ public enum HashFunction SHA512 } -[Category("LogiX/String")] +[Category("LogiX/NeosPlus/String")] [NodeName("HMAC")] public class HMACNode : LogixNode { diff --git a/NEOSPlus/Logix/String/HammingDistance.cs b/NEOSPlus/Logix/String/HammingDistance.cs index 6641532..b3393c3 100644 --- a/NEOSPlus/Logix/String/HammingDistance.cs +++ b/NEOSPlus/Logix/String/HammingDistance.cs @@ -3,7 +3,7 @@ namespace FrooxEngine.LogiX.String { - [Category("LogiX/String")] + [Category("LogiX/NeosPlus/String")] [NodeName("Hamming Distance")] public class HammingDistance : LogixOperator { diff --git a/NEOSPlus/Logix/String/HammingDistanceNonNullable.cs b/NEOSPlus/Logix/String/HammingDistanceNonNullable.cs index 2c18e29..e9f44f0 100644 --- a/NEOSPlus/Logix/String/HammingDistanceNonNullable.cs +++ b/NEOSPlus/Logix/String/HammingDistanceNonNullable.cs @@ -3,7 +3,7 @@ namespace FrooxEngine.LogiX.String { - [Category("LogiX/String")] + [Category("LogiX/NeosPlus/String")] [NodeName("Hamming Distance NonNullable")] public class HammingDistanceNonNullable : LogixOperator { diff --git a/NEOSPlus/Logix/Transform/ValueInequalityDriver.cs b/NEOSPlus/Logix/Transform/ValueInequalityDriver.cs index 02a7d02..43b30fe 100644 --- a/NEOSPlus/Logix/Transform/ValueInequalityDriver.cs +++ b/NEOSPlus/Logix/Transform/ValueInequalityDriver.cs @@ -2,7 +2,7 @@ using BaseX; using FrooxEngine; -[Category(new string[] {"Transform/Drivers"})] +[Category(new string[] {"Transform/NeosPlus/Drivers"})] [GenericTypes(GenericTypes.Group.NeosPrimitives)] public class ValueInequalityDriver : Component { diff --git a/NEOSPlus/Logix/Users/AllUsers.cs b/NEOSPlus/Logix/Users/AllUsers.cs index 4976032..1242673 100644 --- a/NEOSPlus/Logix/Users/AllUsers.cs +++ b/NEOSPlus/Logix/Users/AllUsers.cs @@ -4,7 +4,7 @@ namespace FrooxEngine.LogiX.Users { [NodeName("All Users")] - [Category("LogiX/Users", "LogiX/Collections")] + [Category("LogiX/NeosPlus/Users", "LogiX/NeosPlus/Collections")] public class AllUsers : LogixOperator> { public override ReadOnlyCollection Content => new(World.AllUsers.ToArray()); diff --git a/NEOSPlus/Logix/Users/IsUserEyeTracking.cs b/NEOSPlus/Logix/Users/IsUserEyeTracking.cs index e670898..4ff2f08 100644 --- a/NEOSPlus/Logix/Users/IsUserEyeTracking.cs +++ b/NEOSPlus/Logix/Users/IsUserEyeTracking.cs @@ -1,7 +1,7 @@ using FrooxEngine; using FrooxEngine.LogiX; -[Category("LogiX/Users")] +[Category("LogiX/NeosPlus/Users")] [NodeName("IsUserEyeTracking")] public class IsUserEyeTracking : LogixNode { diff --git a/NEOSPlus/Logix/Users/IsUserInSeatedMode.cs b/NEOSPlus/Logix/Users/IsUserInSeatedMode.cs index 6eb94d4..94429ba 100644 --- a/NEOSPlus/Logix/Users/IsUserInSeatedMode.cs +++ b/NEOSPlus/Logix/Users/IsUserInSeatedMode.cs @@ -2,7 +2,7 @@ namespace FrooxEngine.LogiX.Users { - [Category("LogiX/Users")] + [Category("LogiX/NeosPlus/Users")] [NodeName("Is User In Seated Mode")] public class IsUserInSeatedMode : LogixOperator { diff --git a/NEOSPlus/Logix/Users/IsUserScaling.cs b/NEOSPlus/Logix/Users/IsUserScaling.cs index a9186bb..3ad2e86 100644 --- a/NEOSPlus/Logix/Users/IsUserScaling.cs +++ b/NEOSPlus/Logix/Users/IsUserScaling.cs @@ -1,6 +1,6 @@ namespace FrooxEngine.LogiX.Users { - [Category(new string[] {"LogiX/Users"})] + [Category(new string[] {"LogiX/NeosPlus/Users"})] [NodeName("Is User Scaling")] public class IsUserScaling : LogixOperator { diff --git a/NEOSPlus/Logix/Users/SetUserScaling.cs b/NEOSPlus/Logix/Users/SetUserScaling.cs index 94650f1..17efa8f 100644 --- a/NEOSPlus/Logix/Users/SetUserScaling.cs +++ b/NEOSPlus/Logix/Users/SetUserScaling.cs @@ -1,6 +1,6 @@ namespace FrooxEngine.LogiX.Users { - [Category(new string[] {"LogiX/Users"})] + [Category(new string[] {"LogiX/NeosPlus/Users"})] [NodeName("Set User Scaling")] public class SetUserScaling : LogixNode { diff --git a/NEOSPlus/Logix/Utility/Write To Log.cs b/NEOSPlus/Logix/Utility/Write To Log.cs index de975fb..a5fc4ee 100644 --- a/NEOSPlus/Logix/Utility/Write To Log.cs +++ b/NEOSPlus/Logix/Utility/Write To Log.cs @@ -11,7 +11,7 @@ public enum LogSeverity Error } - [Category("LogiX/Utility")] + [Category("LogiX/NeosPlus/Utility")] [NodeName("Write to Log")] public class WriteToLog : LogixNode { diff --git a/NEOSPlus/Logix/Web3/Crypto/CoinGecko.cs b/NEOSPlus/Logix/Web3/Crypto/CoinGecko.cs index fd27b73..fc3ba8d 100644 --- a/NEOSPlus/Logix/Web3/Crypto/CoinGecko.cs +++ b/NEOSPlus/Logix/Web3/Crypto/CoinGecko.cs @@ -16,7 +16,7 @@ public enum Currencyinput } [NodeName("Coingecko")] - [Category("LogiX/Web3/Crypto")] + [Category("LogiX/NeosPlus/Web3/Crypto")] public class Coingecko : LogixNode { private const string priceEndpoint = "https://api.coingecko.com/api/v3/simple/price?ids={0}&vs_currencies={1}"; diff --git a/NEOSPlus/Logix/Web3/Crypto/Current Gas Price.cs b/NEOSPlus/Logix/Web3/Crypto/Current Gas Price.cs index 975dddf..05d734a 100644 --- a/NEOSPlus/Logix/Web3/Crypto/Current Gas Price.cs +++ b/NEOSPlus/Logix/Web3/Crypto/Current Gas Price.cs @@ -10,7 +10,7 @@ namespace FrooxEngine.LogiX.Web3 /// /// was going to use the netherium library but i didnt want to add more external dependencies to this plugin. - xlinka /// - [Category("LogiX/Web3/Crypto")] + [Category("LogiX/NeosPlus/Web3/Crypto")] [NodeName("Current Gas Price")] public class GasPriceNode : LogixNode { diff --git a/NEOSPlus/Logix/Web3/Crypto/Market Token Price.cs b/NEOSPlus/Logix/Web3/Crypto/Market Token Price.cs index 2361676..b754d93 100644 --- a/NEOSPlus/Logix/Web3/Crypto/Market Token Price.cs +++ b/NEOSPlus/Logix/Web3/Crypto/Market Token Price.cs @@ -14,7 +14,7 @@ public enum Platform } [NodeName("Market Token Price")] - [Category("LogiX/Web3/Crypto")] + [Category("LogiX/NeosPlus/Web3/Crypto")] public class TokenPrice : LogixNode { private const string graphApiUrlV2 = "https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v2"; From d555f0cad6b0bca1e0670da97c7da07a8ea940b2 Mon Sep 17 00:00:00 2001 From: xLinka Date: Thu, 14 Sep 2023 10:53:26 +0100 Subject: [PATCH 53/54] Components --- NEOSPlus/Components/Assets/DynamicMesh.cs | 2 +- NEOSPlus/Components/Assets/MengerSponge.cs | 2 +- NEOSPlus/Components/Assets/MobiusStripMesh.cs | 2 +- NEOSPlus/Components/Assets/SierpinskiPyramidMesh.cs | 2 +- NEOSPlus/Components/Collections/ReferenceFieldList.cs | 2 +- NEOSPlus/Components/Collections/ValueFieldList.cs | 2 +- NEOSPlus/Components/Network/ArtNetReceiver.cs | 2 +- NEOSPlus/Components/Physics/Cloth/ClothCapsuleCollider.cs | 2 +- NEOSPlus/Components/Physics/Cloth/ClothSimulation.cs | 2 +- NEOSPlus/Components/Physics/Cloth/ClothSphereCollider.cs | 2 +- .../Transform/Drivers/MultiValueArithmeticDriver.cs | 2 +- NEOSPlus/Components/Utility/BoundingBoxUserTracker.cs | 2 +- NEOSPlus/Components/Utility/GrabberSimulator.cs | 2 +- NEOSPlus/Components/Wizards/ComponentBreakdown.cs | 2 +- NEOSPlus/Components/Wizards/LODWizard.cs | 4 ++-- NEOSPlus/Components/Wizards/LightSourceWizard.cs | 2 +- NEOSPlus/Components/Wizards/MeshColliderManagementTools.cs | 2 +- 17 files changed, 18 insertions(+), 18 deletions(-) diff --git a/NEOSPlus/Components/Assets/DynamicMesh.cs b/NEOSPlus/Components/Assets/DynamicMesh.cs index f129880..188c3f2 100644 --- a/NEOSPlus/Components/Assets/DynamicMesh.cs +++ b/NEOSPlus/Components/Assets/DynamicMesh.cs @@ -5,7 +5,7 @@ namespace FrooxEngine { - [Category("Assets/Procedural Meshes")] + [Category("NeosPlus/Assets/Procedural Meshes")] public class DynamicMesh : ProceduralMesh, ICustomInspector { public readonly Sync Normals; diff --git a/NEOSPlus/Components/Assets/MengerSponge.cs b/NEOSPlus/Components/Assets/MengerSponge.cs index 0f98ed4..aee116e 100644 --- a/NEOSPlus/Components/Assets/MengerSponge.cs +++ b/NEOSPlus/Components/Assets/MengerSponge.cs @@ -2,7 +2,7 @@ namespace FrooxEngine { - [Category(new string[] { "Assets/Procedural Meshes" })] + [Category(new string[] { "NeosPlus/Assets/Procedural Meshes" })] public class MengerSpongeMesh : ProceduralMesh { [Range(1, 4)] public readonly Sync Subdivisions; diff --git a/NEOSPlus/Components/Assets/MobiusStripMesh.cs b/NEOSPlus/Components/Assets/MobiusStripMesh.cs index 3d5118f..000bd18 100644 --- a/NEOSPlus/Components/Assets/MobiusStripMesh.cs +++ b/NEOSPlus/Components/Assets/MobiusStripMesh.cs @@ -2,7 +2,7 @@ namespace FrooxEngine { - [Category(new string[] { "Assets/Procedural Meshes" })] + [Category(new string[] { "NeosPlus/Assets/Procedural Meshes" })] public class MobiusStripMesh : ProceduralMesh { [Range(3, 50)] public readonly Sync Sides; diff --git a/NEOSPlus/Components/Assets/SierpinskiPyramidMesh.cs b/NEOSPlus/Components/Assets/SierpinskiPyramidMesh.cs index 960c7ed..00027a5 100644 --- a/NEOSPlus/Components/Assets/SierpinskiPyramidMesh.cs +++ b/NEOSPlus/Components/Assets/SierpinskiPyramidMesh.cs @@ -2,7 +2,7 @@ namespace FrooxEngine { - [Category(new string[] {"Assets/Procedural Meshes"})] + [Category(new string[] {"NeosPlus/Assets/Procedural Meshes"})] public class SierpinskiPyramidMesh : ProceduralMesh { [Range(1, 9)] public readonly Sync Subdivisions; diff --git a/NEOSPlus/Components/Collections/ReferenceFieldList.cs b/NEOSPlus/Components/Collections/ReferenceFieldList.cs index c0cc0c4..60bbf2e 100644 --- a/NEOSPlus/Components/Collections/ReferenceFieldList.cs +++ b/NEOSPlus/Components/Collections/ReferenceFieldList.cs @@ -2,7 +2,7 @@ namespace FrooxEngine; -[Category("Data")] +[Category("NeosPlus/Data")] public class ReferenceFieldList : Component where T : class, IWorldElement { public readonly SyncRefList Value; diff --git a/NEOSPlus/Components/Collections/ValueFieldList.cs b/NEOSPlus/Components/Collections/ValueFieldList.cs index bd28bf7..d09a0b8 100644 --- a/NEOSPlus/Components/Collections/ValueFieldList.cs +++ b/NEOSPlus/Components/Collections/ValueFieldList.cs @@ -2,7 +2,7 @@ namespace FrooxEngine; -[Category("Data")] +[Category("NeosPlus/Data")] [GenericTypes(GenericTypes.Group.NeosPrimitives)] public class ValueFieldList : Component { diff --git a/NEOSPlus/Components/Network/ArtNetReceiver.cs b/NEOSPlus/Components/Network/ArtNetReceiver.cs index 57e2051..0ad680a 100644 --- a/NEOSPlus/Components/Network/ArtNetReceiver.cs +++ b/NEOSPlus/Components/Network/ArtNetReceiver.cs @@ -5,7 +5,7 @@ using BaseX; using FrooxEngine; -[Category("Network")] +[Category("NeosPlus/Network")] public class ArtNetReceiver : Component { public readonly Sync URL; diff --git a/NEOSPlus/Components/Physics/Cloth/ClothCapsuleCollider.cs b/NEOSPlus/Components/Physics/Cloth/ClothCapsuleCollider.cs index 7b4f6a4..a11ed6e 100644 --- a/NEOSPlus/Components/Physics/Cloth/ClothCapsuleCollider.cs +++ b/NEOSPlus/Components/Physics/Cloth/ClothCapsuleCollider.cs @@ -1,6 +1,6 @@ namespace FrooxEngine { - [Category(new string[] {"Physics/Cloth"})] + [Category(new string[] {"NeosPlus/Physics/Cloth"})] public class ClothCapsuleCollider : ClothCollider { public readonly Sync Height; diff --git a/NEOSPlus/Components/Physics/Cloth/ClothSimulation.cs b/NEOSPlus/Components/Physics/Cloth/ClothSimulation.cs index d8eb74b..4da26ca 100644 --- a/NEOSPlus/Components/Physics/Cloth/ClothSimulation.cs +++ b/NEOSPlus/Components/Physics/Cloth/ClothSimulation.cs @@ -6,7 +6,7 @@ namespace FrooxEngine { - [Category(new string[] {"Physics/Cloth"})] + [Category(new string[] {"NeosPlus/Physics/Cloth"})] public class Cloth : MeshRenderer // Need to extend MeshRenderer to avoid Unity attaching its own { [HideInInspector] // Needed to sync the reset across all users diff --git a/NEOSPlus/Components/Physics/Cloth/ClothSphereCollider.cs b/NEOSPlus/Components/Physics/Cloth/ClothSphereCollider.cs index aeb9cb5..c112444 100644 --- a/NEOSPlus/Components/Physics/Cloth/ClothSphereCollider.cs +++ b/NEOSPlus/Components/Physics/Cloth/ClothSphereCollider.cs @@ -1,6 +1,6 @@ namespace FrooxEngine { - [Category(new string[] {"Physics/Cloth"})] + [Category(new string[] {"NeosPlus/Physics/Cloth"})] public class ClothSphereCollider : ClothCollider { protected override void OnAttach() diff --git a/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs b/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs index 461049f..6b27120 100644 --- a/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs +++ b/NEOSPlus/Components/Transform/Drivers/MultiValueArithmeticDriver.cs @@ -3,7 +3,7 @@ namespace FrooxEngine; -[Category(new string[] { "Transform/Drivers" })] +[Category(new string[] { "NeosPlus/Transform/Drivers" })] [GenericTypes(GenericTypes.Group.NeosPrimitives)] public class MultiValueArithmeticDriver : Component { diff --git a/NEOSPlus/Components/Utility/BoundingBoxUserTracker.cs b/NEOSPlus/Components/Utility/BoundingBoxUserTracker.cs index 7a77b42..8e0a02b 100644 --- a/NEOSPlus/Components/Utility/BoundingBoxUserTracker.cs +++ b/NEOSPlus/Components/Utility/BoundingBoxUserTracker.cs @@ -4,7 +4,7 @@ namespace FrooxEngine { - [Category("Utility")] + [Category("NeosPlus/Utility")] public class BoundingBoxUserTracker : Component { public readonly Sync PositionSource; diff --git a/NEOSPlus/Components/Utility/GrabberSimulator.cs b/NEOSPlus/Components/Utility/GrabberSimulator.cs index 8e1bc78..5e85c55 100644 --- a/NEOSPlus/Components/Utility/GrabberSimulator.cs +++ b/NEOSPlus/Components/Utility/GrabberSimulator.cs @@ -10,7 +10,7 @@ namespace FrooxEngine { - [Category("Utility")] + [Category("NeosPlus/Utility")] class GrabberSimulator : Component, ICustomInspector //, ILocomotionReference { public readonly SyncRef Grabber; diff --git a/NEOSPlus/Components/Wizards/ComponentBreakdown.cs b/NEOSPlus/Components/Wizards/ComponentBreakdown.cs index ff001b8..da02790 100644 --- a/NEOSPlus/Components/Wizards/ComponentBreakdown.cs +++ b/NEOSPlus/Components/Wizards/ComponentBreakdown.cs @@ -27,7 +27,7 @@ namespace ComponentBreakdown { - [Category("Add-ons/Wizards")] + [Category("NeosPlus/Wizards")] public class ComponentBreakdown : Component { diff --git a/NEOSPlus/Components/Wizards/LODWizard.cs b/NEOSPlus/Components/Wizards/LODWizard.cs index d527aad..904aca1 100644 --- a/NEOSPlus/Components/Wizards/LODWizard.cs +++ b/NEOSPlus/Components/Wizards/LODWizard.cs @@ -5,7 +5,7 @@ namespace FrooxEngine { - [Category("Add-ons/Wizards")] + [Category("NeosPlus/Wizards")] public class LODWizard : Component { private const string LOD_GROUP_PREFIX = ""; @@ -36,7 +36,7 @@ protected override void OnAttach() CrossFade.Value = false; AnimateCrossFading.Value = false; - Slot.Name = "Map Wizard"; + Slot.Name = "LOD Wizard"; Slot.Tag = "Developer"; NeosCanvasPanel neosCanvasPanel = Slot.AttachComponent(); neosCanvasPanel.Panel.AddCloseButton(); diff --git a/NEOSPlus/Components/Wizards/LightSourceWizard.cs b/NEOSPlus/Components/Wizards/LightSourceWizard.cs index ac20958..fbb0e19 100644 --- a/NEOSPlus/Components/Wizards/LightSourceWizard.cs +++ b/NEOSPlus/Components/Wizards/LightSourceWizard.cs @@ -4,7 +4,7 @@ namespace FrooxEngine { - [Category("Add-ons/Wizards")] + [Category("NeosPlus/Wizards")] public class LightSourceWizard : Component, IDeveloperInterface, IComponent, IComponentBase, IDestroyable, IWorker, IWorldElement, IUpdatable, IChangeable, IAudioUpdatable, IInitializable, ILinkable { diff --git a/NEOSPlus/Components/Wizards/MeshColliderManagementTools.cs b/NEOSPlus/Components/Wizards/MeshColliderManagementTools.cs index 8961be3..2f2ee6e 100644 --- a/NEOSPlus/Components/Wizards/MeshColliderManagementTools.cs +++ b/NEOSPlus/Components/Wizards/MeshColliderManagementTools.cs @@ -54,7 +54,7 @@ public enum UseTagMode } // Wizard which allows batch or individual deletion or replacement of MeshColliders. - [Category("Add-ons/Wizards")] + [Category("NeosPlus/Wizards")] public class MeshColliderManagementWizard : Component { public readonly Sync IgnoreInactive; From 19ce57bae4b94a0ccb06af393337199884933833 Mon Sep 17 00:00:00 2001 From: xLinka Date: Thu, 14 Sep 2023 10:59:14 +0100 Subject: [PATCH 54/54] Forgor --- NEOSPlus/Logix/Math/Physics/DragNode.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEOSPlus/Logix/Math/Physics/DragNode.cs b/NEOSPlus/Logix/Math/Physics/DragNode.cs index aeaec07..0e6891b 100644 --- a/NEOSPlus/Logix/Math/Physics/DragNode.cs +++ b/NEOSPlus/Logix/Math/Physics/DragNode.cs @@ -4,7 +4,7 @@ namespace FrooxEngine.LogiX.Math; [NodeName("Drag Calculation")] -[Category(new string[] { "LogiX/Math/Physics" })] +[Category(new string[] { "LogiX/NeosPlus/Math/Physics" })] internal class DragNode : LogixNode { public readonly Input FluidDensity; // rho