Skip to content

DisplayPipeline

Public Class

The display pipeline calls events during specific phases of drawing During the drawing of a single frame the events are called in the following order.

[Begin Drawing of a Frame]

  • CalculateBoundingBox
  • CalculateClippingPanes
  • SetupFrustum
  • SetupLighting
  • InitializeFrameBuffer
  • DrawBackground
  • If this is a layout and detail objects exist the channels are called in the same order for each detail object (drawn as a nested viewport)
  • PreDrawObjects
  • For Each Visible Non Highlighted Object
  • PostDrawObjects - depth writing/testing on
  • DrawForeGround - depth writing/testing off
  • For Each Visible Highlighted Object
  • PostProcessFrameBuffer (If a delegate exists that requires this)
  • DrawOverlay (if Rhino is in a feedback mode)

[End of Drawing of a Frame]

NOTE: There may be multiple DrawObject calls for a single object. An example of when this could happen would be with a shaded sphere. The shaded mesh is first drawn and these channels would be processed; then at a later time the isocurves for the sphere would be drawn.

Inheritance Hierarchy

System.Object
Rhino.Display.DisplayPipeline

Namespace: Rhino.Display

Assembly: RhinoCommon (in RhinoCommon.dll)

Syntax

public sealed class DisplayPipeline

The DisplayPipeline type exposes the following members.

Properties

Name

Description


Public Property

Public Property

Public Property

Public Property

Public Property

Gets the curve thickness as defined by the current display mode. Note: this only applies to curve objects, Brep and Mesh wires may have different settings.


Public Property

Public Property

Public Property

Scale factor used for high resolution displays. When a monitor that this pipeline is drawing to is at a DPI of 96, this value is one. On high DPI monitors, this value will commonly be greater than one.


Public Property

Gets a value that indicates whether the pipeline is currently in a grip drawing operation.


Public Property

Gets a value that indicates whether the pipeline is currently in a surface drawing operation. Surface drawing means draw the shaded triangles of a mesh representing the surface (mesh, extrusion, or brep). This is useful when inside of a draw event or display conduit to check and see if the geometry is about to be drawn as a shaded set of triangles representing the geometry. See DrawingWires to check and see if the wireframe representation of the geometry is going to be drawn.


Public Property

Gets a value that indicates whether the pipeline is currently in a curve drawing operation. This is useful when inside of a draw event or display conduit to check and see if the geometry is about to be drawn is going to be drawing the wire representation of the geometry (mesh, extrusion, or brep). See DrawingSurfaces to check and see if the shaded mesh representation of the geometry is going to be drawn.


Public Property

Gets the contents of the frame buffer that this pipeline is drawing to.


Public Property

Gets the size of the frame buffer that this pipeline is drawing to.


Public Property

Gets a value that indicates whether the viewport is in Dynamic Display state. Dynamic display is the state a viewport is in when it is rapidly redrawing because of an operation like panning or rotating. The pipeline will drop some level of detail while inside a dynamic display state to keep the frame rate as high as possible.


Public Property

Gets a value that indicates whether this pipeline is currently drawing for ViewCaptureToFile or ViewCaptureToClipboard


Public Property

Is true of the pipeline is open, false otherwise.


Public Property

Gets a value indicating whether or not this pipeline is drawing into an OpenGL context.


Public Property

Gets a value that indicates whether this pipeline is currently drawing for printing purposes.


Public Property

Gets a value that indicates whether this pipeline is currently using an engine that is performing stereo style drawing. Stereo drawing is for providing an “enhanced 3-D” effect through stereo viewing devices.


Public Property

Gets or sets the current model transformation that is applied to vertices when drawing.


Public Property

Gets a value that indicates whether the Model Transform is an Identity transformation.


Public Property

Gets the current nested viewport drawing level. This is used to know if you are currently inside the drawing of a nested viewport (detail object in Rhino).

Nest level = 0 Drawing is occurring in a standard Rhino viewport or on the page viewport.

Nest level = 1 Drawing is occurring inside a detail view object.


Public Property

Gets the current pass that the pipeline is in for drawing a frame. Typically drawing a frame requires a single pass through the DrawFrameBuffer function, but some special display effects can be achieved through drawing with multiple passes.


