/// <summary> /// 将制定物体Pin在物理世界 /// </summary> /// <param name="obj"></param> /// <param name="position"></param> /// <returns></returns> public Handle Pin(IPin obj, Vector2D position) { if (!_pins.ContainsKey(obj)) { _pins[obj] = obj.Pin(this, position); } else { throw new InvalidOperationException("Can't pin target object which was alreadly pinned."); } return(_pins[obj]); }