Esempio n. 1
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);
        }