DisplayConduit

public abstract class DisplayConduit

Constructors

DisplayConduit

#
protected DisplayConduit()

Properties

Enabled

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

GeometryFilter

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

SpaceFilter

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

Methods

Bind

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

CalculateBoundingBox

#Example
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.

protected virtual void CalculateBoundingBox(
e
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.

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

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

protected virtual void DrawOverlay(
e
The event argument contains the current viewport and display state.
)

ExclusiveBind

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

GetSelectionFilter

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

ObjectCulling

#

The default implementation does nothing.

protected virtual void ObjectCulling()

OnEnable

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

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.

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

protected virtual void PostProcessFrameBuffer(
e
The event argument gives access to the frame that was drawn.
)

PreDrawObject

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

PreDrawObjects

#Example
Called before objects are been drawn. Depth writing and testing are on.

The default implementation does nothing.

protected virtual void PreDrawObjects(
e
The event argument contain the current viewport and display state.
)

SetObjectIdFilter

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

SetObjectIdFilter

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

SetSelectionFilter

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

UnbindAll

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