internal static void MakeTexturedRect(MeshGenerationContextUtils.RectangleParams rectParams, float posZ, AllocMeshData meshAlloc) { if (rectParams.leftSlice <= Mathf.Epsilon && rectParams.topSlice <= Mathf.Epsilon && rectParams.rightSlice <= Mathf.Epsilon && rectParams.bottomSlice <= Mathf.Epsilon) { if (!rectParams.HasRadius(Tessellation.kEpsilon)) { MakeQuad(rectParams.rect, rectParams.uv, rectParams.color, posZ, meshAlloc); } else { Tessellation.TessellateRect(rectParams, posZ, meshAlloc, true); } } else if (rectParams.texture == null) { MakeQuad(rectParams.rect, rectParams.uv, rectParams.color, posZ, meshAlloc); } else { MakeSlicedQuad(ref rectParams, posZ, meshAlloc); } }
internal static void MakeTexturedRect(MeshGenerationContextUtils.RectangleParams rectParams, float posZ, MeshBuilder.AllocMeshData meshAlloc) { bool flag = (float)rectParams.leftSlice <= Mathf.Epsilon && (float)rectParams.topSlice <= Mathf.Epsilon && (float)rectParams.rightSlice <= Mathf.Epsilon && (float)rectParams.bottomSlice <= Mathf.Epsilon; if (flag) { bool flag2 = !rectParams.HasRadius(Tessellation.kEpsilon); if (flag2) { MeshBuilder.MakeQuad(rectParams.rect, rectParams.uv, rectParams.color, posZ, meshAlloc); } else { Tessellation.TessellateRect(rectParams, posZ, meshAlloc, true); } } else { bool flag3 = rectParams.texture == null; if (flag3) { MeshBuilder.MakeQuad(rectParams.rect, rectParams.uv, rectParams.color, posZ, meshAlloc); } else { MeshBuilder.MakeSlicedQuad(ref rectParams, posZ, meshAlloc); } } }
internal static void MakeSolidRect(MeshGenerationContextUtils.RectangleParams rectParams, float posZ, AllocMeshData meshAlloc) { if (!rectParams.HasRadius(Tessellation.kEpsilon)) { MakeQuad(rectParams.rect, Rect.zero, rectParams.color, posZ, meshAlloc); } else { Tessellation.TessellateRect(rectParams, posZ, meshAlloc, false); } }
private static void TessellateRectInternal(ref MeshGenerationContextUtils.RectangleParams rectParams, float posZ, MeshWriteData mesh, ref UInt16 vertexCount, ref UInt16 indexCount, bool countOnly = false) { if (!rectParams.HasRadius(kEpsilon)) { UInt16 indexOffset = 0; TessellateQuad(rectParams.rect, TessellationType.Content, rectParams.color, posZ, mesh, ref indexOffset, ref vertexCount, ref indexCount, countOnly); } else { TessellateRoundedCorners(ref rectParams, posZ, mesh, ref vertexCount, ref indexCount, countOnly); } }
private static void TessellateRectInternal(ref MeshGenerationContextUtils.RectangleParams rectParams, float posZ, VertexFlags vertexFlags, NativeSlice <Vertex>?vertices, NativeSlice <UInt16>?indices, ref UInt16 vertexCount, ref UInt16 indexCount, bool countOnly = false) { if (!rectParams.HasRadius(kEpsilon)) { UInt16 indexOffset = 0; TessellateQuad(rectParams.rect, TessellationType.Content, rectParams.color, posZ, vertexFlags, vertices, indices, ref indexOffset, ref vertexCount, ref indexCount, countOnly); } else { TessellateRoundedCorners(ref rectParams, posZ, vertexFlags, vertices, indices, ref vertexCount, ref indexCount, countOnly); } }