Esempio n. 1
0
        public static BaseDrawHelp Alloc(BaseDraw bd, BaseDocument doc)
        {
            global::System.IntPtr cPtr = C4dApiPINVOKE.BaseDrawHelp_Alloc(BaseDraw.getCPtr(bd), BaseDocument.getCPtr(doc));
            BaseDrawHelp          ret  = (cPtr == global::System.IntPtr.Zero) ? null : new BaseDrawHelp(cPtr, false);

            return(ret);
        }
Esempio n. 2
0
        public static BaseDraw Alloc()
        {
            global::System.IntPtr cPtr = C4dApiPINVOKE.BaseDraw_Alloc();
            BaseDraw ret = (cPtr == global::System.IntPtr.Zero) ? null : new BaseDraw(cPtr, false);

            return(ret);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        public BaseDraw GetBaseDraw(int num)
        {
            global::System.IntPtr cPtr = C4dApiPINVOKE.BaseDocument_GetBaseDraw(swigCPtr, num);
            BaseDraw ret = (cPtr == global::System.IntPtr.Zero) ? null : new BaseDraw(cPtr, false);

            return(ret);
        }
Esempio n. 5
0
        public static bool PickObject(BaseDraw bd, BaseDocument doc, int x1, int y1, int x2, int y2, SWIGTYPE_p_Int32 xr, SWIGTYPE_p_Int32 yr, SWIGTYPE_p_Int32 wr, SWIGTYPE_p_Int32 hr, SWIGTYPE_p_p_p_ViewportPixel pixels, VIEWPORT_PICK_FLAGS flags, LassoSelection ls, SWIGTYPE_p_C4DObjectList list)
        {
            bool ret = C4dApiPINVOKE.ViewportSelect_PickObject__SWIG_5(BaseDraw.getCPtr(bd), BaseDocument.getCPtr(doc), x1, y1, x2, y2, SWIGTYPE_p_Int32.getCPtr(xr), SWIGTYPE_p_Int32.getCPtr(yr), SWIGTYPE_p_Int32.getCPtr(wr), SWIGTYPE_p_Int32.getCPtr(hr), SWIGTYPE_p_p_p_ViewportPixel.getCPtr(pixels), (int)flags, LassoSelection.getCPtr(ls), SWIGTYPE_p_C4DObjectList.getCPtr(list));

            if (C4dApiPINVOKE.SWIGPendingException.Pending)
            {
                throw C4dApiPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 6
0
        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);
        }
Esempio n. 7
0
        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);
        }
Esempio n. 8
0
        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);
        }
Esempio n. 9
0
        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);
        }
Esempio n. 10
0
        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_Int32 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_Int32.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_Int32.getCPtr(flags)));

            if (C4dApiPINVOKE.SWIGPendingException.Pending)
            {
                throw C4dApiPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 11
0
        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);
        }
Esempio n. 12
0
        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);
        }
Esempio n. 13
0
        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);
        }
Esempio n. 14
0
        public BrushVertexData GetSelected(BaseDocument doc, BaseContainer data, BaseDraw bd, SWIGTYPE_p_Int32 vcnt, int x, int y, double rad, BaseObject op)
        {
            global::System.IntPtr cPtr = C4dApiPINVOKE.BrushBase_GetSelected(swigCPtr, BaseDocument.getCPtr(doc), BaseContainer.getCPtr(data), BaseDraw.getCPtr(bd), SWIGTYPE_p_Int32.getCPtr(vcnt), x, y, rad, BaseObject.getCPtr(op));
            BrushVertexData       ret  = (cPtr == global::System.IntPtr.Zero) ? null : new BrushVertexData(cPtr, false);

            if (C4dApiPINVOKE.SWIGPendingException.Pending)
            {
                throw C4dApiPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Esempio n. 15
0
        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
        }
Esempio n. 16
0
 public Fusee.Math.Core.double3 /* Vector_cstype_out */ CalculateNewPosition(BaseDraw bd, ref Fusee.Math.Core.double4x4 /* constMatrix&_cstype */ mg, Fusee.Math.Core.double3 /* constVector&_cstype */ mouse_pos)
 {
     double[] adbl_mg;
     unsafe { adbl_mg = Fusee.Math.ArrayConvert.double4x4ToArrayDoubleC4DLayout(mg);    fixed(double *pdbl_mg = adbl_mg)
              {
                  /* constMatrix&_csin_pre */
                  try  {/* <Vector_csout> */
                      Fusee.Math.Core.double3 ret = C4dApiPINVOKE.HandleInfo_CalculateNewPosition(swigCPtr, BaseDraw.getCPtr(bd), (global::System.IntPtr)pdbl_mg /* constMatrix&_csin */, ref mouse_pos /* constVector&_csin */);
                      return(ret);
                  } /* <Vector_csout> */ finally {
                      // NOP mg = Fusee.Math.ArrayConvert.ArrayDoubleC4DLayoutTodouble4x4(pdbl_mg);
                      /* constMatrix&_csin_post */
                  }
              }
     } /* constMatrix&_csin_terminator */
 }
Esempio n. 17
0
        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);
        }
