Beispiel #1
0
 protected override void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)
 {
     foreach (var rhinoObject in MainReference.Definition.GetObjects())
     {
         e.BoundingBox.Union(rhinoObject.Geometry.GetBoundingBox(false));
     }
 }
 protected override void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)
 {
     if (null != m_brep && m_brep.IsValid)
     {
         e.IncludeBoundingBox(BrepGeometry.GetBoundingBox(false));
     }
 }
 protected virtual void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)
 {
     OculusTracking.StartTracking(RhinoDocument.ActiveDoc);
     Viewports.UpdateEyeViewports(OculusTracking.CamLoc, OculusTracking.CamDir, OculusTracking.CamUp);
     this._mirrorClosed = Viewports.UpdateMirrorViewport(OculusTracking.CamLoc, OculusTracking.CamDir, OculusTracking.CamUp);
     base.CalculateBoundingBox(e);
 }
        protected override void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)
        {
            base.CalculateBoundingBox(e);
            BoundingBox box = CreateBoundingBox();

            e.IncludeBoundingBox(box);
        }
 private void _CalculateBoundingBoxZoomExtents(object sender, CalculateBoundingBoxEventArgs e)
 {
     if (PassesFilter(e))
     {
         CalculateBoundingBoxZoomExtents(e);
     }
 }
Beispiel #6
0
 protected override void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)
 {
     base.CalculateBoundingBox(e);
     Brep[] b = ProjectPlugIn.Instance.beamBreps.Select(o => o.Item2).ToArray();
     foreach (Brep bb in b)
     {
         e.IncludeBoundingBox(bb.GetBoundingBox(false));
     }
 }
        // this is called every frame inside the drawing code so try to do as little as possible
        // in order to not degrade display speed. Don't create new objects if you don't have to as this
        // will incur an overhead on the heap and garbage collection.
        protected override void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)
        {
            base.CalculateBoundingBox(e);
            // Since we are dynamically drawing geometry, we needed to override
            // CalculateBoundingBox. Otherwise, there is a good chance that our
            // dynamically drawing geometry would get clipped.

            // Union the mesh's bbox with the scene's bounding box
            e.BoundingBox.Union(m_bbox);
        }
    protected override void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)
    {
        if (m_draw_device_mesh)
        {
            BoundingBox xformed_bb = m_bounding_box;
            xformed_bb.Transform(m_device_mesh_xform);

            e.BoundingBox.Union(xformed_bb);
        }
    }
 /// <summary>
 /// DisplayConduit.CalculateBoundingBox override.
 /// </summary>
 protected override void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)
 {
     if (!m_bbox.IsValid)
     {
         CreateOutlineCurves();
     }
     if (m_bbox.IsValid)
     {
         e.IncludeBoundingBox(m_bbox);
     }
 }
Beispiel #10
0
 protected override void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)
 {
     if (crvs == null)
     {
         base.CalculateBoundingBox(e);
         return;
     }
     foreach (Curve c in crvs)
     {
         e.IncludeBoundingBox(c.GetBoundingBox(false));
     }
 }
 protected override void CalculateBoundingBoxZoomExtents(CalculateBoundingBoxEventArgs e)
 {
     Rhino.Geometry.BoundingBox bbox = Rhino.Geometry.BoundingBox.Unset;
     if (null != Geometry)
     {
         var localCopy = Geometry.ToList();
         foreach (var obj in localCopy)
         {
             if (obj != null)
             {
                 try { bbox.Union(obj.GetBoundingBox(false)); } catch { }
             }
         }
         e.IncludeBoundingBox(bbox);
     }
 }
Beispiel #12
0
        void DisplayPipeline_CalculateBoundingBox(object sender, CalculateBoundingBoxEventArgs e)
        {
            if (!m_enabled)
            {
                return;
            }
            if (m_disposed)
            {
                return;
            }

            if (e.Viewport.ViewportType == ViewportType.PageViewMainViewport)
            {
                return;
            }
            e.IncludeBoundingBox(m_clip);
        }
Beispiel #13
0
 private void _CalculateBoundingBox(object sender, CalculateBoundingBoxEventArgs e)
 {
     CalculateBoundingBox(e);
 }
 protected override void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)
 {
     base.CalculateBoundingBox(e);
     e.IncludeBoundingBox(MyLine.BoundingBox);
 }
 /// <summary>
 /// DisplayConduit.CalculateBoundingBoxZoomExtents override.
 /// </summary>
 protected override void CalculateBoundingBoxZoomExtents(CalculateBoundingBoxEventArgs e)
 {
     CalculateBoundingBox(e);
 }
        protected override void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)
        {
            var bbox = new BoundingBox(m_points);

            e.IncludeBoundingBox(bbox);
        }
 protected override void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)
 {
     base.CalculateBoundingBox(e);
     RC.BoundingBox bBox = ToRC.Convert(Core.Instance.ActiveDocument.Model.BoundingBox);
     e.IncludeBoundingBox(bBox);
 }
 protected override void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)
 {
     base.CalculateBoundingBox(e);
     e.BoundingBox.Union(e.Display.Viewport.ConstructionPlane().Origin);
 }
 /// <summary>
 /// Library developers should override this function to increase the bounding box of scene so it includes the
 /// geometry that you plan to draw in the "Draw" virtual functions.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="e">The event argument contain the current bounding box state.</param>
 /// <example>
 /// <code source='examples\vbnet\ex_meshdrawing.vb' lang='vbnet'/>
 /// <code source='examples\cs\ex_meshdrawing.cs' lang='cs'/>
 /// <code source='examples\py\ex_meshdrawing.py' lang='py'/>
 /// </example>
 protected virtual void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)
 {
 }
Beispiel #20
0
 private void _CalculateBoundingBoxZoomExtents(object sender, CalculateBoundingBoxEventArgs e)
 {
     CalculateBoundingBoxZoomExtents(e);
 }
Beispiel #21
0
 protected override void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)
 {
     base.CalculateBoundingBox(e);
 }
 /// <summary>
 /// If you want to participate in the Zoom Extents command with your display conduit,
 /// then you will need to override ZoomExtentsBoundingBox.  Typically you could just
 /// call your CalculateBoundingBox override, but you may also want to spend a little
 /// more time here and compute a tighter bounding box for your conduit geometry if
 /// that is needed.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="e">The event argument contain the current bounding box state.</param>
 protected virtual void CalculateBoundingBoxZoomExtents(CalculateBoundingBoxEventArgs e)
 {
 }
Beispiel #23
0
 protected override void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)
 {
     e.BoundingBox.Union(System.BoundingBox);
 }