/// <summary> /// Removes a mesh from the geometry. /// </summary> public void Remove(IMesh mesh) { if (!meshes.ContainsValue(mesh)) { throw new ArgumentException("No such mesh present"); } else { var meshID = meshes.First(x => x.Value == mesh).Key; RTC.DeleteGeometry(scenePtr, meshID); meshes.Remove(meshID); } }
/// <summary> /// Deletes an instance from this scene. /// </summary> public void Delete(Instance instance) { if (!instances.ContainsValue(instance)) { throw new ArgumentException("No such instance present"); } else { var instanceID = instances.First(x => x.Value == instance).Key; RTC.DeleteGeometry(scenePtr, instanceID); instances.Remove(instanceID); } }
/// <summary> /// Removes a geometry from this scene. /// </summary> public Boolean Remove(Geometry geometry) { CheckDisposed(); if (geometry == null) { throw new ArgumentNullException("geometry"); } if (geometryInverse.ContainsKey(geometry)) { RTC.DeleteGeometry(NativePtr, geometry.ID); geometryMapping.Remove(geometry.ID); geometryInverse.Remove(geometry); return(true); } else { return(false); } }
/// <summary> /// Removes an instance from this scene. /// </summary> public Boolean Remove(Instance instance) { CheckDisposed(); if (instance == null) { throw new ArgumentNullException("instance"); } if (instanceInverse.ContainsKey(instance)) { RTC.DeleteGeometry(NativePtr, instance.ID); instanceMapping.Remove(instance.ID); instanceInverse.Remove(instance); return(true); } else { return(false); } }