/// <summary> /// Merge the given obj with the current one /// </summary> /// <param name="obj"></param> public void MergeObjData(ObjData obj) { if (obj != null) { ObjectsList.AddRange(obj.ObjectsList); if (Mtl != null) { if (obj.Mtl != null) // We add the data from the other mtl { Mtl.MaterialsList.AddRange(obj.Mtl.MaterialsList); } } else // The current mtl is null { if (obj.Mtl != null) // We take the data from the other mtl { Mtl = obj.Mtl; } } } }