Public Property

Gets or sets the “ShadingRequired” flag. This flag gets set inside the pipeline when a request is made to draw a shaded mesh but the current render engine doesn’t support shaded mesh drawing…at this point the redraw mechanism will make sure everything will work the next time around.


Public Property

Gets the current stereo projection if stereo mode is on.

0 = left

1 = right

If stereo mode is not enables, this property always returns 0.


Public Property

Gets whether or not this pipeline supports shaded meshes.


Public Property

Public Property

Methods

Name

Description


Public Method

Add a clipping plane to be used during the drawing of this frame


Public Method
Static Member

If Rhino is using OpenGL for display, this function will return major.minor version of OpenGL available for this instance of Rhino


Public Method

Fill the frame buffer with a single color. This function also clears the depth buffer for engines that support depth buffered drawing.


Public Method

Clones the pipeline. Creates an identical copy of “this” pipeline. Copies all conduits from “this” pipeline to the new pipeline.


Public Method

Closes the pipeline.


Public Method
Static Member

Returns a value indicating if only points on the side of the surface that face the camera are displayed.


Public Method

Public Method

Public Method

Public Method
Code Example

Draws 2D text on the viewport.


Public Method

Draws 2D text on the viewport.


Public Method

Draws 2D text on the viewport.


Public Method

Draws 2D text on the viewport.


Public Method

Draws 2D text on the viewport.


Public Method

Draws 2D text on the viewport.


Public Method

Public Method

Draws 3d text with a different plane than what is defined in the Text3d class.


Public Method

Draws 3d text using the Text3d plane with an adjusted origin.


Public Method

Public Method

Public Method

Public Method

Draws a point in style used during “GetPoint” operations


Public Method

Public Method

Public Method

Draw a single arc object.


Public Method

Draw a single arc object.


Public Method

Draws a single arrow object. An arrow consists of a Shaft and an Arrow head at the end of the shaft.


Public Method
Code Example

Draws a single arrow object. An arrow consists of a Shaft and an Arrow head at the end of the shaft.


Public Method

Draws a single arrow head.


Public Method

Draws a collection of arrow objects. An arrow consists of a Shaft and an Arrow head at the end of the shaft.


Public Method

Draws a collection of arrow objects. An arrow consists of a Shaft and an Arrow head at the end of the shaft.


Public Method
Code Example

Draws a bitmap in screen coordinates


Public Method

Draws the edges of a BoundingBox.


Public Method

Draws the edges of a Box object.


Public Method

Draws the edges of a BoundingBox.


Public Method

Draws the edges of a Box object.


Public Method

Draws corner widgets of a world aligned bounding box. Widget size will be 5% of the Box diagonal.


Public Method

Draws corner widgets of a world aligned bounding box.


Public Method

Draws corner widgets of a world aligned bounding box.


Public Method

Draws a shaded mesh representation of a brep.


Public Method

Draws all the wireframe curves of a brep object.


Public Method

Draws all the wireframe curves of a brep object.


Public Method
Code Example

Draw a single circle object.


Public Method

Draw a single circle object.


Public Method

Draw a wireframe cone.


Public Method

Draw a wireframe cone.


Public Method

Draws a construction plane.


Public Method

Draw a typical Rhino Curvature Graph.


Public Method

Draw a typical Rhino Curvature Graph.


Public Method

Draw a typical Rhino Curvature Graph.


Public Method

Public Method

Draw a single Curve object.


Public Method

Draw a single Curve object.


Public Method

Draw a wireframe cylinder.


Public Method

Draw a wireframe cylinder.


Public Method

Public Method

Draws a text dot in world coordinates.


Public Method

Draws a text dot in screen coordinates.


Public Method

Draw a text dot in world coordinates.


Public Method

Draw a text dot as defined by the text dot class


Public Method

Draws a text dot in screen coordinates.


Public Method

Draws a single dotted line.


Public Method

Draws a single dotted line.


Public Method

Draws a set of connected lines (polyline) in a dotted pattern (0x00001111).


Public Method

Draws all the wireframe curves of an extrusion object.


Public Method

Draws all the wireframe curves of an extrusion object.


Public Method

Public Method

Public Method

Draw a two point gradient filled hatch


Public Method

