DisplayConduit
Constructors
DisplayConduit
#protected DisplayConduit()
Properties
The geometry filter will ensure that your conduit's per-object functions will only be called for objects that are of certain geometry type
If you want this conduit to only work in a specific space (model or page), then set this filter to that specific space. The default is None meaning no filter is applied
Methods
Bind this conduit to a specific viewport
Parameters:
| viewport (RhinoViewport) |
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.
The default implementation does nothing.
Parameters:
| e (CalculateBoundingBoxEventArgs) | The event argument contain the current bounding box state. |
CalculateBoundingBoxZoomExtents
#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.
The default implementation does nothing.
Parameters:
| e (CalculateBoundingBoxEventArgs) | The event argument contain the current bounding box state. |
DrawForeground
#Called after all non-highlighted objects have been drawn and PostDrawObjects has been called. Depth writing and testing are turned OFF. If you want to draw with depth writing/testing, see PostDrawObjects.
The default implementation does nothing.
Parameters:
| e (DrawEventArgs) | The event argument contains the current viewport and display state. |
DrawOverlay
#If Rhino is in a feedback mode, the draw overlay call allows for temporary geometry to be drawn on top of everything in the scene. This is similar to the dynamic draw routine that occurs with custom get point.
The default implementation does nothing.
Parameters:
| e (DrawEventArgs) | The event argument contains the current viewport and display state. |
Exclusively bind this conduit to a specific viewport
Parameters:
| viewport (RhinoViewport) |
The selection filter will make per-object conduit functions only be called for selected objects (when the filter is turned on)
Called when the enabled state changes for this class instance
Parameters:
| enable (bool) |
PostDrawObjects
#Called after all non-highlighted objects have been drawn. Depth writing and testing are still turned on. If you want to draw without depth writing/testing, see DrawForeground.
The default implementation does nothing.
Parameters:
| e (DrawEventArgs) | The event argument contains the current viewport and display state. |
PostProcessFrameBuffer
#Called after the frame has been drawn, with the finished frame available to be read. Use this to record or stream a viewport: reading the frame here copies the one that was just drawn, and never redraws the scene.
Overriding this makes every frame cost an extra frame buffer read back for as long as the conduit is enabled, whether or not the override reads anything.
The override runs on the thread that drew the frame and holds up the next one. Copy the pixels here and do the rest of the work somewhere else.
The default implementation does nothing.
Parameters:
| e (PostProcessFrameBufferEventArgs) | The event argument gives access to the frame that was drawn. |
Called before objects are been drawn. Depth writing and testing are on.
The default implementation does nothing.
Parameters:
| e (DrawEventArgs) | The event argument contain the current viewport and display state. |
Set an object Id that this conduit's per-object functions will only be called for
Parameters:
| id (Guid) |
Set object Ids that this conduit's per-object functions will only be called for
Parameters:
| ids (IEnumerable<Guid>) |
The selection filter will make per-object conduit functions only be called for selected objects (when the filter is turned on)