Esempio n. 18
0
        public uint VBOInitUpdate(BaseDraw bd)
        {
            uint ret = C4dApiPINVOKE.PolygonObject_VBOInitUpdate(swigCPtr, BaseDraw.getCPtr(bd));

            return(ret);
        }
Esempio n. 19
0
        public virtual bool MoveHandle(BaseObject op, BaseObject undo, Fusee.Math.Core.double3 /* 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);
        }
Esempio n. 20
0
        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);
        }
Esempio n. 21
0
        public virtual DRAWRESULT DrawShadow(BaseObject op, BaseDraw bd, BaseDrawHelp bh)
        {
            DRAWRESULT ret = (DRAWRESULT)C4dApiPINVOKE.ObjectData_DrawShadow(swigCPtr, BaseObject.getCPtr(op), BaseDraw.getCPtr(bd), BaseDrawHelp.getCPtr(bh));

            return(ret);
        }
Esempio n. 22
0
        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);
        }
Esempio n. 23
0
        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);
        }
Esempio n. 24
0
        public int GetHighlightHandle(BaseDraw bd)
        {
            int ret = C4dApiPINVOKE.BaseObject_GetHighlightHandle(swigCPtr, BaseDraw.getCPtr(bd));

            return(ret);
        }
Esempio n. 25
0
        public virtual bool Draw(BaseTag tag, BaseObject op, BaseDraw bd, BaseDrawHelp bh)
        {
            bool ret = C4dApiPINVOKE.TagData_Draw(swigCPtr, BaseTag.getCPtr(tag), BaseObject.getCPtr(op), BaseDraw.getCPtr(bd), BaseDrawHelp.getCPtr(bh));

            return(ret);
        }
Esempio n. 26
0
        public static bool PickObject(BaseDraw bd, BaseDocument doc, int x, int y, int rad, VIEWPORT_PICK_FLAGS flags, LassoSelection ls, SWIGTYPE_p_C4DObjectList list, SWIGTYPE_p_Matrix4d m)
        {
            bool ret = C4dApiPINVOKE.ViewportSelect_PickObject__SWIG_0(BaseDraw.getCPtr(bd), BaseDocument.getCPtr(doc), x, y, rad, (int)flags, LassoSelection.getCPtr(ls), SWIGTYPE_p_C4DObjectList.getCPtr(list), SWIGTYPE_p_Matrix4d.getCPtr(m));

            return(ret);
        }
Esempio n. 27
0
        public virtual bool SceneDraw(GvNode bn, BaseDraw bd, BaseDrawHelp bh, BaseThread bt, int flags, SWIGTYPE_p_void data, uint 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), counter);

            return(ret);
        }
Esempio n. 28
0
 public void VBOEndUpdate(BaseDraw bd)
 {
     C4dApiPINVOKE.PolygonObject_VBOEndUpdate(swigCPtr, BaseDraw.getCPtr(bd));
 }
Esempio n. 29
0
        public bool VBOStartUpdate(BaseDraw bd, GlVertexBufferAccessFlags access, bool latemap)
        {
            bool ret = C4dApiPINVOKE.PolygonObject_VBOStartUpdate(swigCPtr, BaseDraw.getCPtr(bd), (int)access, latemap);

            return(ret);
        }
Esempio n. 30
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(BaseDraw obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }