Ejemplo n.º 1
0
        internal IntPtr CreatePointer()
        {
            IntPtr pGumballAppearance = UnsafeNativeMethods.CRhinoGumballAppearance_New();

            UnsafeNativeMethods.CRhinoGumballAppearance_SetBool(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceBools.EnableRelocate, RelocateEnabled);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetBool(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceBools.EnableMenu, MenuEnabled);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetBool(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceBools.EnableXTranslate, TranslateXEnabled);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetBool(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceBools.EnableYTranslate, TranslateYEnabled);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetBool(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceBools.EnableZTranslate, TranslateZEnabled);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetBool(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceBools.EnableXYTranslate, TranslateXYEnabled);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetBool(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceBools.EnableYZTranslate, TranslateYZEnabled);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetBool(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceBools.EnableZXTranslate, TranslateZXEnabled);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetBool(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceBools.EnableXRotate, RotateXEnabled);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetBool(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceBools.EnableYRotate, RotateYEnabled);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetBool(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceBools.EnableZRotate, RotateZEnabled);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetBool(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceBools.EnableXScale, ScaleXEnabled);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetBool(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceBools.EnableYScale, ScaleYEnabled);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetBool(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceBools.EnableZScale, ScaleZEnabled);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetInt(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceInts.EnableFreeTranslate, FreeTranslate);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetInt(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceInts.Xcolor, ColorX.ToArgb());
            UnsafeNativeMethods.CRhinoGumballAppearance_SetInt(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceInts.Ycolor, ColorY.ToArgb());
            UnsafeNativeMethods.CRhinoGumballAppearance_SetInt(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceInts.Zcolor, ColorZ.ToArgb());
            UnsafeNativeMethods.CRhinoGumballAppearance_SetInt(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceInts.Menubuttoncolor, ColorMenuButton.ToArgb());
            UnsafeNativeMethods.CRhinoGumballAppearance_SetInt(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceInts.Gumball_radius, Radius);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetInt(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceInts.Gumball_tip_length, ArrowHeadLength);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetInt(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceInts.Gumball_tip_width, ArrowHeadWidth);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetInt(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceInts.Gumball_tail_size, ScaleGripSize);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetInt(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceInts.Gumball_ptran_dist, PlanarTranslationGripCorner);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetInt(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceInts.Gumball_ptran_size, PlanarTranslationGripSize);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetInt(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceInts.Axis_thickness, AxisThickness);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetInt(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceInts.Arc_thickness, ArcThickness);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetInt(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceInts.Menu_dist, MenuDistance);
            UnsafeNativeMethods.CRhinoGumballAppearance_SetInt(pGumballAppearance, UnsafeNativeMethods.GumbalAppearanceInts.Menu_size, MenuSize);
            return(pGumballAppearance);
        }