public override CfgEncoder Encode() { CfgEncoder cody = new CfgEncoder(); cody.Add_IfNotZero("t", srcIndex); cody.Add_IfNotZero("v", dstIndex); return(cody); }
public override CfgEncoder Encode() { var cody = new CfgEncoder(); cody.Add_IfNotZero("p", deltaPosition); cody.Add_IfNotZero("t", deltaTangent); cody.Add_IfNotZero("n", deltaNormal); return(cody); }
public override CfgEncoder Encode() { var cody = new CfgEncoder() .Add_IfTrue("f0", dominantCorner[0]) .Add_IfTrue("f1", dominantCorner[1]) .Add_IfTrue("f2", dominantCorner[2]) .Add_IfNotEpsilon("ew0", edgeWeight[0]) .Add_IfNotEpsilon("ew1", edgeWeight[1]) .Add_IfNotEpsilon("ew2", edgeWeight[2]); for (var i = 0; i < 3; i++) { cody.Add(i.ToString(), vertexes[i].finalIndex); } cody.Add_IfNotZero("tex", textureNo) .Add_IfNotZero("sub", subMeshIndex); return(cody); }
public CfgEncoder EncodeStrokeFor(PlaytimePainter painter) { var id = painter.TexMeta; var rt = id.TargetIsRenderTexture(); var mode = GetBlitMode(!rt); var type = GetBrushType(!rt); var worldSpace = rt && painter.Is3DBrush(); var cody = new CfgEncoder() .Add(rt ? "typeGPU" : "typeCPU", _brushType(!rt)); if (worldSpace) { cody.Add("size3D", brush3DRadius); } else { cody.Add("size2D", brush2DRadius / id.width); } cody.Add_Bool("useMask", useMask) .Add("modeCPU", _inCpuBlitMode) .Add("modeGPU", _inGpuBlitMode); if (useMask) { cody.Add("mask", (int)mask); } cody.Add("bc", Color); if (mode.UsingSourceTexture) { cody.Add_IfNotZero("source", selectedSourceTexture); } if (rt) { if ((mode.GetType() == typeof(BlitModes.Blur))) { cody.Add("blur", blurAmount); } if (type.IsUsingDecals) { cody.Add("decA", decalAngle) .Add("decNo", selectedDecal); } if (useMask) { cody.Add("Smask", selectedSourceMask) .Add("maskTil", maskTiling) .Add_Bool("maskFlip", flipMaskAlpha) .Add("maskOff", maskOffset); } } cody.Add("hard", hardness) .Add("dSpeed", _dFlow); //.Add("Speed", speed); return(cody); }