Click or drag to resize

DisplayPipeline 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
SystemObject
  Rhino.DisplayDisplayPipeline

Namespace:  Rhino.Display
Assembly:  RhinoCommon (in RhinoCommon.dll) Version: Rhino 6.0
Syntax
public sealed class DisplayPipeline

The DisplayPipeline type exposes the following members.

Properties
  NameDescription
Public propertyDefaultCurveThickness
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 propertyDepthMode
Public propertyDisplayPipelineAttributes
Public propertyDpiScale
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 propertyDrawingGrips
Gets a value that indicates whether the pipeline is currently in a grip drawing operation.
Public propertyDrawingSurfaces
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 propertyDrawingWires
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 propertyFrameBuffer
Gets the contents of the framebuffer that this pipeline is drawing to.
Public propertyFrameSize
Gets the size of the framebuffer that this pipeline is drawing to.
Public propertyIsDynamicDisplay
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 propertyIsInViewCapture
Gets a value that indicates whether this pipeline is currently drawing for ViewCaptureToFile or ViewCaptureToClipboard
Public propertyIsOpenGL
Gets a value indicating whether or not this pipeline is drawing into an OpenGL context.
Public propertyIsPrinting
Gets a value that indicates whether this pipeline is currently drawing for printing purposes.
Public propertyIsStereoMode
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 propertyModelTransform
Gets or sets the current model transformation that is applied to vertices when drawing.
Public propertyModelTransformIsIdentity
Gets a value that indicates whether the Model Transform is an Identity transformation.
Public propertyNestLevel
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 occuring in a standard Rhino viewport or on the page viewport.

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

Public propertyRenderPass
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 propertyShadingRequired
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 propertyStereoProjection
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 propertySupportsShading
Gets whether or not this pipeline supports shaded meshes.
Public propertyViewport
Public propertyZBiasMode
Top
Methods
  NameDescription