Public Method

Public Method

Public Method

Public Method

Draws an InstanceDefinition.


Public Method

Draws an InstanceDefinition.


Public Method

Draws a light.


Public Method

Public Method

Draws a single line object.


Public Method

Draws a single line object.


Public Method

Draws a single line object.


Public Method

Draws a single line object.


Public Method

Draws an arrow made up of three line segments.


Public Method

Draws a single line object .This version of line drawing will draw the segments of the line that extend beyond the near and far planes of the view frustum with depths on those planes


Public Method

Draws a set of lines with a given color and thickness. If you want the fastest possible set of lines to be drawn, pass a Line[] for lines.


Public Method

Public Method

Draws a set of lines with a given color and thickness. If you want the fastest possible set of lines to be drawn, pass a Line[] for lines.


Public Method

Draws an arrow marker as a view-aligned widget.


Public Method

Draws an arrow marker as a view-aligned widget.


Public Method

Draws an arrow marker as a view-aligned widget.


Public Method

Draws an arrow marker as a view-aligned widget.


Public Method

Draws the mesh faces as false color patches. The mesh must have Vertex Colors defined for this to work.


Public Method
Code Example

Draws the shaded faces of a given mesh.


Public Method

Draws the shaded faces of a given mesh.


Public Method

Draws all the vertices in a given mesh.


Public Method
Code Example

Draws all the wires in a given mesh.


Public Method

Draws all the wires in a given mesh.


Public Method

Draws a RhinoObject.


Public Method
Code Example

Draws a RhinoObject with an applied transformation.


Public Method

Public Method

Public Method

Public Method

Draws a single line with specified pattern.


Public Method

Draws a single line with specified pattern.


Public Method

Draws a set of connected lines (polyline) with specified pattern.


Public Method

Draws a point using the current display attribute size, style and color


Public Method

Draws a point with a given radius, style and color.


Public Method

Draws a point with a given radius, style and color.


Public Method

Draws a point with a given radius, style and color.


Public Method

Public Method

Draws a point cloud.


Public Method

Draws a point cloud.


Public Method

Draws a point cloud.


Public Method

Draws a point cloud.


Public Method

Public Method

Public Method

Draw a set of points with a given radius, style and color.


Public Method

Draw a set of points with a given radius, style and color.


Public Method

Public Method

Draws a filled, convex polygon from a collection of points.


Public Method

Draws a single Polyline object.


Public Method

Draws a single Polyline object.


Public Method

Public Method

Draw a wireframe sphere.


Public Method

Draw a wireframe sphere.


Public Method

Public Method

Public Method

Draw screen oriented image centered at 2d screen location


Public Method

Public Method

Public Method

Public Method

Public Method

Draws the viewport as seen from the left and the right eye viewports and returns the result as OpenGL texture handles.


Public Method

Draw a shaded mesh representation of a SubD


Public Method

Draws all the wireframe curves of a SubD object


Public Method

Draws all the wireframe curves os a SubD object using different pens


Public Method

Draw wireframe display for a single surface.


Public Method

Public Method

Public Method

Public Method
Static Member

Draw a given viewport to an off-screen bitmap.


Public Method

Draw a wireframe torus.


Public Method

Draw a wireframe torus.


Public Method

Draws a shaded Brep with Zebra stripe preview.


Public Method

Draws a shaded Mesh with Zebra stripe preview.


Public Method

Enable or disable the Clipping Plane logic of the engine.


Public Method

Enable or disable the ColorWriting behavior of the engine.


Public Method

Enable or disable the DepthTesting behavior of the engine. When DepthTesting is disabled, objects in front will no longer occlude objects behind them.


Public Method

Enable or disable the DepthWriting behavior of the engine. When DepthWriting is disabled, drawn geometry does not affect the Z-Buffer.


Public Method

Enable or disable the Lighting logic of the engine.


Public Method

Equals

Determines whether the specified object is equal to the current object.

(Inherited from Object.)


Public Method

Force the pipeline to immediately flush any cached geometry to the display


Public Method
Static Member

Gets the current model and page view draw list serial numbers, which can be used to determine if a model or page view needs to be redrawn.


Public Method

GetHashCode

Serves as the default hash function.

(Inherited from Object.)


