DisplayConduit

public abstract class DisplayConduit

Constructors

DisplayConduit

#
protected DisplayConduit()

Properties

Enabled

#Since v5.0
public bool Enabled { get; set; }

GeometryFilter

#Since v7.0
[CLSCompliant(false)] public ObjectType GeometryFilter { get; set; }
The geometry filter will ensure that your conduit's per-object functions will only be called for objects that are of certain geometry type

SpaceFilter

#Since v6.0
public ActiveSpace SpaceFilter { get; set; }
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

#Since v9.0
public void Bind(RhinoViewport viewport)
Bind this conduit to a specific viewport
viewport (RhinoViewport)

CalculateBoundingBox

#Example
protected virtual void CalculateBoundingBox(CalculateBoundingBoxEventArgs e)
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.

e (CalculateBoundingBoxEventArgs)The event argument contain the current bounding box state.

CalculateBoundingBoxZoomExtents

#
protected virtual void CalculateBoundingBoxZoomExtents(CalculateBoundingBoxEventArgs e)
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.

e (CalculateBoundingBoxEventArgs)The event argument contain the current bounding box state.

DrawForeground

#
protected virtual void DrawForeground(DrawEventArgs e)
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.

e (DrawEventArgs)The event argument contains the current viewport and display state.

DrawOverlay

#
protected virtual void DrawOverlay(DrawEventArgs e)
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.

e (DrawEventArgs)The event argument contains the current viewport and display state.

ExclusiveBind

#Since v9.0
public void ExclusiveBind(RhinoViewport viewport)
Exclusively bind this conduit to a specific viewport
viewport (RhinoViewport)

GetSelectionFilter

#Since v7.0
public void GetSelectionFilter(out bool on, out bool checkSubObjects)
The selection filter will make per-object conduit functions only be called for selected objects (when the filter is turned on)
on (out bool)
checkSubObjects (out bool)

ObjectCulling

#
protected virtual void ObjectCulling(CullObjectEventArgs e)

The default implementation does nothing.

e (CullObjectEventArgs)

OnEnable

#Since v7.0
protected virtual void OnEnable(bool enable)
Called when the enabled state changes for this class instance
enable (bool)

PostDrawObjects

#
protected virtual void PostDrawObjects(DrawEventArgs e)
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.

e (DrawEventArgs)The event argument contains the current viewport and display state.

PostProcessFrameBuffer

#
protected virtual void PostProcessFrameBuffer(PostProcessFrameBufferEventArgs e)
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.

e (PostProcessFrameBufferEventArgs)The event argument gives access to the frame that was drawn.

PreDrawObject

#
protected virtual void PreDrawObject(DrawObjectEventArgs e)
Called before every object in the scene is drawn.
e (DrawObjectEventArgs)

PreDrawObjects

#Example
protected virtual void PreDrawObjects(DrawEventArgs e)
Called before objects are been drawn. Depth writing and testing are on.

The default implementation does nothing.

e (DrawEventArgs)The event argument contain the current viewport and display state.

SetObjectIdFilter

#Since v7.0
public void SetObjectIdFilter(Guid id)
Set an object Id that this conduit's per-object functions will only be called for
id (Guid)

SetObjectIdFilter

#Since v7.0
public void SetObjectIdFilter(IEnumerable<Guid> ids)
Set object Ids that this conduit's per-object functions will only be called for
ids (IEnumerable<Guid>)

SetSelectionFilter

#Since v7.0
public void SetSelectionFilter(bool on, bool checkSubObjects)
The selection filter will make per-object conduit functions only be called for selected objects (when the filter is turned on)
on (bool)
checkSubObjects (bool)

UnbindAll

#Since v9.0
public void UnbindAll()
Remove viewport bindings