From 8e13e7e2874adc8982e16d1d2ed2e28d7480b45f Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Sun, 19 May 2024 16:05:58 +0800 Subject: +1.57 --- .../Decompile/NGS.MeshFusionPro/MeshCombineInfo.cs | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Thronefall_1_57/Decompile/NGS.MeshFusionPro/MeshCombineInfo.cs (limited to 'Thronefall_1_57/Decompile/NGS.MeshFusionPro/MeshCombineInfo.cs') diff --git a/Thronefall_1_57/Decompile/NGS.MeshFusionPro/MeshCombineInfo.cs b/Thronefall_1_57/Decompile/NGS.MeshFusionPro/MeshCombineInfo.cs new file mode 100644 index 0000000..ed879cb --- /dev/null +++ b/Thronefall_1_57/Decompile/NGS.MeshFusionPro/MeshCombineInfo.cs @@ -0,0 +1,43 @@ +using UnityEngine; +using UnityEngine.Rendering; + +namespace NGS.MeshFusionPro; + +public struct MeshCombineInfo +{ + public Mesh mesh; + + public Matrix4x4 transformMatrix; + + public Vector4 lightmapScaleOffset; + + public Vector4 realtimeLightmapScaleOffset; + + public int submeshIndex; + + public readonly int vertexCount; + + public readonly int trianglesCount; + + public MeshCombineInfo(Mesh mesh, int submeshIndex = 0) + : this(mesh, Matrix4x4.identity, submeshIndex) + { + } + + public MeshCombineInfo(Mesh mesh, Matrix4x4 transformMatrix, int submeshIndex = 0) + : this(mesh, transformMatrix, new Vector4(1f, 1f, 0f, 0f), new Vector4(1f, 1f, 0f, 0f), submeshIndex) + { + } + + public MeshCombineInfo(Mesh mesh, Matrix4x4 transformMatrix, Vector4 lightmapScaleOffset, Vector4 realtimeLightmapScaleOffset, int submeshIndex = 0) + { + this.mesh = mesh; + this.transformMatrix = transformMatrix; + this.lightmapScaleOffset = lightmapScaleOffset; + this.realtimeLightmapScaleOffset = realtimeLightmapScaleOffset; + this.submeshIndex = submeshIndex; + SubMeshDescriptor subMesh = mesh.GetSubMesh(submeshIndex); + vertexCount = subMesh.vertexCount; + trianglesCount = subMesh.indexCount; + } +} -- cgit v1.1-26-g67d0