Public Method

Get lights that this pipeline is current using


Public Method

Get an array of 16 floats that represents the “camera” to “clip” coordinate transformation in OpenGL’s right handed coordinate system


Public Method

Get an array of 16 floats that represents the “world” to “camera” coordinate transformation in OpenGL’s right handed coordinate system


Public Method

Get an array of 16 floats that represents the “world” to “clip” coordinate transformation in OpenGL’s right handed coordinate system


Public Method

GetType

Gets the Type of the current instance.

(Inherited from Object.)


Public Method

Tests to see if the pipeline should stop drawing more geometry and just show what it has so far. If a drawing operation is taking a long time, this function will return true and tell Rhino it should just finish up and show the frame buffer. This is used in dynamic drawing operations.


Public Method

Determines if an object can be visible in this viewport based on it’s object type and display attributes. This test does not check for visibility based on location of the object. NOTE: Use CRhinoDisplayPipeline::IsVisible() to perform “visibility” tests based on location (is some part of the object in the view frustum). Use CRhinoDisplayPipeline::IsActive() to perform “visibility” tests based on object type.


Public Method

Returns true if the currently drawn frame is part of a tiled capture. Tiled captures are performed when creating large raster outputs.


Public Method

Test a given box for visibility inside the view frustum under the current viewport and model transformation settings.


Public Method

Test a given 3d world coordinate point for visibility inside the view frustum under the current viewport and model transformation settings.


Public Method

Test a given object for visibility inside the view frustum under the current viewport and model transformation settings. This function calls a virtual IsVisibleFinal function that sub-classed pipelines can add extra tests to. In the base class, this test only tests visibility based on the objects world coordinates location and does not pay attention to the object’s attributes. NOTE: Use CRhinoDisplayPipeline::IsVisible() to perform “visibility” tests based on location (is some part of the object in the view frustum). Use CRhinoDisplayPipeline::IsActive() to perform “visibility” tests based on object type.


Public Method
Static Member

Make a “default” OpenGL context current


Public Method

Determines screen rectangle that would be drawn to using the Draw2dText(..) function with the same parameters.


Public Method

Opens the pipeline.


Public Method

Obsolete.

Pop a ClipTesting flag off the engine’s stack.


Public Method

Pop a FaceCull flag off the engine’s stack.


Public Method

Pop a DepthTesting flag off the engine’s stack.


Public Method

Pop a DepthWriting flag off the engine’s stack.


Public Method

Pop a model transformation off the engine’s model transform stack.


Public Method

Pop a view projection off this pipelines projection stack


Public Method

Push the current view projection and set the viewport up to be a simple 2D top projection where the camera frustum matches the same size as the screen port. This allows geometry draw functions to act like they are working with typical 2d graphics APIs on a window


Public Method

Obsolete.

Push a ClipTesting flag on the engine’s stack.


Public Method

Push a FaceCull flag on the engine’s stack.


Public Method

Push a DepthTesting flag on the engine’s stack.


Public Method

Push a DepthWriting flag on the engine’s stack.


Public Method

Push a model transformation on the engine’s model transform stack.


Public Method

Remove a clipping plane from the pipeline for this frame


Public Method

Public Method

Sets up a display material.


Public Method

Sets up a display material.


Public Method

Sets up a display material.


Public Method

ToString

Returns a string that represents the current object.

(Inherited from Object.)


Events

Name

Description


Public Event
Static Member

Public Event
Static Member

Calculate a bounding to include in the Zoom Extents command.


Public Event
Static Member

Public Event
Static Member
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.


Public Event
Static Member

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.


Public Event
Static Member

Public Event
Static Member

Public Event
Static Member

Called right after an individual object has been drawn. NOTE: Do not use this event unless you absolutely need to. It is called for every object in the document and can slow display down if a large number of objects exist in the document


Public Event
Static Member

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.


Public Event
Static Member

Called right before an individual object is being drawn. NOTE: Do not use this event unless you absolutely need to. It is called for every object in the document and can slow display down if a large number of objects exist in the document


Public Event
Static Member

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


Public Event
Static Member

Called before transparent objects have been drawn. Depth writing and testing are on.


Public Event
Static Member

Called when the projection changes for a viewport being drawn.