void ProcessVertex(int dataN, ref Vector3F position, out Vector3F result) { result = position; var l_r = (float)Pos1n.Value.Scale.X / 2; var l_d = (position - Pos1n.Value.Position.ToVector3F()); var mulr = ((float)R2 * (float)Multiplier2) / (float)R3; var offx = (float)Multiplier / ((float)R1 * 100); var offy = (float)Multiplier1 / ((float)R1 * 100); var offz = (float)Multiplier0 / ((float)R1 * 100); var offs = new Vector3F(offx, offy, offz); float l_l = l_d.Length(); if (Mode == 1) { if (l_l <= l_r) { result = Pos1n.Value.Position.ToVector3F() + l_d * (0.5f + 0.5f * ((l_l * l_l) / (l_r * l_r))); } } else if (Mode == 2) { if (l_l <= l_r) { result = Pos1n.Value.Position.ToVector3F() + l_d * (1.5f - 0.5f * ((l_l * l_l) / (l_r * l_r))); } } else if (Mode == 3) { if (l_l <= l_r) { result = Pos1n.Value.Position.ToVector3F() + l_d.GetNormalize() * l_r * (0.8f + 0.2f * ((l_l * l_l) / (l_r * l_r))); } } else if (Mode == 4) { if (Mode1 == 0) { if (l_l <= l_r) { result = position + offs * (1 / (MathEx.Exp((mulr * l_r) * l_l * l_l))); } } else if (Mode1 == 1) { if (position.Y < Pos1.Y && l_l <= l_r) { result = position + offs * (1 / (MathEx.Exp((mulr * l_r) * l_l * l_l))); } } else if (Mode1 == 2) { if (position.Y > Pos1.Y && l_l <= l_r) { result = position + offs * (1 / (MathEx.Exp((mulr * l_r) * l_l * l_l))); } } } }
/// <summary> /// Returns the vector which contains e raised to the power of n, where n is the corresponding component in the specified vector. /// </summary> /// <param name="v">The specified vector.</param> /// <returns>The vector which contains e raised to the power of n, where n is the corresponding component in the specified vector.</returns> public static Vector2F Exp(Vector2F v) { return(new Vector2F(MathEx.Exp(v.X), MathEx.Exp(v.Y))); }
/// <summary> /// Returns the vector which contains e raised to the power of n, where n is the corresponding component in the specified vector. /// </summary> /// <param name="v">The specified vector.</param> /// <returns>The vector which contains e raised to the power of n, where n is the corresponding component in the specified vector.</returns> public static Vector4F Exp(Vector4F v) { return(new Vector4F(MathEx.Exp(v.X), MathEx.Exp(v.Y), MathEx.Exp(v.Z), MathEx.Exp(v.W))); }
/// <summary> /// Returns the vector which contains e raised to the power of n, where n is the corresponding component in the specified vector. /// </summary> /// <param name="v">The specified vector.</param> /// <returns>The vector which contains e raised to the power of n, where n is the corresponding component in the specified vector.</returns> public static Vector3F Exp(Vector3F v) { return(new Vector3F(MathEx.Exp(v.X), MathEx.Exp(v.Y), MathEx.Exp(v.Z))); }