Public methodStatic memberCullControlPolygon
Returns a value indicating if only points on the side of the surface that face the camera are displayed.
Public methodDraw2dLine(Point, Point, Color, Single)
Public methodDraw2dLine(PointF, PointF, Color, Single)
Public methodDraw2dRectangle
Public methodCode exampleDraw2dText(String, Color, Point2d, Boolean)
Draws 2D text on the viewport.
Public methodDraw2dText(String, Color, Point3d, Boolean)
Draws 2D text on the viewport.
Public methodDraw2dText(String, Color, Point2d, Boolean, Int32)
Draws 2D text on the viewport.
Public methodDraw2dText(String, Color, Point3d, Boolean, Int32)
Draws 2D text on the viewport.
Public methodDraw2dText(String, Color, Point2d, Boolean, Int32, String)
Draws 2D text on the viewport.
Public methodDraw2dText(String, Color, Point3d, Boolean, Int32, String)
Draws 2D text on the viewport.
Public methodDraw3dText(Text3d, Color)
Public methodDraw3dText(Text3d, Color, Plane)
Draws 3d text with a different plane than what is defined in the Text3d class.
Public methodDraw3dText(Text3d, Color, Point3d)
Draws 3d text using the Text3d plane with an adjusted origin.
Public methodDraw3dText(String, Color, Plane, Double, String)
Public methodDraw3dText(String, Color, Plane, Double, String, Boolean, Boolean)
Public methodDrawActivePoint
Draws a point in style used during "GetPoint" operations
Public methodDrawAnnotation
Public methodDrawAnnotationArrowhead
Public methodDrawArc(Arc, Color)
Draw a single arc object.
Public methodDrawArc(Arc, Color, Int32)
Draw a single arc object.
Public methodDrawArrow(Line, Color)
Draws a single arrow object. An arrow consists of a Shaft and an Arrow head at the end of the shaft.
Public methodCode exampleDrawArrow(Line, Color, Double, Double)
Draws a single arrow object. An arrow consists of a Shaft and an Arrow head at the end of the shaft.
Public methodDrawArrowHead
Draws a single arrow head.
Public methodDrawArrows(Line, Color)
Draws a collection of arrow objects. An arrow consists of a Shaft and an Arrow head at the end of the shaft.
Public methodDrawArrows(IEnumerableLine, Color)
Draws a collection of arrow objects. An arrow consists of a Shaft and an Arrow head at the end of the shaft.
Public methodCode exampleDrawBitmap
Draws a bitmap in screen coordinates
Public methodDrawBox(BoundingBox, Color)
Draws the edges of a BoundingBox.
Public methodDrawBox(Box, Color)
Draws the edges of a Box object.
Public methodDrawBox(BoundingBox, Color, Int32)
Draws the edges of a BoundingBox.
Public methodDrawBox(Box, Color, Int32)
Draws the edges of a Box object.
Public methodDrawBoxCorners(BoundingBox, Color)
Draws corner widgets of a world aligned boundingbox. Widget size will be 5% of the Box diagonal.
Public methodDrawBoxCorners(BoundingBox, Color, Double)
Draws corner widgets of a world aligned boundingbox.
Public methodDrawBoxCorners(BoundingBox, Color, Double, Int32)
Draws corner widgets of a world aligned boundingbox.
Public methodDrawBrepShaded
Draws a shaded mesh representation of a brep.
Public methodDrawBrepWires(Brep, Color)
Draws all the wireframe curves of a brep object.
Public methodDrawBrepWires(Brep, Color, Int32)
Draws all the wireframe curves of a brep object.
Public methodCode exampleDrawCircle(Circle, Color)
Draw a single circle object.
Public methodDrawCircle(Circle, Color, Int32)
Draw a single circle object.
Public methodDrawCone(Cone, Color)
Draw a wireframe cone.
Public methodDrawCone(Cone, Color, Int32)
Draw a wireframe cone.
Public methodDrawConstructionPlane
Public methodDrawCurvatureGraph(Curve, Color)
Draw a typical Rhino Curvature Graph.
Public methodDrawCurvatureGraph(Curve, Color, Int32)
Draw a typical Rhino Curvature Graph.
Public methodDrawCurvatureGraph(Curve, Color, Int32, Int32, Int32)
Draw a typical Rhino Curvature Graph.
Public methodDrawCurve(Curve, Color)
Draw a single Curve object.
Public methodDrawCurve(Curve, Color, Int32)
Draw a single Curve object.
Public methodDrawCylinder(Cylinder, Color)
Draw a wireframe cylinder.
Public methodDrawCylinder(Cylinder, Color, Int32)
Draw a wireframe cylinder.
Public methodDrawDirectionArrow
Public methodDrawDot(Point3d, String)
Draws a text dot in world coordinates.
Public methodDrawDot(Single, Single, String)
Draws a text dot in screen coordinates.
Public methodDrawDot(Point3d, String, Color, Color)
Draw a text dot in world coordinates.
Public methodDrawDot(TextDot, Color, Color, Color)
Draw a text dot as defined by the text dot class
Public methodDrawDot(Single, Single, String, Color, Color)
Draws a text dot in screen coordinates.
Public methodDrawDottedLine(Line, Color)
Draws a single dotted line.
Public methodDrawDottedLine(Point3d, Point3d, Color)
Draws a single dotted line.
Public methodDrawDottedPolyline
Draws a set of connected lines (polyline) in a dotted pattern (0x00001111).
Public methodDrawExtrusionWires(Extrusion, Color)
Draws all the wireframe curves of an extrusion object.
Public methodDrawExtrusionWires(Extrusion, Color, Int32)
Draws all the wireframe curves of an extrusion object.
Public methodDrawHatch
Public methodDrawLine(Line, Color)
Draws a single line object.
Public methodDrawLine(Line, Color, Int32)
Draws a single line object.
Public methodDrawLine(Point3d, Point3d, Color)
Draws a single line object.
Public methodDrawLine(Point3d, Point3d, Color, Int32)
Draws a single line object.
Public methodDrawLineArrow
Draws an arrow made up of three line segments.
Public methodDrawLines(IEnumerableLine, Color)
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 methodDrawLines(IEnumerableLine, Color, Int32)
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 methodDrawMarker(Point3d, Vector3d, Color)
Draws an arrow marker as a view-aligned widget.
Public methodDrawMarker(Point3d, Vector3d, Color, Int32)
Draws an arrow marker as a view-aligned widget.
Public methodDrawMarker(Point3d, Vector3d, Color, Int32, Double)
Draws an arrow marker as a view-aligned widget.
Public methodDrawMarker(Point3d, Vector3d, Color, Int32, Double, Double)
Draws an arrow marker as a view-aligned widget.
Public methodDrawMeshFalseColors
Draws the mesh faces as false color patches. The mesh must have Vertex Colors defined for this to work.
Public methodCode exampleDrawMeshShaded(Mesh, DisplayMaterial)
Draws the shaded faces of a given mesh.
Public methodDrawMeshShaded(Mesh, DisplayMaterial, Int32)
Draws the shaded faces of a given mesh.
Public methodDrawMeshVertices
Draws all the vertices in a given mesh.
Public methodCode exampleDrawMeshWires(Mesh, Color)
Draws all the wires in a given mesh.
Public methodDrawMeshWires(Mesh, Color, Int32)
Draws all the wires in a given mesh.
Public methodDrawObject(RhinoObject)
Public methodCode exampleDrawObject(RhinoObject, Transform)
Draws a RhinoObject with an applied transformation.
Public methodDrawParticles(ParticleSystem)
Public methodDrawParticles(ParticleSystem, DisplayBitmap)
Public methodDrawParticles(ParticleSystem, DisplayBitmap)
Public methodDrawPatternedLine(Line, Color, Int32, Int32)
Draws a single line with specified pattern.
Public methodDrawPatternedLine(Point3d, Point3d, Color, Int32, Int32)
Draws a single line with specified pattern.
Public methodDrawPatternedPolyline
Draws a set of connected lines (polyline) with specified pattern.
Public methodDrawPoint(Point3d)
Draws a point using the current display attribute size, style and color
Public methodDrawPoint(Point3d, Color)
Draws a point with a given radius, style and color.
Public methodDrawPoint(Point3d, PointStyle, Int32, Color)
Draws a point with a given radius, style and color.
Public methodDrawPoint(Point3d, PointStyle, Single, Color)
Draws a point with a given radius, style and color.
Public methodDrawPoint(Point3d, PointStyle, Color, Color, Single, Single, Single, Single, Boolean, Boolean)
Public methodDrawPointCloud(PointCloud, Int32)
Draws a point cloud.
Public methodDrawPointCloud(PointCloud, Single)
Draws a point cloud.
Public methodDrawPointCloud(PointCloud, Int32, Color)
Draws a point cloud.
Public methodDrawPointCloud(PointCloud, Single, Color)
Draws a point cloud.
Public methodDrawPoints(IEnumerablePoint3d, PointStyle, Int32, Color)
Draw a set of points with a given radius, style and color.
Public methodDrawPoints(IEnumerablePoint3d, PointStyle, Single, Color)
Draw a set of points with a given radius, style and color.
Public methodDrawPoints(IEnumerablePoint3d, PointStyle, Color, Color, Single, Single, Single, Single, Boolean, Boolean)
Public methodDrawPolygon
Draws a filled, convex polygon from a collection of points.
Public methodDrawPolyline(IEnumerablePoint3d, Color)
Draws a single Polyline object.
Public methodDrawPolyline(IEnumerablePoint3d, Color, Int32)
Draws a single Polyline object.
Public methodDrawRoundedRectangle
Public methodDrawSphere(Sphere, Color)
Draw a wireframe sphere.
Public methodDrawSphere(Sphere, Color, Int32)
Draw a wireframe sphere.
Public methodDrawSprite(DisplayBitmap, Point2d, Single)
Public methodDrawSprite(DisplayBitmap, Point2d, Single, Color)
Public methodDrawSprite(DisplayBitmap, Point3d, Single, Boolean)
Public methodDrawSprite(DisplayBitmap, Point3d, Single, Color, Boolean)
Public methodDrawSprites(DisplayBitmap, DisplayBitmapDrawList, Single, Boolean)
Public methodDrawSprites(DisplayBitmap, DisplayBitmapDrawList, Single, Vector3d, Boolean)
Public methodDrawSurface
Draw wireframe display for a single surface.
Public methodDrawText(TextEntity, Color)
Public methodDrawText(TextEntity, Color, Transform)
Public methodDrawText(TextEntity, Color, Double)
Public methodStatic memberDrawToBitmap
Draw a given viewport to an off-screen bitmap.
Public methodDrawTorus(Torus, Color)
Draw a wireframe torus.
Public methodDrawTorus(Torus, Color, Int32)
Draw a wireframe torus.
Public methodEnableClippingPlanes
Enable or disable the Clipping Plane logic of the engine.
Public methodEnableColorWriting
Enable or disable the ColorWriting behaviour of the engine.
Public methodEnableDepthTesting
Enable or disable the DepthTesting behaviour of the engine. When DepthTesting is disabled, objects in front will no longer occlude objects behind them.
Public methodEnableDepthWriting
Enable or disable the DepthWriting behaviour of the engine. When DepthWriting is disabled, drawn geometry does not affect the Z-Buffer.
Public methodEnableLighting
Enable or disable the Lighting logic of the engine.
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetOpenGLCameraToClip
Get an array of 16 floats that represents the "camera" to "clip" coordinate transformation in OpenGL's right handed coordinate system
Public methodGetOpenGLWorldToCamera
Get an array of 16 floats that represents the "world" to "camera" coordinate transformation in OpenGL's right handed coordinate system
Public methodGetOpenGLWorldToClip
Get an array of 16 floats that represents the "world" to "clip" coordinate transformation in OpenGL's right handed coordinate system
Public methodGetType (Inherited from Object.)
Public methodInterruptDrawing
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 methodIsActive
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 methodIsVisible(BoundingBox)
Test a given box for visibility inside the view frustum under the current viewport and model transformation settings.
Public methodIsVisible(Point3d)
Test a given 3d world coordinate point for visibility inside the view frustum under the current viewport and model transformation settings.
Public methodIsVisible(RhinoObject)
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 subclassed 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 methodMeasure2dText
Determines screen rectangle that would be drawn to using the Draw2dText(..) function with the same parameters.
Public methodPopClipTesting Obsolete.
Pop a ClipTesting flag off the engine's stack.
Public methodPopCullFaceMode
Pop a FaceCull flag off the engine's stack.
Public methodPopDepthTesting
Pop a DepthTesting flag off the engine's stack.
Public methodPopDepthWriting
Pop a DepthWriting flag off the engine's stack.
Public methodPopModelTransform
Pop a model transformation off the engine's model transform stack.
Public methodPushClipTesting Obsolete.
Push a ClipTesting flag on the engine's stack.
Public methodPushCullFaceMode
Push a FaceCull flag on the engine's stack.
Public methodPushDepthTesting
Push a DepthTesting flag on the engine's stack.
Public methodPushDepthWriting
Push a DepthWriting flag on the engine's stack.
Public methodPushModelTransform
Push a model transformation on the engine's model transform stack.
Public methodToString (Inherited from Object.)
Top
Events
  NameDescription
Public eventStatic memberCalculateBoundingBox
Public eventStatic memberCalculateBoundingBoxZoomExtents
Calculate a bounding to include in the Zoom Extents command.
Public eventStatic memberDrawForeground
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 eventStatic memberDrawOverlay
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 eventStatic memberObjectCulling
Public eventStatic memberPostDrawObjects
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 eventStatic memberPreDrawObject
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 disply down if a large number of objects exist in the document
Public eventStatic memberPreDrawObjects
Called before objects are been drawn. Depth writing and testing are on.
Top
See Also