public override int DetectHandle(BaseObject op, BaseDraw bd, int x, int y, QUALIFIER qualifier) { if (0 != (qualifier & QUALIFIER.QUALIFIER_CTRL)) return -1; double4x4 mg = op.GetMg(); if (bd.PointInRange(mg * GetRTHandle(op,0),x,y)) return 0; // OK return -1; // Not OK }
public override DRAWRESULT Draw(BaseObject op, DRAWPASS type, BaseDraw bd, BaseDrawHelp bh) { if (type!=DRAWPASS.DRAWPASS_HANDLES) return DRAWRESULT.DRAWRESULT_SKIP; int hitid = op.GetHighlightHandle(bd); double4x4 m = bh.GetMg(); if (hitid==0) bd.SetPen(C4dApi.GetViewColor(C4dApi.VIEWCOLOR_SELECTION_PREVIEW)); else bd.SetPen(C4dApi.GetViewColor(C4dApi.VIEWCOLOR_ACTIVEPOINT)); // double3 zeroPos = new double3(0, 0, 0); bd.SetMatrix_Matrix(op, ref m); bd.DrawHandle(GetRTHandle(op, 0), DRAWHANDLE.DRAWHANDLE_BIG,0); bd.DrawLine(GetRTHandle(op, 0), new double3(0, 0, 0),0); return DRAWRESULT.DRAWRESULT_OK; }
public virtual bool MoveHandle(BaseObject op, BaseObject undo, Fusee.Math.Core.Vector3D /* constVector&_cstype */ mouse_pos, int hit_id, QUALIFIER qualifier, BaseDraw bd) { bool ret = C4dApiPINVOKE.ObjectData_MoveHandle(swigCPtr, BaseObject.getCPtr(op), BaseObject.getCPtr(undo), ref mouse_pos /* constVector&_csin */, hit_id, (int)qualifier, BaseDraw.getCPtr(bd)); return ret; }
public bool VBOStartUpdate(BaseDraw bd, GlVertexBufferAccessFlags access, bool latemap) { bool ret = C4dApiPINVOKE.PolygonObject_VBOStartUpdate(swigCPtr, BaseDraw.getCPtr(bd), (int)access, latemap); return ret; }
public int GetHighlightHandle(BaseDraw bd) { int ret = C4dApiPINVOKE.BaseObject_GetHighlightHandle(swigCPtr, BaseDraw.getCPtr(bd)); return ret; }
public bool MouseInput(BaseDocument doc, BaseContainer data, BaseDraw bd, SWIGTYPE_p_EditorWindow win, BaseContainer msg) { bool ret = C4dApiPINVOKE.BrushBase_MouseInput(swigCPtr, BaseDocument.getCPtr(doc), BaseContainer.getCPtr(data), BaseDraw.getCPtr(bd), SWIGTYPE_p_EditorWindow.getCPtr(win), BaseContainer.getCPtr(msg)); if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public bool UpdateCache(BaseDocument doc, BaseContainer data, BaseDraw bd, bool force) { bool ret = C4dApiPINVOKE.BrushBase_UpdateCache(swigCPtr, BaseDocument.getCPtr(doc), BaseContainer.getCPtr(data), BaseDraw.getCPtr(bd), force); if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public static BaseDrawHelp Alloc(BaseDraw bd, BaseDocument doc) { IntPtr cPtr = C4dApiPINVOKE.BaseDrawHelp_Alloc(BaseDraw.getCPtr(bd), BaseDocument.getCPtr(doc)); BaseDrawHelp ret = (cPtr == IntPtr.Zero) ? null : new BaseDrawHelp(cPtr, false); return ret; }
public Fusee.Math.Core.Vector3D /* Vector_cstype_out */ CalculateNewPosition(BaseDraw bd, ref Fusee.Math.Core.Matrix4D /* constMatrix&_cstype */ mg, Fusee.Math.Core.Vector3D /* constVector&_cstype */ mouse_pos) { double[] adbl_mg; unsafe {adbl_mg = Fusee.Math.ArrayConversion.Convert.Matrix4DToArrayDoubleC4DLayout(mg); fixed (double *pdbl_mg = adbl_mg) { /* constMatrix&_csin_pre */ try { /* <Vector_csout> */ Fusee.Math.Core.Vector3D ret = C4dApiPINVOKE.HandleInfo_CalculateNewPosition(swigCPtr, BaseDraw.getCPtr(bd), (IntPtr) pdbl_mg /* constMatrix&_csin */, ref mouse_pos /* constVector&_csin */); return ret; } /* <Vector_csout> */ finally { // NOP mg = Fusee.Math.ArrayConversion.Convert.ArrayDoubleC4DLayoutToMatrix4D(pdbl_mg); /* constMatrix&_csin_post */ } } } /* constMatrix&_csin_terminator */ }
public virtual bool GetCursorInfo(BaseDocument doc, BaseContainer data, BaseDraw bd, double x, double y, BaseContainer bc) { bool ret = (SwigDerivedClassHasMethod("GetCursorInfo", swigMethodTypes7) ? C4dApiPINVOKE.BrushToolData_GetCursorInfoSwigExplicitBrushToolData(swigCPtr, BaseDocument.getCPtr(doc), BaseContainer.getCPtr(data), BaseDraw.getCPtr(bd), x, y, BaseContainer.getCPtr(bc)) : C4dApiPINVOKE.BrushToolData_GetCursorInfo(swigCPtr, BaseDocument.getCPtr(doc), BaseContainer.getCPtr(data), BaseDraw.getCPtr(bd), x, y, BaseContainer.getCPtr(bc))); if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public virtual bool MouseInputEnd(BaseDocument doc, BaseContainer data, BaseDraw bd, SWIGTYPE_p_EditorWindow win, BaseContainer msg) { bool ret = (SwigDerivedClassHasMethod("MouseInputEnd", swigMethodTypes11) ? C4dApiPINVOKE.BrushToolData_MouseInputEndSwigExplicitBrushToolData(swigCPtr, BaseDocument.getCPtr(doc), BaseContainer.getCPtr(data), BaseDraw.getCPtr(bd), SWIGTYPE_p_EditorWindow.getCPtr(win), BaseContainer.getCPtr(msg)) : C4dApiPINVOKE.BrushToolData_MouseInputEnd(swigCPtr, BaseDocument.getCPtr(doc), BaseContainer.getCPtr(data), BaseDraw.getCPtr(bd), SWIGTYPE_p_EditorWindow.getCPtr(win), BaseContainer.getCPtr(msg))); if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public virtual bool MouseInputDrag(BaseDocument doc, BaseContainer data, BaseDraw bd, SWIGTYPE_p_EditorWindow win, BaseContainer msg, BrushVertexData vdata, int vcnt, double x, double y, SWIGTYPE_p_LONG flags) { bool ret = (SwigDerivedClassHasMethod("MouseInputDrag", swigMethodTypes10) ? C4dApiPINVOKE.BrushToolData_MouseInputDragSwigExplicitBrushToolData(swigCPtr, BaseDocument.getCPtr(doc), BaseContainer.getCPtr(data), BaseDraw.getCPtr(bd), SWIGTYPE_p_EditorWindow.getCPtr(win), BaseContainer.getCPtr(msg), BrushVertexData.getCPtr(vdata), vcnt, x, y, SWIGTYPE_p_LONG.getCPtr(flags)) : C4dApiPINVOKE.BrushToolData_MouseInputDrag(swigCPtr, BaseDocument.getCPtr(doc), BaseContainer.getCPtr(data), BaseDraw.getCPtr(bd), SWIGTYPE_p_EditorWindow.getCPtr(win), BaseContainer.getCPtr(msg), BrushVertexData.getCPtr(vdata), vcnt, x, y, SWIGTYPE_p_LONG.getCPtr(flags))); if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public bool Init(int w, int h, BaseDraw bd, AtomArray ar, int mode, bool onlyvisible) { bool ret = C4dApiPINVOKE.ViewportSelect_Init__SWIG_3(swigCPtr, w, h, BaseDraw.getCPtr(bd), AtomArray.getCPtr(ar), mode, onlyvisible); return ret; }
public bool Init(int w, int h, BaseDraw bd, AtomArray ar, int mode, bool onlyvisible, SWIGTYPE_p_VIEWPORTSELECTFLAGS flags) { bool ret = C4dApiPINVOKE.ViewportSelect_Init__SWIG_2(swigCPtr, w, h, BaseDraw.getCPtr(bd), AtomArray.getCPtr(ar), mode, onlyvisible, SWIGTYPE_p_VIEWPORTSELECTFLAGS.getCPtr(flags)); if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public bool Init(int w, int h, BaseDraw bd, BaseObject op, int mode, bool onlyvisible) { bool ret = C4dApiPINVOKE.ViewportSelect_Init__SWIG_1(swigCPtr, w, h, BaseDraw.getCPtr(bd), BaseObject.getCPtr(op), mode, onlyvisible); return ret; }
public static bool PickObject(BaseDraw bd, BaseDocument doc, int x, int y, int rad, SWIGTYPE_p_VIEWPORT_PICK_FLAGS flags, LassoSelection ls, SWIGTYPE_p_C4DObjectList list) { bool ret = C4dApiPINVOKE.ViewportSelect_PickObject__SWIG_1(BaseDraw.getCPtr(bd), BaseDocument.getCPtr(doc), x, y, rad, SWIGTYPE_p_VIEWPORT_PICK_FLAGS.getCPtr(flags), LassoSelection.getCPtr(ls), SWIGTYPE_p_C4DObjectList.getCPtr(list)); if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public bool AddUndo(BaseDraw bd) { bool ret = C4dApiPINVOKE.BaseDocument_AddUndo__SWIG_1(swigCPtr, BaseDraw.getCPtr(bd)); return ret; }
public static int IntersectionTest(PolygonObject op, BaseDraw bd, double x, double y, ref Fusee.Math.Core.Matrix4D /* constMatrix&_cstype */ mg, SWIGTYPE_p_Real z, MODELINGCOMMANDMODE mode, SWIGTYPE_p_UCHAR pPointSelect, int lSelectCount) { double[] adbl_mg; unsafe {adbl_mg = Fusee.Math.ArrayConversion.Convert.Matrix4DToArrayDoubleC4DLayout(mg); fixed (double *pdbl_mg = adbl_mg) { /* constMatrix&_csin_pre */ try { int ret = C4dApiPINVOKE.IntersectionTest(PolygonObject.getCPtr(op), BaseDraw.getCPtr(bd), x, y, (IntPtr) pdbl_mg /* constMatrix&_csin */, SWIGTYPE_p_Real.getCPtr(z), (int)mode, SWIGTYPE_p_UCHAR.getCPtr(pPointSelect), lSelectCount); return ret; } finally { // NOP mg = Fusee.Math.ArrayConversion.Convert.ArrayDoubleC4DLayoutToMatrix4D(pdbl_mg); /* constMatrix&_csin_post */ } } } /* constMatrix&_csin_terminator */ }
} /* </String_csout> */ public virtual bool SceneDraw(GvNode bn, BaseDraw bd, BaseDrawHelp bh, BaseThread bt, int flags, SWIGTYPE_p_void data, SWIGTYPE_p_ULONG counter) { bool ret = C4dApiPINVOKE.GvOperatorData_SceneDraw(swigCPtr, GvNode.getCPtr(bn), BaseDraw.getCPtr(bd), BaseDrawHelp.getCPtr(bh), BaseThread.getCPtr(bt), flags, SWIGTYPE_p_void.getCPtr(data), SWIGTYPE_p_ULONG.getCPtr(counter)); if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public static bool CalculateVisiblePoints(BaseDraw bd, PolygonObject op, ref Fusee.Math.Core.Vector3D /* Vector*&_cstype */ padr, SWIGTYPE_p_UCHAR pset, bool select_visibonly) { bool ret = C4dApiPINVOKE.CalculateVisiblePoints(BaseDraw.getCPtr(bd), PolygonObject.getCPtr(op), ref padr /* Vector*&_csin */, SWIGTYPE_p_UCHAR.getCPtr(pset), select_visibonly); return ret; }
public BrushVertexData GetSelected(BaseDocument doc, BaseContainer data, BaseDraw bd, SWIGTYPE_p_LONG vcnt, int x, int y, double rad, BaseObject op) { IntPtr cPtr = C4dApiPINVOKE.BrushBase_GetSelected(swigCPtr, BaseDocument.getCPtr(doc), BaseContainer.getCPtr(data), BaseDraw.getCPtr(bd), SWIGTYPE_p_LONG.getCPtr(vcnt), x, y, rad, BaseObject.getCPtr(op)); BrushVertexData ret = (cPtr == IntPtr.Zero) ? null : new BrushVertexData(cPtr, false); if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public static bool DrawViews(DRAWFLAGS flags, BaseDraw bd) { bool ret = C4dApiPINVOKE.DrawViews__SWIG_0((int)flags, BaseDraw.getCPtr(bd)); return ret; }
public bool GetCursorInfo(BaseDocument doc, BaseContainer data, BaseDraw bd, double x, double y, BaseContainer bc) { bool ret = C4dApiPINVOKE.BrushBase_GetCursorInfo(swigCPtr, BaseDocument.getCPtr(doc), BaseContainer.getCPtr(data), BaseDraw.getCPtr(bd), x, y, BaseContainer.getCPtr(bc)); if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public static void StartEditorRender(bool active_only, bool raybrush, int x1, int y1, int x2, int y2, BaseThread bt, BaseDraw bd, bool newthread) { C4dApiPINVOKE.StartEditorRender(active_only, raybrush, x1, y1, x2, y2, BaseThread.getCPtr(bt), BaseDraw.getCPtr(bd), newthread); }
internal static HandleRef getCPtr(BaseDraw obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; }
public int StereoGetCameraCount(BaseDocument doc, BaseDraw bd, RenderData rd, int flags) { int ret = C4dApiPINVOKE.CameraObject_StereoGetCameraCount(swigCPtr, BaseDocument.getCPtr(doc), BaseDraw.getCPtr(bd), RenderData.getCPtr(rd), flags); return ret; }
public SWIGTYPE_p_ULONG VBOInitUpdate(BaseDraw bd) { SWIGTYPE_p_ULONG ret = new SWIGTYPE_p_ULONG(C4dApiPINVOKE.PolygonObject_VBOInitUpdate(swigCPtr, BaseDraw.getCPtr(bd)), true); return ret; }
public bool StereoGetCameraInfo(BaseDocument doc, BaseDraw bd, RenderData rd, int n, SWIGTYPE_p_StereoCameraInfo info, int flags) { bool ret = C4dApiPINVOKE.CameraObject_StereoGetCameraInfo(swigCPtr, BaseDocument.getCPtr(doc), BaseDraw.getCPtr(bd), RenderData.getCPtr(rd), n, SWIGTYPE_p_StereoCameraInfo.getCPtr(info), flags); if (C4dApiPINVOKE.SWIGPendingException.Pending) throw C4dApiPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public void VBOEndUpdate(BaseDraw bd) { C4dApiPINVOKE.PolygonObject_VBOEndUpdate(swigCPtr, BaseDraw.getCPtr(bd)); }
public virtual int DetectHandle(BaseObject op, BaseDraw bd, int x, int y, QUALIFIER qualifier) { int ret = C4dApiPINVOKE.ObjectData_DetectHandle(swigCPtr, BaseObject.getCPtr(op), BaseDraw.getCPtr(bd), x, y, (int)qualifier); return ret; }