private void _RemoveChild(GLModel3D model) { if (model.Parent != this) { throw new InvalidOperationException("The logical parent is error"); } _children.Remove(model); model.Parent = null; }
private void _AddChild(GLModel3D model) { if (model.Parent != null) { throw new InvalidOperationException("The model has a logical parent"); } if (model.Visual != null) { throw new InvalidOperationException("The model has associated visual"); } _children.Add(model); model.Parent = this; }
public void RemoveChild(GLModel3D model) { _RemoveChild(model); _OnChildrenChanged(); }
public void AddChild(GLModel3D model) { _AddChild(model); _OnChildrenChanged(); }