summaryrefslogtreecommitdiff
path: root/Thronefall_1_57/Decompile/NGS.MeshFusionPro/MeshCombineInfo.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Thronefall_1_57/Decompile/NGS.MeshFusionPro/MeshCombineInfo.cs')
-rw-r--r--Thronefall_1_57/Decompile/NGS.MeshFusionPro/MeshCombineInfo.cs43
1 files changed, 43 insertions, 0 deletions
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;
+ }
+}