Example #1
0
        public DrawClippingPlanesConduit(ClipGumballBox box)
        {
            d_box = box;


            d_corners = d_box.box.GetCorners();
            d_center  = d_box.Center;

            Plane planeXplus = new Plane(d_corners[2], d_corners[1], d_corners[6]);

            XplusCenter = planeXplus.ClosestPoint(d_center);
            XplusVec    = new Vector3d(d_center - XplusCenter);

            Plane planeXminus = new Plane(d_corners[0], d_corners[3], d_corners[4]);

            XminusCenter = planeXminus.ClosestPoint(d_center);
            XminusVec    = new Vector3d(d_center - XminusCenter);

            Plane planeYplus = new Plane(d_corners[3], d_corners[2], d_corners[7]);

            YplusCenter = planeYplus.ClosestPoint(d_center);
            YplusVec    = new Vector3d(d_center - YplusCenter);


            Plane planeYminus = new Plane(d_corners[1], d_corners[0], d_corners[5]);

            YminusCenter = planeYminus.ClosestPoint(d_center);
            YminusVec    = new Vector3d(d_center - YminusCenter);


            Plane planeZplus = new Plane(d_corners[5], d_corners[4], d_corners[6]);

            ZplusCenter = planeZplus.ClosestPoint(d_center);
            ZplusVec    = new Vector3d(d_center - ZplusCenter);


            Plane planeZminus = new Plane(d_corners[0], d_corners[1], d_corners[3]);

            ZminusCenter = planeZminus.ClosestPoint(d_center);
            ZminusVec    = new Vector3d(d_center - ZminusCenter);
        }
Example #2
0
        public ClipGumballBoxGetPoint(ClipGumballBox Box, RhinoDoc doc, DrawClippingPlanesConduit m_draw_clipping_plane,
                                      GumballDisplayConduit X_plus, GumballDisplayConduit X_minus,
                                      GumballDisplayConduit Y_plus, GumballDisplayConduit Y_minus,
                                      GumballDisplayConduit Z_plus, GumballDisplayConduit Z_minus)
        {
            m_Box             = Box;
            x_height_plus_dc  = X_plus;
            x_height_minus_dc = X_minus;
            y_height_plus_dc  = Y_plus;
            y_height_minus_dc = Y_minus;
            z_height_plus_dc  = Z_plus;
            z_height_minus_dc = Z_minus;


            m_clipping_plane = m_draw_clipping_plane;

            m_base_origin = Point3d.Unset;
            m_base_point  = Point3d.Unset;

            m_doc = doc;
        }