private void SetGlobalBounds(List <NavMeshBuildInput> inputs) { HeightBounds = inputs[0].TileBounds.Bounds; foreach (NavMeshBuildInput input in inputs) { HeightBounds = DtBoundingBox.Merge(HeightBounds, input.TileBounds.Bounds); } }
public void Append(NavMeshNativeInputBuilder other) { // Copy vertices int vbase = Vertices.Length; for (int i = 0; i < other.Vertices.Length; i++) { float3 point = other.Vertices[i]; Vertices.Add(point); BoundingBox = DtBoundingBox.Merge(BoundingBox, point); } // Copy indices with offset applied for (int i = 0; i < other.Indices.Length; i++) { Indices.Add(other.Indices[i] + vbase); } }
public void Append(NativeArray <float3> vertices, NativeArray <int> indices, NativeArray <byte> areas) { // Copy vertices int vbase = Vertices.Length; for (int i = 0; i < vertices.Length; i++) { Vertices.Add(vertices[i]); BoundingBox = DtBoundingBox.Merge(BoundingBox, vertices[i]); } // Copy indices with offset applied for (int i = 0; i < indices.Length; i++) { Indices.Add(indices[i] + vbase); } for (int i = 0; i < areas.Length; i++) { Areas.Add(areas[i]); } }
public void Append(float3[] vertices, int[] indices, byte[] areas) { // Copy vertices int vbase = Vertices.Length; for (int i = 0; i < vertices.Length; i++) { Vertices.Add(vertices[i]); BoundingBox = DtBoundingBox.Merge(BoundingBox, vertices[i]); } // Copy indices with offset applied for (int i = 0; i < indices.Length; i++) { Indices.Add(indices[i] + vbase); } for (int i = 0; i < areas.Length; i++) { Areas.Add(areas[i]); } }
public void Append(NativeArray <float3> vertices, NativeArray <int> indices, byte area = DtArea.WALKABLE) { // Copy vertices int vbase = Vertices.Length; for (int i = 0; i < vertices.Length; i++) { Vertices.Add(vertices[i]); BoundingBox = DtBoundingBox.Merge(BoundingBox, vertices[i]); } // Copy indices with offset applied for (int i = 0; i < indices.Length; i++) { Indices.Add(indices[i] + vbase); } int triangleCount = indices.Length / 3; for (int i = 0; i < triangleCount; i++) { Areas.Add(area); } }