public static BabylonVertexData Get(this BabylonGeometries geometries, string id) { return(geometries.vertexData?.First(v => v.id == id)); }
public static bool Contains(this BabylonGeometries geometries, string id) { return(geometries.vertexData == null ? false : geometries.vertexData.Any(v => v.id == id)); }
public static void Add(this BabylonGeometries geometries, BabylonVertexData data) { geometries.vertexData = geometries.vertexData == null ? new[] { data } : geometries.vertexData.Where(v => v.id != data.id).Concat(new[] { data }).ToArray(); }