From 5b4598cb00cc1c1f20ab0a975b83b1e75bb4846b Mon Sep 17 00:00:00 2001 From: Teodor Vecerdi Date: Tue, 11 Jan 2022 09:26:37 +0200 Subject: [PATCH] Add TODO(#19) --- .../Runtime/Geometry/GeometryData.cs | 34 ++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/UnityGeometryGraph/Assets/GeometryGraph/Runtime/Geometry/GeometryData.cs b/UnityGeometryGraph/Assets/GeometryGraph/Runtime/Geometry/GeometryData.cs index 7d5dd720..436e341e 100644 --- a/UnityGeometryGraph/Assets/GeometryGraph/Runtime/Geometry/GeometryData.cs +++ b/UnityGeometryGraph/Assets/GeometryGraph/Runtime/Geometry/GeometryData.cs @@ -162,6 +162,38 @@ private void FillFaceCornerMetadata() { fcC.Vert = face.VertC; } } + + #region HashCode Implementations + + private int CalculateHashCodeElementCount() { + return HashCode.Combine(vertices.Count, edges.Count, faces.Count, faceCorners.Count); + } + + private int CalculateHashCodeAttributeCount() { + return HashHelpers.Combine( + CalculateHashCodeElementCount(), + HashCode.Combine( + attributeManager.VertexAttributes.Count, + attributeManager.EdgeAttributes.Count, + attributeManager.FaceAttributes.Count, + attributeManager.FaceCornerAttributes.Count + ) + ); + } + + private int CalculateHashCodeAttributeValues() { + // TODO(#19): Implement CalculateHashCodeAttributeValues + // Located in `GeometryData.cs` + return 0; + } + + private int CalculateHashCodeFull() { + // TODO: Implement CalculateHashCodeFull + // Located in `GeometryData.cs` + return 0; + } + + #endregion public void OnBeforeSerialize() { } @@ -170,4 +202,4 @@ public void OnAfterDeserialize() { attributeManager.SetOwner(this); } } -} \ No newline at end of file +}