/// <summary> Linearly interpolates between two vectors as: Output.x = x1 + (x2-x1)*progress </summary> /// <param name="val1">Source value 1.</param> /// <param name="val2">Source value 2.</param> /// <param name="progress">A value between 0 and 1.0 indicating the weight of val2.</param> public static ScalarNode Lerp(ScalarNode val1, ScalarNode val2, ScalarNode progress) { return(Function <ScalarNode>(ExpressionNodeType.Lerp, val1, val2, progress)); }
/// <summary> Returns the tangent of the specified angle (in radians) </summary> /// <param name="val">An angle, measured in radians.</param> public static ScalarNode Tan(ScalarNode val) { return(Function <ScalarNode>(ExpressionNodeType.Tan, val)); }
/// <summary> Converts an angle in degrees to radians as: val*PI/180. </summary> /// <param name="val">A floating point value that represents an angle in degrees.</param> public static ScalarNode ToRadians(ScalarNode val) { return(Function <ScalarNode>(ExpressionNodeType.ToRadians, val)); }
/// <summary> Returns the base 10 logarithm of a specified number. </summary> /// <param name="val">The number whose base 10 logarithm is to be calculated.</param> public static ScalarNode Log10(ScalarNode val) { return(Function <ScalarNode>(ExpressionNodeType.Log10, val)); }
/// <summary> Rounds a floating point value to the nearest integral value. </summary> /// <param name="val">The floating point number to round.</param> public static ScalarNode Round(ScalarNode val) { return(Function <ScalarNode>(ExpressionNodeType.Round, val)); }
/// <summary> Returns the cosine of the specified angle (in radians) </summary> /// <param name="val">An angle, measured in radians.</param> public static ScalarNode Cos(ScalarNode val) { return(Function <ScalarNode>(ExpressionNodeType.Cos, val)); }
// // Conditional // /// <summary> Returns one of two values, depending on the value of the boolean condition. </summary> /// <param name="condition">Boolean value used to determine whether to return the value represented by 'trueCase' or 'falseCase'.</param> /// <param name="trueCase">Value to return if 'condition' evaluates to true.</param> /// <param name="falseCase">Value to return if 'condition' evaluates to false.</param> public static ScalarNode Conditional(BooleanNode condition, ScalarNode trueCase, ScalarNode falseCase) { return(Function <ScalarNode>(ExpressionNodeType.Conditional, condition, trueCase, falseCase)); }
// // System.Numerics Type Constructors // /// <summary> Creates a vector whose subchannels have the specified values. </summary> public static Vector2Node Vector2(ScalarNode x, ScalarNode y) { return(Function <Vector2Node>(ExpressionNodeType.Vector2, x, y)); }
public static Vector3Node Vector3(ScalarNode x, ScalarNode y, ScalarNode z) { return(Function <Vector3Node>(ExpressionNodeType.Vector3, x, y, z)); }
public static Matrix4x4Node Scale(Matrix4x4Node val1, ScalarNode val2) { return(Function <Matrix4x4Node>(ExpressionNodeType.Scale, val1, val2)); }
/// <summary> Spherically interpolates between two quaternions. </summary> /// <param name="val1">Quaternion source value 1.</param> /// <param name="val2">Quaternion source value 2.</param> /// <param name="progress">A value between 0 and 1.0 indicating the weight of val2.</param> public static QuaternionNode Slerp(QuaternionNode val1, QuaternionNode val2, ScalarNode progress) { return(Function <QuaternionNode>(ExpressionNodeType.Slerp, val1, val2, progress)); }
public static Vector4Node Scale(Vector4Node val1, ScalarNode val2) { return(Function <Vector4Node>(ExpressionNodeType.Scale, val1, val2)); }
/// <summary> Returns the remainder resulting from dividing val1/val2. For vectors, the remainder for each subchannel is returned. </summary> /// <param name="val1">The numerator value.</param> /// <param name="val2">The denominator value.</param> public static ScalarNode Mod(ScalarNode val1, ScalarNode val2) { return(Function <ScalarNode>(ExpressionNodeType.Modulus, val1, val2)); }
public static Vector4Node Lerp(Vector4Node val1, Vector4Node val2, ScalarNode progress) { return(Function <Vector4Node>(ExpressionNodeType.Lerp, val1, val2, progress)); }
/// <summary> Creates a rotation matrix using the given rotation in radians. </summary> /// <param name="angle">Angle, in radians.</param> public static Matrix3x2Node CreateRotation(ScalarNode angle) { return(Function <Matrix3x2Node>(ExpressionNodeType.Matrix3x2FromRotation, angle)); }
public static Vector4Node Vector4(ScalarNode x, ScalarNode y, ScalarNode z, ScalarNode w) { return(Function <Vector4Node>(ExpressionNodeType.Vector4, x, y, z, w)); }
/// <summary> Creates a matrix that rotates around an arbitrary vector. </summary> /// <param name="axis">Rotation axis</param> /// <param name="angle">Angle, in radians.</param> public static Matrix4x4Node CreateMatrix4x4FromAxisAngle(Vector3Node axis, ScalarNode angle) { return(Function <Matrix4x4Node>(ExpressionNodeType.Matrix4x4FromAxisAngle, axis, angle)); }
/// <summary> Creates a color in the HSL format. </summary> /// <param name="h">Hue</param> /// <param name="s">Saturation</param> /// <param name="l">Luminosity</param> public static ColorNode ColorHsl(ScalarNode h, ScalarNode s, ScalarNode l) { return(Function <ColorNode>(ExpressionNodeType.ColorHsl, h, s, l)); }
/// <summary> Creates a quaternion that rotates around an arbitrary vector. </summary> /// <param name="axis">Rotation axis</param> /// <param name="angle">Angle, in radians.</param> public static QuaternionNode CreateQuaternionFromAxisAngle(Vector3Node axis, ScalarNode angle) { return(Function <QuaternionNode>(ExpressionNodeType.QuaternionFromAxisAngle, axis, angle)); }
/// <summary> Creates a Color in the ARGB format. </summary> public static ColorNode ColorRgb(ScalarNode alpha, ScalarNode red, ScalarNode green, ScalarNode blue) { return(Function <ColorNode>(ExpressionNodeType.ColorRgb, alpha, red, green, blue)); }
/// <summary> Returns the largest integer less than or equal to the specified value. </summary> /// <param name="val">The floating point number to round.</param> public static ScalarNode Floor(ScalarNode val) { return(Function <ScalarNode>(ExpressionNodeType.Floor, val)); }
/// <summary> Creates a quaternion whose subchannels have the specified values. </summary> public static QuaternionNode Quaternion(ScalarNode x, ScalarNode y, ScalarNode z, ScalarNode w) { return(Function <QuaternionNode>(ExpressionNodeType.Quaternion, x, y, z, w)); }
/// <summary> Returns a specified number raised to the specified power. </summary> /// <param name="val1">A floating-point number to be raised to a power.</param> /// <param name="val2">A floating-point number that specifies a power.</param> public static ScalarNode Pow(ScalarNode val1, ScalarNode val2) { return(Function <ScalarNode>(ExpressionNodeType.Pow, val1, val2)); }
/// <summary> Creates a matrix whose subchannels have the specified values. </summary> public static Matrix3x2Node Matrix3x2(ScalarNode _11, ScalarNode _12, ScalarNode _21, ScalarNode _22, ScalarNode _31, ScalarNode _32) { return(Function <Matrix3x2Node>(ExpressionNodeType.Matrix3x2, _11, _12, _21, _22, _31, _32)); }
/// <summary> Returns the square root of a specified number. </summary> /// <param name="val">The number whose square root is to be returned.</param> public static ScalarNode Sqrt(ScalarNode val) { return(Function <ScalarNode>(ExpressionNodeType.Sqrt, val)); }
/// <summary> Creates a matrix whose subchannels have the specified values. </summary> public static Matrix4x4Node Matrix4x4(ScalarNode _11, ScalarNode _12, ScalarNode _13, ScalarNode _14, ScalarNode _21, ScalarNode _22, ScalarNode _23, ScalarNode _24, ScalarNode _31, ScalarNode _32, ScalarNode _33, ScalarNode _34, ScalarNode _41, ScalarNode _42, ScalarNode _43, ScalarNode _44) { return(Function <Matrix4x4Node>(ExpressionNodeType.Matrix4x4, _11, _12, _13, _14, _21, _22, _23, _24, _31, _32, _33, _34, _41, _42, _43, _44)); }
/// <summary> Converts an angle in radians to degrees as: val*180/PI. </summary> /// <param name="val">A floating point value that represents an angle in radians.</param> public static ScalarNode ToDegrees(ScalarNode val) { return(Function <ScalarNode>(ExpressionNodeType.ToDegrees, val)); }
/// <summary> Creates a skew matrix from the specified angles in radians. </summary> /// <param name="xAngle">X angle, in radians.</param> /// <param name="yAngle">Y angle, in radians.</param> /// <param name="centerPoint">The centerpoint for the operation.</param> public static Matrix3x2Node CreateSkew(ScalarNode xAngle, ScalarNode yAngle, Vector2Node centerPoint) { return(Function <Matrix3x2Node>(ExpressionNodeType.Matrix3x2FromSkew, xAngle, yAngle, centerPoint)); }
// // System.Numerics functions // /// <summary> Returns the absolute value of the specified input. For vectors, the absolute value of each subchannel is returned. </summary> /// <param name="val">The input value.</param> public static ScalarNode Abs(ScalarNode val) { return(Function <ScalarNode>(ExpressionNodeType.Absolute, val)); }
/// <summary> Returns the squared length of the vector as: (x^2 + y^2 + ...) </summary> /// <param name="val">Vector value to return the length squared of.</param> public static ScalarNode LengthSquared(ScalarNode val) { return(Function <ScalarNode>(ExpressionNodeType.LengthSquared, val)); }