diff options
| author | chai <215380520@qq.com> | 2024-05-19 17:03:57 +0800 |
|---|---|---|
| committer | chai <215380520@qq.com> | 2024-05-19 17:03:57 +0800 |
| commit | cf58771365b5953c6eac548b172aae880d1f0acd (patch) | |
| tree | a49757a4b5c447cbf877584d482367a6bfe33b10 /Thronefall_1_57/Decompile/NGS.MeshFusionPro/MeshDataListsSTD.cs | |
| parent | eed315deae356ddfb17f28305e7cde6cdfc43313 (diff) | |
* rename
Diffstat (limited to 'Thronefall_1_57/Decompile/NGS.MeshFusionPro/MeshDataListsSTD.cs')
| -rw-r--r-- | Thronefall_1_57/Decompile/NGS.MeshFusionPro/MeshDataListsSTD.cs | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/Thronefall_1_57/Decompile/NGS.MeshFusionPro/MeshDataListsSTD.cs b/Thronefall_1_57/Decompile/NGS.MeshFusionPro/MeshDataListsSTD.cs deleted file mode 100644 index 1bf34eb..0000000 --- a/Thronefall_1_57/Decompile/NGS.MeshFusionPro/MeshDataListsSTD.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System.Collections.Generic; -using UnityEngine; - -namespace NGS.MeshFusionPro; - -public class MeshDataListsSTD : CombinedMeshDataInternal -{ - private CombinedMesh _root; - - private List<Vector3> _vertices; - - private List<Vector3> _normals; - - private List<Vector4> _tangents; - - private List<Bounds> _partsBounds; - - private List<Bounds> _partsBoundsLocal; - - public List<Vector3> Vertices => _vertices; - - public List<Vector3> Normals => _normals; - - public List<Vector4> Tangents => _tangents; - - public List<Bounds> PartsBounds => _partsBounds; - - public List<Bounds> PartsBoundsLocal => _partsBoundsLocal; - - public Bounds Bounds { get; set; } - - public override Bounds GetBounds() - { - return Bounds; - } - - public override Bounds GetBounds(CombinedMeshPart part) - { - return _partsBounds[part.Index]; - } - - public void ApplyDataToMesh() - { - Mesh mesh = _root.Mesh; - mesh.SetVertices(_vertices); - mesh.SetNormals(_normals); - mesh.SetTangents(_tangents); - mesh.bounds = Bounds; - } - - protected override void OnInitialized() - { - _root = base.Root; - _vertices = new List<Vector3>(); - _normals = new List<Vector3>(); - _tangents = new List<Vector4>(); - _partsBounds = new List<Bounds>(); - _partsBoundsLocal = new List<Bounds>(); - } - - protected override void OnAddPart(CombinedMeshPart part, Mesh mesh, Matrix4x4 transform) - { - Bounds bounds = mesh.bounds; - Bounds item = bounds.Transform(transform); - _partsBounds.Add(item); - _partsBoundsLocal.Add(bounds); - } - - protected override void OnRemovePart(CombinedMeshPart part) - { - _partsBounds.RemoveAt(part.Index); - _partsBoundsLocal.RemoveAt(part.Index); - } - - protected override void OnMeshUpdated() - { - Mesh mesh = _root.Mesh; - mesh.GetVertices(_vertices); - mesh.GetNormals(_normals); - mesh.GetTangents(_tangents); - Bounds = mesh.bounds; - } -} |
