Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Matrix4x4.cs
1using System;
5
7{
12 {
16 protected static readonly ArgumentType[] argumentTypes16Scalar = new ArgumentType[]
17 {
18 ArgumentType.Scalar, ArgumentType.Scalar, ArgumentType.Scalar, ArgumentType.Scalar,
19 ArgumentType.Scalar, ArgumentType.Scalar, ArgumentType.Scalar, ArgumentType.Scalar,
20 ArgumentType.Scalar, ArgumentType.Scalar, ArgumentType.Scalar, ArgumentType.Scalar,
21 ArgumentType.Scalar, ArgumentType.Scalar, ArgumentType.Scalar, ArgumentType.Scalar
22 };
23
47 ScriptNode M21, ScriptNode M22, ScriptNode M23, ScriptNode M24,
48 ScriptNode M31, ScriptNode M32, ScriptNode M33, ScriptNode M34,
49 ScriptNode M41, ScriptNode M42, ScriptNode M43, ScriptNode M44,
51 : base(new ScriptNode[] { M11, M12, M13, M14, M21, M22, M23, M24, M31, M32, M33, M34, M41, M42, M43, M44 },
53 {
54 }
55
59 public override string FunctionName => nameof(Matrix4x4);
60
64 public override string[] DefaultArgumentNames => new string[]
65 {
66 "m11", "m12", "m13", "m14",
67 "m21", "m22", "m23", "m24",
68 "m31", "m32", "m33", "m34",
69 "m41", "m42", "m43", "m44"
70 };
71
79 {
80 return new ObjectValue(new System.Numerics.Matrix4x4(
81 (float)Expression.ToDouble(Arguments[0].AssociatedObjectValue),
82 (float)Expression.ToDouble(Arguments[1].AssociatedObjectValue),
83 (float)Expression.ToDouble(Arguments[2].AssociatedObjectValue),
84 (float)Expression.ToDouble(Arguments[3].AssociatedObjectValue),
85 (float)Expression.ToDouble(Arguments[4].AssociatedObjectValue),
86 (float)Expression.ToDouble(Arguments[5].AssociatedObjectValue),
87 (float)Expression.ToDouble(Arguments[6].AssociatedObjectValue),
88 (float)Expression.ToDouble(Arguments[7].AssociatedObjectValue),
89 (float)Expression.ToDouble(Arguments[8].AssociatedObjectValue),
90 (float)Expression.ToDouble(Arguments[9].AssociatedObjectValue),
91 (float)Expression.ToDouble(Arguments[10].AssociatedObjectValue),
92 (float)Expression.ToDouble(Arguments[11].AssociatedObjectValue),
93 (float)Expression.ToDouble(Arguments[12].AssociatedObjectValue),
94 (float)Expression.ToDouble(Arguments[13].AssociatedObjectValue),
95 (float)Expression.ToDouble(Arguments[14].AssociatedObjectValue),
96 (float)Expression.ToDouble(Arguments[15].AssociatedObjectValue)));
97 }
98 }
99}
Class managing a script expression.
Definition: Expression.cs:39
static double ToDouble(object Object)
Converts an object to a double value.
Definition: Expression.cs:4824
Generates a System.Numerics.Matrix4x4 object.
Definition: Matrix4x4.cs:12
override string FunctionName
Name of the function
Definition: Matrix4x4.cs:59
override string[] DefaultArgumentNames
Default Argument names
Definition: Matrix4x4.cs:64
override IElement Evaluate(IElement[] Arguments, Variables Variables)
Evaluates the function.
Definition: Matrix4x4.cs:78
Matrix4x4(ScriptNode M11, ScriptNode M12, ScriptNode M13, ScriptNode M14, ScriptNode M21, ScriptNode M22, ScriptNode M23, ScriptNode M24, ScriptNode M31, ScriptNode M32, ScriptNode M33, ScriptNode M34, ScriptNode M41, ScriptNode M42, ScriptNode M43, ScriptNode M44, int Start, int Length, Expression Expression)
Generates a System.Numerics.Matrix4x4 object.
Definition: Matrix4x4.cs:46
static readonly ArgumentType[] argumentTypes16Scalar
Sixteen scalar parameters.
Definition: Matrix4x4.cs:16
Base class for multivariate funcions.
ScriptNode[] Arguments
Function arguments.
Base class for all nodes in a parsed script tree.
Definition: ScriptNode.cs:69
int Length
Length of expression covered by node.
Definition: ScriptNode.cs:101
Expression Expression
Expression of which the node is a part.
Definition: ScriptNode.cs:177
int Start
Start position in script expression.
Definition: ScriptNode.cs:92
Collection of variables.
Definition: Variables.cs:25
Basic interface for all types of elements.
Definition: IElement.cs:20
ArgumentType
Type of parameter used in a function definition or a lambda definition.
Definition: IFunction.cs:9