public override void Output(MN_Operator_OutputData data) { var output = MN.GetOutput(applyTo); output *= (double)deformityCurve.Evaluate((float)data.vertHeight); MN.SetOutput(applyTo, output); }
public override void Output(MN_Operator_OutputData data) { var output = MN.GetOutput(applyTo); output *= (double)longitudeCurve.Evaluate((float)data.longitude); MN.SetOutput(applyTo, output); }
public override void Output(MN_Operator_OutputData data) { var output = MN.GetOutput(applyTo); output = Math.Abs(output); MN.SetOutput(applyTo, output); }
public override void Input(MN_Operator_InputData data) { var input = MN.GetInput(applyTo); input.Scale(new Vector3d(XScale, YScale, ZScale)); input.Normalize(); MN.SetInput(applyTo, input); }
public override void Output(MN_Operator_OutputData data) { var output = (MN.GetOutput(applyTo) + 1) * 0.5; var output1 = MN.GetOutput(firstNoise); var output2 = MN.GetOutput(secondNoise); output = Utils.LerpD(output1, output2, output); MN.SetOutput(applyTo, output); }
public override void Input(MN_Operator_InputData data) { var input = MN.GetInput(applyTo); var nx = (rotationMatrix.m00 * input.x) + (rotationMatrix.m10 * input.y) + (rotationMatrix.m20 * input.z); var ny = (rotationMatrix.m01 * input.x) + (rotationMatrix.m11 * input.y) + (rotationMatrix.m21 * input.z); var nz = (rotationMatrix.m02 * input.x) + (rotationMatrix.m12 * input.y) + (rotationMatrix.m22 * input.z); MN.SetInput(applyTo, new Vector3d(nx, ny, nz)); }
public override void Output(MN_Operator_OutputData data) { var output = MN.GetOutput(applyTo); if (output < min) { output = min; } if (output > max) { output = max; } MN.SetOutput(applyTo, output); }
public override void Output(MN_Operator_OutputData data) { var output = MN.GetOutput(applyTo); if (applyFrom != null) { output *= MN.GetOutput(applyFrom); } else { output *= valueToMult; } MN.SetOutput(applyTo, output); }
public override void Input(MN_Operator_InputData data) { var input = MN.GetInput(applyTo); double x = input.x; double y = input.y; double z = input.z; double x2 = pX.GetValue(x + pertubeX1, y + pertubeX2, z + pertubeX3) * power; double y2 = pY.GetValue(x + pertubeY1, y + pertubeY2, z + pertubeY3) * power; double z2 = pZ.GetValue(x + pertubeZ1, y + pertubeZ2, z + pertubeZ3) * power; input = new Vector3d(x + x2, y + y2, z + z2).normalized; MN.SetInput(applyTo, input); }
public override void Output(MN_Operator_OutputData data) { var output = (MN.GetOutput(applyTo) + 1) * 0.5; //2 var output1 = MN.GetOutput(firstNoise); //0 var output2 = MN.GetOutput(secondNoise); //1 if (falloff > 0.0) { if (output < (min - falloff)) { MN.SetOutput(applyTo, output1); return; } if (output < (min + falloff)) { var lc = (min - falloff); var uc = (min + falloff); var t = Utils.MapCubicCurve((output - lc) / (uc - lc)); var ret = Utils.LerpD(output1, output2, t); MN.SetOutput(applyTo, ret); return; } if (output < (max - falloff)) { MN.SetOutput(applyTo, output2); return; } if (output < (max + falloff)) { var lc = (max - falloff); var uc = (max + falloff); var t = Utils.MapCubicCurve((output - lc) / (uc - lc)); var ret = Utils.LerpD(output2, output1, t); MN.SetOutput(applyTo, ret); return; } MN.SetOutput(applyTo, output1); return; } if (output < min || output > max) { MN.SetOutput(applyTo, output1); return; } }
public override void Output(MN_Operator_OutputData data) { var output = MN.GetOutput(applyTo); if (applyFrom != null) { var sign = (output < 0 ? -1 : 1); var from = MN.GetOutput(applyFrom); output = Math.Abs(Math.Pow(output, from)) * sign; } else { var sign = (output < 0 ? -1 : 1); output = Math.Abs(Math.Pow(output, power)) * sign; } MN.SetOutput(applyTo, output); }
public override void Output(MN_Operator_OutputData data) { var output = MN.GetOutput(applyTo); if (applyFrom != null) { var from = MN.GetOutput(applyFrom); if (output < from) { output = from; } } else { if (output > max) { output = max; } } MN.SetOutput(applyTo, output); }