public void OnMouseUp() { _mouseDown = MouseDownOnPolygon.Nothing; }
/// <summary> /// This will return true if it can hangle the click. Otherwise it returns false /// </summary> public bool OnMouseDown(MyVector mousePos) { bool retVal = true; MyVector localPos = mousePos - this.Position; if (Utility3D.GetDistance3D(localPos, this.RotateHandleX) <= DOTRADIUS) { _mouseDown = MouseDownOnPolygon.RotateX; _offset = this.RotateHandleX - localPos; } else if (Utility3D.GetDistance3D(localPos, this.RotateHandleY) <= DOTRADIUS) { _mouseDown = MouseDownOnPolygon.RotateY; _offset = this.RotateHandleY - localPos; } else if (Utility3D.GetDistance3D(localPos, this.RotateHandleZ) <= DOTRADIUS) { _mouseDown = MouseDownOnPolygon.RotateZ; _offset = this.RotateHandleZ - localPos; } else if (localPos.GetMagnitudeSquared() <= this.Radius * this.Radius) // I want to do this last { _mouseDown = MouseDownOnPolygon.Ball; _offset = this.Position - mousePos; } else { retVal = false; } return retVal; }