DisplayPipeline

References
public sealed class DisplayPipeline

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.

Properties

ActiveObject

#Since v6.7
public RhinoObject ActiveObject { get; }

ActiveObjectNestingLevel

#Since v6.7
public int ActiveObjectNestingLevel { get; }

ActiveObjectNestingStack

#Since v6.7
public RhinoObject[] ActiveObjectNestingStack { get; }

ActiveTopLevelObject

#Since v6.7
public RhinoObject ActiveTopLevelObject { get; }

DefaultCurveThickness

#Since v5.0
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 int DefaultCurveThickness { get; }

DepthMode

#Since v5.0
public DepthMode DepthMode { get; set; }

DisplayPipelineAttributes

#Since v5.3
public DisplayPipelineAttributes DisplayPipelineAttributes { get; }

DpiScale

#Since v6.0
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 float DpiScale { get; }

DrawingGrips

#Since v5.0
Gets a value that indicates whether the pipeline is currently in a grip drawing operation.
public bool DrawingGrips { get; }

DrawingSurfaces

#Since v5.0
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 bool DrawingSurfaces { get; }

DrawingWires

#Since v5.0
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 bool DrawingWires { get; }

FrameBuffer

#Since v6.0
Gets the contents of the frame buffer that this pipeline is drawing to.
public Bitmap FrameBuffer { get; }

FrameSize

#Since v5.0
Gets the size of the frame buffer that this pipeline is drawing to.
public Size FrameSize { get; }

IsDynamicDisplay

#Since v5.0
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 bool IsDynamicDisplay { get; }

IsInViewCapture

#Since v6.0
Gets a value that indicates whether this pipeline is currently drawing for ViewCaptureToFile or ViewCaptureToClipboard
public bool IsInViewCapture { get; }

IsOpen

#Since v7.0
Is true of the pipeline is open, false otherwise.
public bool IsOpen { get; }

IsOpenGL

#Since v5.0
Gets a value indicating whether or not this pipeline is drawing into an OpenGL context.
public bool IsOpenGL { get; }

IsPrinting

#Since v5.0
Gets a value that indicates whether this pipeline is currently drawing for printing purposes.
public bool IsPrinting { get; }

IsStereoMode

#Since v5.0
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 bool IsStereoMode { get; }

ModelTransform

#Since v5.0
Gets or sets the current model transformation that is applied to vertices when drawing.
public Transform ModelTransform { get; set; }

ModelTransformIsIdentity

#Since v5.0
Gets a value that indicates whether the Model Transform is an Identity transformation.
public bool ModelTransformIsIdentity { get; }

NestLevel

#Since v5.0
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 int NestLevel { get; }

RenderPass

#Since v5.0
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 int RenderPass { get; }

ShadingRequired

#Since v5.0
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 bool ShadingRequired { get; set; }

StereoProjection

#Since v5.0
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 int StereoProjection { get; }

SupportsShading

#Since v5.0
Gets whether or not this pipeline supports shaded meshes.
public bool SupportsShading { get; }

Technology

#Since v8.35
Get the GPU technology that this pipeline is actively using
public DisplayTechnology Technology { get; }

Viewport

#Since v5.0
public RhinoViewport Viewport { get; }

ZBiasMode

#Since v5.0
public ZBiasMode ZBiasMode { get; set; }

Methods

AddClippingPlane

#Since v6.3
Add a clipping plane to be used during the drawing of this frame
public int AddClippingPlane(
point,
point on the plane
normal
vector perpendicular to the plane
)
index for the added clipping plane

AvailableOpenGLVersion

#Since v6.21
If Rhino is using OpenGL for display, this function will return major.minor version of OpenGL available for this instance of Rhino
[CLSCompliant(false)] public static uint AvailableOpenGLVersion(
out bool
coreProfile
If true, OpenGL is being used in "core profile" mode
)
major version * 10 + minor version For example, OpenGL 4.5 returns 45

ClearFrameBuffer

#Since v8.0
Fill the frame buffer with a single color. This function also clears the depth buffer for engines that support depth buffered drawing.
public void ClearFrameBuffer(
color
the color to fill the frame buffer with
)

Clone

#Since v7.0
Clones the pipeline. Creates an identical copy of "this" pipeline. Copies all conduits from "this" pipeline to the new pipeline.
public DisplayPipeline Clone(
viewport
)
The newly cloned pipeline if successful, null otherwise. or failed to close.

Close

#Since v7.0
Closes the pipeline.
public bool Close()
True if the pipeline was closed, false if it was already closed or failed to close.

CullControlPolygon

#Since v5.0
Returns a value indicating if only points on the side of the surface that face the camera are displayed.
public static bool CullControlPolygon()
true if back faces of surface and mesh control polygons are culled. This value is determined by the _CullControlPolygon command.

Draw2dLine

#Since v6.0
public void Draw2dLine(
from,
to,
color,
thickness
)

Draw2dLine

#Since v9.0
Draws a line whose coordinates are viewport pixels rather than world units. The origin is the top left of the frame, with y increasing downwards - the same space Draw2dText and DrawBitmap work in.
public void Draw2dLine(
from,
Start of the line, in screen coordinates.
to,
End of the line, in screen coordinates.
pen
Pen to stroke the line with.
)

Draw2dLine

#Since v6.0
public void Draw2dLine(
from,
to,
color,
thickness
)

Draw2dLine

#Since v9.0
Draws a line whose coordinates are viewport pixels rather than world units. The origin is the top left of the frame, with y increasing downwards - the same space Draw2dText and DrawBitmap work in.
public void Draw2dLine(
from,
Start of the line, in screen coordinates.
to,
End of the line, in screen coordinates.
pen
Pen to stroke the line with.
)

Draw2dPolyline

#Since v9.0
Draws a polyline whose coordinates are viewport pixels rather than world units. The origin is the top left of the frame, with y increasing downwards - the same space Draw2dText and DrawBitmap work in.
public void Draw2dPolyline(
points,
The polyline vertices, in screen coordinates. Fewer than two draws nothing.
pen,
Pen to stroke the polyline with.
closed
When true the polyline is closed back to its first point as part of the same figure, so that corner is stroked as a join rather than as two loose ends. Do not repeat the first point at the end when passing true.
)

Draw2dPolyline

#Since v9.0
Draws a polyline whose coordinates are viewport pixels rather than world units. The origin is the top left of the frame, with y increasing downwards - the same space Draw2dText and DrawBitmap work in.
public void Draw2dPolyline(
points,
The polyline vertices, in screen coordinates. Fewer than two draws nothing.
pen
Pen to stroke the polyline with.
)

Draw2dRectangle

#Since v5.10
public void Draw2dRectangle(
rectangle,
strokeColor,
thickness,
fillColor
)

Draw2dText

#Since v5.0
Draws 2D text on the viewport.
public void Draw2dText(
text,
the string to draw.
color,
text color.
screenCoordinate,
definition point in screen coordinates (0,0 is top-left corner)
middleJustified,
if true text is centered around the definition point, otherwise it is lower-left justified.
height,
height in pixels (good default is 12)
fontface
font name (good default is "Arial")
)

Draw2dText

#Since v5.0
Draws 2D text on the viewport.
public void Draw2dText(
text,
the string to draw.
color,
text color.
screenCoordinate,
definition point in screen coordinates (0,0 is top-left corner)
middleJustified,
if true text is centered around the definition point, otherwise it is lower-left justified.
height
height in pixels (good default is 12)
)

Draw2dText

#ExampleSince v5.0
Draws 2D text on the viewport.
public void Draw2dText(
text,
the string to draw.
color,
text color.
screenCoordinate,
definition point in screen coordinates (0,0 is top-left corner)
middleJustified
if true text is centered around the definition point, otherwise it is lower-left justified.
)

Draw2dText

#Since v9.0
Draws 2D text on the viewport.
public void Draw2dText(
text,
The string to draw.
color,
Text color.
screenCoordinate,
Definition point in screen coordinates (0,0 is top-left corner). The alignment attaches to this point.
horizontalAlignment,
Where the definition point sits across the text's horizontal advance.
verticalAlignment,
Where the definition point sits down the text's lines. BottomOfTop puts the first line's baseline on the point; Top puts the top of a capital there, which is what the middleJustified=false overloads draw.
height,
Height in pixels (good default is 12).
fontface,
Font name (good default is "Arial").
bold,
If true, the bold face of the font family is used.
italic,
If true, the italic face of the font family is used.
underline,
If true, the text is underlined.
strikethrough,
If true, the text is struck through.
applyKerning
If true, the font's kerning pairs are used to space the glyphs.
)

Draw2dText

#Since v5.0
Draws 2D text on the viewport.
public void Draw2dText(
text,
The string to draw.
color,
Text color.
worldCoordinate,
Definition point in world coordinates.
middleJustified,
If true text is centered around the definition point, otherwise it is lower-left justified.
height,
Height in pixels (good default is 12).
fontface
Font name (good default is "Arial").
)

Draw2dText

#Since v5.0
Draws 2D text on the viewport.
public void Draw2dText(
text,
the string to draw.
color,
text color.
worldCoordinate,
definition point in world coordinates.
middleJustified,
if true text is centered around the definition point, otherwise it is lower-left justified.
height
height in pixels (good default is 12)
)

Draw2dText

#Since v5.0
Draws 2D text on the viewport.
public void Draw2dText(
text,
the string to draw.
color,
text color.
worldCoordinate,
definition point in world coordinates.
middleJustified
if true text is centered around the definition point, otherwise it is lower-left justified.
)

Draw2dText

#Since v9.0
Draws 2D text on the viewport.
public void Draw2dText(
text,
The string to draw.
color,
Text color.
worldCoordinate,
Definition point in world coordinates. The alignment attaches to this point.
horizontalAlignment,
Where the definition point sits across the text's horizontal advance.
verticalAlignment,
Where the definition point sits down the text's lines. BottomOfTop puts the first line's baseline on the point; Top puts the top of a capital there, which is what the middleJustified=false overloads draw.
height,
Height in pixels (good default is 12).
fontface,
Font name (good default is "Arial").
bold,
If true, the bold face of the font family is used.
italic,
If true, the italic face of the font family is used.
underline,
If true, the text is underlined.
strikethrough,
If true, the text is struck through.
applyKerning
If true, the font's kerning pairs are used to space the glyphs.
)

Draw3dText

#Since v6.4
public void Draw3dText(
text,
color,
textPlane,
height,
fontface,
bold,
italic,
horizontalAlignment,
verticalAlignment
)

Draw3dText

#Since v6.0
public void Draw3dText(
text,
color,
textPlane,
height,
fontface,
bold,
italic
)

Draw3dText

#Since v5.0
public void Draw3dText(
text,
color,
textPlane,
height,
fontface
)

Draw3dText

#Since v5.0
Draws 3d text with a different plane than what is defined in the Text3d class.
public void Draw3dText(
text,
The string to draw.
color,
Text color.
textPlane
The plane for the text object.
)

Draw3dText

#Since v5.0
Draws 3d text using the Text3d plane with an adjusted origin.
public void Draw3dText(
text,
The string to draw.
color,
Text color.
textPlaneOrigin
The origin of the plane to draw.
)

Draw3dText

#Since v5.0
public void Draw3dText(
text,
color
)

DrawActivePoint

#Since v6.0
Draws a point in style used during "GetPoint" operations
public void DrawActivePoint(
point
Location of the point in world coordinates
)

DrawAnnotation

#Since v6.0
public void DrawAnnotation(
annotation,
color
)

DrawAnnotation

#Since v9.0
Draws an annotation geometry while evaluating any embedded text fields (e.g. %<Date>%, %<DocumentText("...")>%) against the supplied parent RhinoObject. Intended for preview conduits that draw a modified copy of an annotation's geometry while the user is editing it — the regular geometry-only overload skips field evaluation because it has no display cache to anchor to.
public void DrawAnnotation(
annotation,
parentObject,
color
)

DrawAnnotationArrowhead

#Since v6.0
public void DrawAnnotationArrowhead(
arrowhead,
xform,
color
)

DrawArc

#Since v5.0
Draw a single arc object.
public void DrawArc(
arc,
Arc to draw.
color,
Color to draw with.
thickness
Thickness (in pixels) of arc.
)

DrawArc

#Since v5.0
Draw a single arc object.
public void DrawArc(
arc,
Arc to draw.
color
Color to draw with.
)

DrawArrow

#ExampleSince v5.0
Draws a single arrow object. An arrow consists of a Shaft and an Arrow head at the end of the shaft.
public void DrawArrow(
line,
Arrow shaft.
color,
Color of arrow.
screenSize,
If screenSize != 0.0 then the size (in screen pixels) of the arrow head will be equal to screenSize.
relativeSize
If relativeSize != 0.0 and screen size == 0.0 the size of the arrow head will be proportional to the arrow shaft length.
)

DrawArrow

#Since v5.0
Draws a single arrow object. An arrow consists of a Shaft and an Arrow head at the end of the shaft.
public void DrawArrow(
line,
Arrow shaft.
color
Color of arrow.
)

DrawArrow

#Since v9.0
Draw a Grasshopper 2 style vector arrow. This method is relatively slow as it requires the construction of a DisplayPen and a PolylineCurve. However it is more accurate than other arrow drawing methods in that the tip of the drawn arrow is very close to the actual end of the line, the tip is always sharp, and the arrow head is resized to never be too small or large. Also note this method already takes into account logical pixel scaling.
public void DrawArrow(
line,
Vector shaft to draw.
headSize,
Size of the head as a factor of arrow length. 0.1 would be a decent size.
color,
Color of arrow geometry.
shaftWidth
Width of arrow geometry. Note that the shaft is drawn using a method which only supports integer thicknesses and the arrow head is drawn thicker to counter the human perception of seeing angled lines thinner than they really are.
)

DrawArrowHead

#Since v5.0
Draws a single arrow head.
public void DrawArrowHead(
tip,
Point of arrow head tip.
direction,
Direction in which arrow head is pointing.
color,
Color of arrow head.
screenSize,
If screenSize != 0.0, then the size (in screen pixels) of the arrow head will be equal to the screenSize.
worldSize
If worldSize != 0.0 and screen size == 0.0 the size of the arrow head will be equal to the number of units in worldSize.
)

DrawArrows

#Since v5.0
Draws a collection of arrow objects. An arrow consists of a Shaft and an Arrow head at the end of the shaft.
public void DrawArrows(
lines,
Arrow shafts.
color
Color of arrows.
)

DrawArrows

#Since v5.0
Draws a collection of arrow objects. An arrow consists of a Shaft and an Arrow head at the end of the shaft.
public void DrawArrows(
Line[]
lines,
Arrow shafts.
color
Color of arrows.
)

DrawBitmap

#Since v9.0
Draws a bitmap in screen coordinates, scaled to fit the given size, through a 2d transform.
public void DrawBitmap(
bitmap,
bitmap to draw
left,
where the left edge of the bitmap should appear in screen coordinates
top,
where the top edge of the bitmap should appear in screen coordinates
width,
width (in pixels) to draw the bitmap at
height,
height (in pixels) to draw the bitmap at
transform
A 2d transform applied to the destination rectangle when the bitmap is drawn, in viewport pixels - the same space left, top, width and height are in. It moves the rectangle the image lands on and nothing else, so a rotation, a shear or a non-uniform scale all work and the image is resampled to suit.
)
Remarks: The transform is honoured by the shader based display engines. The GDI engine and the fixed function OpenGL fallback blit the image at a screen position and have no matrix to apply it with, so on those the bitmap is drawn untransformed.

DrawBitmap

#Since v9.0
Draws a bitmap in screen coordinates, scaled to fit the given size.
public void DrawBitmap(
bitmap,
bitmap to draw
left,
where the left edge of the bitmap should appear in screen coordinates
top,
where the top edge of the bitmap should appear in screen coordinates
width,
width (in pixels) to draw the bitmap at
height
height (in pixels) to draw the bitmap at
)

DrawBitmap

#ExampleSince v5.10
Draws a bitmap in screen coordinates
public void DrawBitmap(
bitmap,
bitmap to draw
left,
where top/left corner of bitmap should appear in screen coordinates
top
where top/left corner of bitmap should appear in screen coordinates
)

DrawBox

#Since v5.0
Draws the edges of a BoundingBox.
public void DrawBox(
box,
Box to draw.
color,
Color to draw in.
thickness
Thickness (in pixels) of box edges.
)

DrawBox

#Since v5.0
Draws the edges of a BoundingBox.
public void DrawBox(
box,
Box to draw.
color
Color to draw in.
)

DrawBox

#Since v5.0
Draws the edges of a Box object.
public void DrawBox(
box,
Box to draw.
color,
Color to draw in.
thickness
Thickness (in pixels) of box edges.
)

DrawBox

#Since v5.0
Draws the edges of a Box object.
public void DrawBox(
box,
Box to draw.
color
Color to draw in.
)

DrawBoxCorners

#Since v5.0
Draws corner widgets of a world aligned bounding box.
public void DrawBoxCorners(
box,
Box to draw.
color,
Color to draw with.
size,
Size (in model units) of the corner widgets.
thickness
Thickness (in pixels) of the corner widgets.
)

DrawBoxCorners

#Since v5.0
Draws corner widgets of a world aligned bounding box.
public void DrawBoxCorners(
box,
Box to draw.
color,
Color to draw with.
size
Size (in model units) of the corner widgets.
)

DrawBoxCorners

#Since v5.0
Draws corner widgets of a world aligned bounding box. Widget size will be 5% of the Box diagonal.
public void DrawBoxCorners(
box,
Box to draw.
color
Color to draw with.
)

DrawBrepShaded

#Since v5.0
Draws a shaded mesh representation of a brep.
public void DrawBrepShaded(
brep,
Brep to draw.
material
Material to draw faces with.
)

DrawBrepWires

#Since v5.0
Draws all the wireframe curves of a brep object.
public void DrawBrepWires(
brep,
Brep to draw.
color,
Color of Wireframe curves.
wireDensity
"Density" of wireframe curves.

-1 = no internal wires.

0 = default internal wires.

>0 = custom high density.

)

DrawBrepWires

#Since v5.0
Draws all the wireframe curves of a brep object in the color provided.
public void DrawBrepWires(
brep,
Brep to draw.
color
Color of Wireframe curves.
)

DrawBrepWires

#
Draws all the wireframe curves of a brep object with the color(s) defined by the display mode.
public void DrawBrepWires(
brep
Brep to draw.
)

DrawCircle

#Since v5.0
Draw a single circle object.
public void DrawCircle(
circle,
Circle to draw.
color,
Color to draw with.
thickness
Thickness (in pixels) of circle.
)

DrawCircle

#ExampleSince v5.0
Draw a single circle object.
public void DrawCircle(
circle,
Circle to draw.
color
Color to draw with.
)

DrawClippingPlaneWires

#Since v9.0
Draw a cipping plane
public void DrawClippingPlaneWires(
clippingPlane,
color
)

DrawCone

#Since v5.0
Draw a wireframe cone.
public void DrawCone(
cone,
Cone to draw.
color,
Color to draw with.
thickness
Thickness (in pixels) of Cone wires.
)

DrawCone

#Since v5.0
Draw a wireframe cone.
public void DrawCone(
cone,
Cone to draw.
color
Color to draw with.
)

DrawConstructionPlane

#Since v5.0
Draws a construction plane.
public void DrawConstructionPlane(
constructionPlane
The construction plane to draw.
)

DrawCurvatureGraph

#Since v5.0
Draw a typical Rhino Curvature Graph.
public void DrawCurvatureGraph(
curve,
Base curve for curvature graph.
color,
Color of curvature graph.
hairScale,
100 = true length, > 100 magnified, < 100 shortened.
hairDensity,
>= 0 larger numbers = more hairs (good default is 1).
sampleDensity
Between 1 and 10. Higher numbers draw smoother outer curves. (good default is 2).
)

DrawCurvatureGraph

#Since v5.0
Draw a typical Rhino Curvature Graph.
public void DrawCurvatureGraph(
curve,
Base curve for curvature graph.
color,
Color of curvature graph.
hairScale
100 = true length, > 100 magnified, < 100 shortened.
)

DrawCurvatureGraph

#Since v5.0
Draw a typical Rhino Curvature Graph.
public void DrawCurvatureGraph(
curve,
Base curve for curvature graph.
color
Color of curvature graph.
)

DrawCurvaturePreview

#Since v9.0
Draws a Brep in Curvature Analysis preview.
public void DrawCurvaturePreview(
brep,
Brep to draw.
color
Objct color.
)

DrawCurvaturePreview

#Since v9.0
Draws a Mesh in Curvature Analysis preview.
public void DrawCurvaturePreview(
Mesh
mesh,
Mesh to draw.
color
Objct color.
)

DrawCurve

#Since v5.0
Draw a single Curve object.
public void DrawCurve(
curve,
Curve to draw.
color,
Color to draw with.
thickness
Thickness (in pixels) of curve.
)

DrawCurve

#Since v5.0
Draw a single Curve object.
public void DrawCurve(
curve,
Curve to draw.
color
Color to draw with.
)

DrawCurve

#Since v8.0
public void DrawCurve(
curve,
pen
)

DrawCylinder

#Since v5.0
Draw a wireframe cylinder.
public void DrawCylinder(
cylinder,
Cylinder to draw.
color,
Color to draw with.
thickness
Thickness (in pixels) of cylinder wires.
)

DrawCylinder

#Since v5.0
Draw a wireframe cylinder.
public void DrawCylinder(
cylinder,
Cylinder to draw.
color
Color to draw with.
)

DrawDirectionArrow

#Since v5.0
public void DrawDirectionArrow(
location,
direction,
color
)

DrawDot

#Since v6.0
Draws a text dot in screen coordinates.
public void DrawDot(
screenX,
X coordinate (in pixels) of dot center.
screenY,
Y coordinate (in pixels) of dot center.
text,
Text content of dot.
dotColor,
Dot background color.
textColor
Dot foreground color.
)

DrawDot

#Since v6.0
Draws a text dot in screen coordinates.
public void DrawDot(
screenX,
X coordinate (in pixels) of dot center.
screenY,
Y coordinate (in pixels) of dot center.
text
Text content of dot.
)

DrawDot

#Since v5.0
Draw a text dot in world coordinates.
public void DrawDot(
worldPosition,
Location of dot in world coordinates.
text,
Text content of dot.
dotColor,
Dot background color.
textColor
Dot foreground color.
)

DrawDot

#Since v5.0
Draws a text dot in world coordinates.
public void DrawDot(
worldPosition,
Location of dot in world coordinates.
text
Text content of dot.
)

DrawDot

#Since v6.0
Draw a text dot as defined by the text dot class
public void DrawDot(
dot,
fillColor,
textColor,
borderColor
)

DrawDottedLine

#Since v5.0
Draws a single dotted line.
public void DrawDottedLine(
line,
Line to draw.
color
Color of line.
)

DrawDottedLine

#Since v5.0
Draws a single dotted line.
public void DrawDottedLine(
from,
Line start point.
to,
Line end point.
color
Color of line.
)

DrawDottedPolyline

#Since v5.0
Draws a set of connected lines (polyline) in a dotted pattern (0x00001111).
public void DrawDottedPolyline(
points,
End points of each line segment.
color,
Color of polyline.
close
Draw a line between the first and last points.
)

DrawDraftAnglePreview

#Since v9.0
Draws a Brep in Draft Angle preview.
public void DrawDraftAnglePreview(
brep,
Brep to draw.
color
Objct color.
)

DrawDraftAnglePreview

#Since v9.0
Draws a Mesh in Draft Angle preview.
public void DrawDraftAnglePreview(
Mesh
mesh,
Mesh to draw.
color
Objct color.
)

DraweInferencePoint

#Since v8.17
Draw inference point used in gesture based snapping
public void DraweInferencePoint(
P,
Location of point in world coordinates
color
Color of the point
)

DrawEmapPreview

#Since v9.0
Draws a Brep in Environment Map preview with a texture of your own, instead of the one in EmapAnalysisSettings.
public void DrawEmapPreview(
brep,
Brep to draw.
color,
Object color.
settings
Settings for this call only. Get a copy of the current ones from EmapAnalysisSettings.GetCurrentState() and change what you need. A null or empty EmapAnalysisSettingsState.FileName keeps the texture the application settings name.
)

DrawEmapPreview

#Since v9.0
Draws a Brep in Environment Map preview.
public void DrawEmapPreview(
brep,
Brep to draw.
color
Objct color.
)

DrawEmapPreview

#Since v9.0
Draws a Mesh in Environment Map preview with a texture of your own, instead of the one in EmapAnalysisSettings.
public void DrawEmapPreview(
Mesh
mesh,
Mesh to draw.
color,
Object color.
settings
Settings for this call only. Get a copy of the current ones from EmapAnalysisSettings.GetCurrentState() and change what you need. A null or empty EmapAnalysisSettingsState.FileName keeps the texture the application settings name.
)

DrawEmapPreview

#Since v9.0
Draws a Mesh in Environment Map preview.
public void DrawEmapPreview(
Mesh
mesh,
Mesh to draw.
color
Objct color.
)

DrawExtrusionWires

#Since v6.0
Draws all the wireframe curves of an extrusion object.
public void DrawExtrusionWires(
extrusion,
Extrusion to draw.
color,
Color of Wireframe curves.
wireDensity
"Density" of wireframe curves.

-1 = no internal wires.

0 = default internal wires.

>0 = custom high density.

)

DrawExtrusionWires

#Since v6.0
Draws all the wireframe curves of an extrusion object.
public void DrawExtrusionWires(
extrusion,
Extrusion to draw.
color
Color of Wireframe curves.
)

DrawGradientHatch

#Since v7.0
Draw a two point gradient filled hatch
public void DrawGradientHatch(
hatch,
color1,
color2,
point1,
point2,
linearGradient,
boundaryThickness,
boundaryColor
)

DrawGradientHatch

#Since v8.0
public void DrawGradientHatch(
hatch,
stops,
point1,
point2,
linearGradient,
repeat,
boundary,
backgroundFillColor
)

DrawGradientHatch

#Since v7.0
public void DrawGradientHatch(
hatch,
stops,
point1,
point2,
linearGradient,
repeat,
boundaryThickness,
boundaryColor
)

DrawGradientLines

#Since v7.0
public void DrawGradientLines(
lines,
strokeWidth,
stops,
point1,
point2,
linearGradient,
repeat
)

DrawGradientMesh

#Since v7.0
public void DrawGradientMesh(
Mesh
mesh,
stops,
point1,
point2,
linearGradient,
repeat
)

DrawHatch

#Since v6.0
public void DrawHatch(
hatch,
hatchColor,
boundaryColor
)

DrawHatch

#Since v8.0
public void DrawHatch(
hatch,
hatchColor,
boundary,
backgroundFillColor
)

DrawInferenceLine

#Since v8.17
Draw an inference line used in gesture based snapping
public void DrawInferenceLine(
P,
First point used to define the line in world coordinates
O,
Second point used to define the line in world coordinates
color,
Color of line
type
)

DrawInstanceDefinition

#Since v7.15
public void DrawInstanceDefinition(
instanceDefinition,
The instance definition.
xform
The transformation.
)

DrawInstanceDefinition

#Since v7.15
public void DrawInstanceDefinition(
instanceDefinition
The instance definition.
)

DrawInstanceDefinitionShaded

#Since v7.15
Draws a shaded InstanceDefinition.
public void DrawInstanceDefinitionShaded(
instanceDefinition,
The instance definition.
material,
Material to draw faces with.
xform
The transformation.
)

DrawInstanceDefinitionShaded

#Since v7.15
Draws a shaded InstanceDefinition.
public void DrawInstanceDefinitionShaded(
instanceDefinition,
The instance definition.
material
Material to draw faces with.
)

DrawLight

#Since v8.4
Draws a light.
public void DrawLight(
Light
light,
The light to draw.
wireframeColor
The wireframe color.
)

DrawLine

#Since v5.0
Draws a single line object.
public void DrawLine(
line,
Line to draw.
color,
Color to draw line in.
thickness
Thickness (in pixels) of line.
)

DrawLine

#Since v5.0
Draws a single line object.
public void DrawLine(
line,
Line to draw.
color
Color to draw line in.
)

DrawLine

#Since v8.0
public void DrawLine(
line,
pen
)

DrawLine

#Since v5.0
Draws a single line object.
public void DrawLine(
from,
Line from point.
to,
Line to point.
color,
Color to draw line in.
thickness
Thickness (in pixels) of line.
)

DrawLine

#Since v5.0
Draws a single line object.
public void DrawLine(
from,
Line from point.
to,
Line to point.
color
Color to draw line in.
)

DrawLineArrow

#Since v5.0
Draws an arrow made up of three line segments.
public void DrawLineArrow(
line,
Base line for arrow.
color,
Color of arrow.
thickness,
Thickness (in pixels) of the arrow line segments.
size
Size (in world units) of the arrow tip lines.
)

DrawLineNoClip

#Since v7.1
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 void DrawLineNoClip(
from,
Line from point.
to,
Line to point.
color,
Color to draw line in.
thickness
Thickness (in pixels) of line.
)

DrawLines

#Since v5.0
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 void DrawLines(
lines,
Lines to draw.
color,
Color to draw with.
thickness
Thickness (in pixels) of lines.
)

DrawLines

#Since v5.0
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 void DrawLines(
lines,
Lines to draw.
color
Color to draw with.
)

DrawLines

#Since v8.0
public void DrawLines(
Line[]
lines,
pen
)

DrawLinesNoClip

#Since v8.15
Draws a multiple lines. 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 void DrawLinesNoClip(
lines,
the lines to draw
color,
Color to draw lines in
thickness
Thickness (in pixels) of lines
)

DrawMarker

#Since v5.0
Draws an arrow marker as a view-aligned widget.
public void DrawMarker(
tip,
Location of arrow tip point.
direction,
Direction of arrow.
color,
Color of arrow widget.
thickness,
Thickness of arrow widget lines.
size,
Size (in pixels) of the arrow shaft.
rotation
Rotational angle adjustment (in radians, counter-clockwise of direction.
)

DrawMarker

#Since v5.0
Draws an arrow marker as a view-aligned widget.
public void DrawMarker(
tip,
Location of arrow tip point.
direction,
Direction of arrow.
color,
Color of arrow widget.
thickness,
Thickness of arrow widget lines.
size
Size (in pixels) of the arrow shaft.
)

DrawMarker

#Since v5.0
Draws an arrow marker as a view-aligned widget.
public void DrawMarker(
tip,
Location of arrow tip point.
direction,
Direction of arrow.
color,
Color of arrow widget.
thickness
Thickness of arrow widget lines.
)

DrawMarker

#Since v5.0
Draws an arrow marker as a view-aligned widget.
public void DrawMarker(
tip,
Location of arrow tip point.
direction,
Direction of arrow.
color
Color of arrow widget.
)

DrawMeshesShaded

#Since v9.0
Draws a batch of meshes with the Grasshopper 2 ("G2") shaded display: a gradient-shaded look driven by a GrasshopperDisplayMaterial — a diffuse colour plus optional striping, stippling and dark-area desaturation — rather than a full DisplayMaterial. The whole batch is uploaded as one combined GPU buffer and shares one material; for per-mesh settings, call once per mesh instead.
public void DrawMeshesShaded(
meshes,
The meshes to draw as one batch. Each should have current single-precision vertices and vertex normals (see remarks); null entries are skipped.
material
The G2 shaded settings to draw with. When null, default settings are used.
)
Remarks:

The meshes are uploaded to the GPU on every redraw. Nothing is cached between frames, so every redraw re-uploads the whole batch. This is the dominant cost of the call and needs to be planned around: draw only the geometry you actually need, and prefer one batched call over many single-mesh calls.

Mesh requirements. Every mesh must have up-to-date single-precision vertices and vertex normals. The G2 shader reads those directly; a mesh that carries only double-precision vertices, or no normals, will render badly (missing geometry or flat/garbage shading). Compute the vertex normals and make sure the single-precision vertices are current before drawing if in doubt. Null entries in meshes are skipped.

Vertex colours. If a mesh has vertex colours, those colours are drawn in place of the material's diffuse colour, and GrasshopperDisplayMaterial.ShadeFalseColor decides whether they are shaded or drawn flat. Meshes without vertex colours are shaded from the material's diffuse colour alone.

Mixed meshes are safe. A batch is uploaded as one interleaved vertex buffer whose layout is the union of its meshes' attributes, and a mesh lacking an attribute the union has would be zero-filled for it, so a colourless mesh batched with a vertex-coloured one would draw black. This method therefore splits the meshes into groups that share the same attributes and draws one batch per group, so any mix may be passed in. Meshes keep their relative order within a group and the groups are drawn in order of first appearance; order between groups is not otherwise guaranteed.

DrawMeshFalseColors

#Since v5.0
Draws the mesh faces as false color patches. The mesh must have Vertex Colors defined for this to work.
public void DrawMeshFalseColors(
Mesh
mesh
Mesh to draw.
)

DrawMeshShaded

#Since v9.0
Draws shaded mesh with isodraw settings applied (zebra)
public void DrawMeshShaded(
Mesh
mesh,
diffuseMaterialColor,
zebraSettings
)

DrawMeshShaded

#Since v8.20
Draws the shaded faces of a given mesh.
public void DrawMeshShaded(
Mesh
mesh,
Mesh to draw.
material,
Material to draw faces with.
faceIndices
An enumeration of the indices of specific faces to draw.
)

DrawMeshShaded

#Since v5.0
Draws the shaded faces of a given mesh.
public void DrawMeshShaded(
Mesh
mesh,
Mesh to draw.
material,
Material to draw faces with.
int[]
faceIndices
Indices of specific faces to draw.
)

DrawMeshShaded

#ExampleSince v5.0
Draws the shaded faces of a given mesh.
public void DrawMeshShaded(
Mesh
mesh,
Mesh to draw.
material
Material to draw faces with.
)

DrawMeshShaded

#Since v9.0
Draws a single mesh with the Grasshopper 2 ("G2") shaded display. This is a convenience overload of DrawMeshesShaded(IEnumerable<Mesh>, GrasshopperDisplayMaterial); see it for the mesh requirements and vertex-colour handling.
public void DrawMeshShaded(
Mesh
mesh,
The mesh to draw. Should have current single-precision vertices and vertex normals (see DrawMeshesShaded(IEnumerable<Mesh>, GrasshopperDisplayMaterial)).
material
The G2 shaded settings to draw with. When null, default settings are used.
)
Remarks:

The mesh is uploaded to the GPU on every redraw. Nothing is cached between frames, so every redraw re-uploads the mesh. When drawing more than one mesh, prefer a single batched DrawMeshesShaded(IEnumerable<Mesh>, GrasshopperDisplayMaterial) call over many single-mesh calls.

DrawMeshVertices

#Since v5.0
Draws all the vertices in a given mesh.
public void DrawMeshVertices(
Mesh
mesh,
Mesh for vertex drawing.
color
Color of mesh vertices.
)

DrawMeshWires

#Since v5.0
Draws all the wires in a given mesh.
public void DrawMeshWires(
Mesh
mesh,
Mesh for wire drawing.
color,
Color of mesh wires.
thickness
Thickness (in pixels) of mesh wires.
)

DrawMeshWires

#ExampleSince v5.0
Draws all the wires in a given mesh.
public void DrawMeshWires(
Mesh
mesh,
Mesh for wire drawing.
color
Color of mesh wires.
)

DrawObject

#ExampleSince v5.0
Draws a RhinoObject with an applied transformation.
public void DrawObject(
rhinoObject,
The Rhino object.
xform
The transformation.
)

DrawObject

#Since v5.0
Draws a RhinoObject.
public void DrawObject(
rhinoObject
The Rhino object.
)

DrawParticles

#Since v5.0
public void DrawParticles(
particles,
bitmap
)

DrawParticles

#Since v5.0
public void DrawParticles(
particles,
bitmaps
)

DrawParticles

#Since v5.0
public void DrawParticles(
particles
)

DrawPatternedLine

#Since v6.0
Draws a single line with specified pattern.
public void DrawPatternedLine(
line,
Line to draw.
color,
Color of line.
pattern,
Pattern of the line (like 0x00001111 for dotted line).
thickness
Thickness (in pixels) of lines.
)

DrawPatternedLine

#Since v6.0
Draws a single line with specified pattern.
public void DrawPatternedLine(
from,
Line start point.
to,
Line end point.
color,
Color of line.
pattern,
Pattern of the line (like 0x00001111 for dotted line).
thickness
Thickness (in pixels) of lines.
)

DrawPatternedPolyline

#Since v6.0
Draws a set of connected lines (polyline) with specified pattern.
public void DrawPatternedPolyline(
points,
End points of each line segment.
color,
Color of polyline.
pattern,
Pattern to use for the line (like 0x00001111 for dotted).
thickness,
Thickness (in pixels) of lines.
close
Draw a line between the first and last points.
)

DrawPoint

#Since v5.0
Draws a point with a given radius, style and color.
public void DrawPoint(
point,
Location of point in world coordinates.
color
Color of point.
)

DrawPoint

#Since v6.0
public void DrawPoint(
point,
style,
strokeColor,
fillColor,
radius,
strokeWidth,
secondarySize,
rotationRadians,
diameterIsInPixels,
autoScaleForDpi
)

DrawPoint

#Since v6.0
Draws a point with a given radius, style and color.
public void DrawPoint(
point,
Location of point in world coordinates.
style,
Point display style.
radius,
Point size in pixels.
color
Color of point. If style is ControlPoint, this will be the border color.
)

DrawPoint

#Since v5.0
Draws a point with a given radius, style and color.
public void DrawPoint(
point,
Location of point in world coordinates.
style,
Point display style.
radius,
Point size in pixels.
color
Color of point. If style is ControlPoint, this will be the border color.
)

DrawPoint

#Since v6.0
Draws a point using the current display attribute size, style and color
public void DrawPoint(
point
Location of point in world coordinates.
)

DrawPointCloud

#Since v6.0
Draws a point cloud.
public void DrawPointCloud(
cloud,
Point cloud to draw.
size,
Size of points.
color
Color of points in the cloud, if the cloud has a color array this setting is ignored.
)

DrawPointCloud

#Since v6.0
Draws a point cloud.
public void DrawPointCloud(
cloud,
Point cloud to draw, if the cloud has a color array, it will be used, otherwise the points will be black.
size
Size of points.
)

DrawPointCloud

#Since v5.0
Draws a point cloud.
public void DrawPointCloud(
cloud,
Point cloud to draw.
size,
Size of points.
color
Color of points in the cloud, if the cloud has a color array this setting is ignored.
)

DrawPointCloud

#Since v5.0
Draws a point cloud.
public void DrawPointCloud(
cloud,
Point cloud to draw, if the cloud has a color array, it will be used, otherwise the points will be black.
size
Size of points.
)

DrawPoints

#Since v8.0
public void DrawPoints(
points,
fallbackAttributes,
overrideAttributes
)

DrawPoints

#Since v8.0
public void DrawPoints()

DrawPoints

#Since v6.0
public void DrawPoints(
points,
style,
strokeColor,
fillColor,
radius,
strokeWidth,
secondarySize,
rotationRadians,
diameterIsInPixels,
autoScaleForDpi
)

DrawPoints

#Since v6.0
Draw a set of points with a given radius, style and color.
public void DrawPoints(
points,
Location of points in world coordinates.
style,
Point display style.
radius,
Point size in pixels.
color
Color of points. If style is ControlPoint, this will be the border color.
)

DrawPoints

#Since v5.0
Draw a set of points with a given radius, style and color.
public void DrawPoints(
points,
Location of points in world coordinates.
style,
Point display style.
radius,
Point size in pixels.
color
Color of points. If style is ControlPoint, this will be the border color.
)

DrawPolygon

#Since v5.0
Draws a filled, convex polygon from a collection of points.
public void DrawPolygon(
points,
Collection of world coordinate points that are connected by lines to form a closed shape. Collection must contain at least 3 points.
color,
Color to draw with.
filled
true if the closed area should be filled with color. false if you want to draw just the border of the closed shape.
)

DrawPolyline

#Since v5.0
Draws a single Polyline object.
public void DrawPolyline(
polyline,
Polyline to draw.
color,
Color to draw in.
thickness
Thickness (in pixels) of the Polyline.
)

DrawPolyline

#Since v5.0
Draws a single Polyline object.
public void DrawPolyline(
polyline,
Polyline to draw.
color
Color to draw in.
)

DrawRoundedRectangle

#Since v6.0
public void DrawRoundedRectangle(
center,
pixelWidth,
pixelHeight,
cornerRadius,
strokeColor,
strokeWidth,
fillColor
)

DrawSphere

#Since v5.0
Draw a wireframe sphere.
public void DrawSphere(
sphere,
Sphere to draw.
color,
Color to draw with.
thickness
Thickness (in pixels) of Sphere wires.
)

DrawSphere

#Since v5.0
Draw a wireframe sphere.
public void DrawSphere(
sphere,
Sphere to draw.
color
Color to draw with.
)

DrawSprite

#Since v5.0
public void DrawSprite(
bitmap,
screenLocation,
size,
blendColor
)

DrawSprite

#Since v5.0
public void DrawSprite(
bitmap,
screenLocation,
size
)

DrawSprite

#Since v7.0
Draw screen oriented image centered at 2d screen location
public void DrawSprite(
bitmap,
screenLocation,
width,
height
)

DrawSprite

#Since v5.0
public void DrawSprite(
bitmap,
worldLocation,
size,
sizeInWorldSpace
)

DrawSprite

#Since v5.0
public void DrawSprite(
bitmap,
worldLocation,
size,
blendColor,
sizeInWorldSpace
)

DrawSprites

#Since v5.0
public void DrawSprites(
bitmap,
items,
size,
sizeInWorldSpace
)

DrawSprites

#Since v5.0
public void DrawSprites(
bitmap,
items,
size,
translation,
sizeInWorldSpace
)

DrawStereoFrameBuffer

#Since v6.8
Draws the viewport as seen from the left and the right eye viewports and returns the result as OpenGL texture handles.
[CLSCompliant(false)] public bool DrawStereoFrameBuffer(
viewportLeft,
The viewport representing the left eye location and look direction.
viewportRight,
The viewport representing the right eye location and look direction.
out uint
handleLeft,
Will contain the OpenGL texture handle which references the left output color buffer.
out uint
handleRight
Will contain the OpenGL texture handle which references the right output color buffer.
)
true if drawing succeeded, false otherwise.

DrawSubDShaded

#Since v7.0
Draw a shaded mesh representation of a SubD
public void DrawSubDShaded(
subd,
SubD to draw
material
Material to draw faces with
)

DrawSubDWires

#Since v7.0
Draws all the wireframe curves of a SubD object
public void DrawSubDWires(
subd,
SubD to draw
color,
wire color
thickness
wire thickness
)

DrawSubDWires

#Since v8.11
Draws all the wireframe curves os a SubD object using different pens
public void DrawSubDWires(
subd,
SubD to draw
boundaryPen,
Pen to use for boundary wires. If null, no boundary wires will be drawn
smoothInteriorPen,
Pen to use for smooth interior wires. If null, no smooth interior wires will be drawn
creasePen,
Pen to use for crease wires. If null, no crease wires will be drawn
nonmanifoldPen
Pen to use for non-manifold wires. If null, no non-manifold wires will be drawn
)

DrawSurface

#Since v5.0
Draw wireframe display for a single surface.
public void DrawSurface(
surface,
Surface to draw.
wireColor,
Color to draw with.
wireDensity
Thickness (in pixels) or wires to draw.
)

DrawSurfaceDirectionIndicators

#Since v9.0
Draw surface indicators
public void DrawSurfaceDirectionIndicators(
directionIndicators
)

DrawText

#Since v6.0
public void DrawText(
text,
color,
scale
)

DrawText

#Since v6.0
public void DrawText(
text,
color,
xform
)

DrawText

#Since v6.0
public void DrawText(
text,
color
)

DrawToBitmap

#Since v5.0
Draw a given viewport to an off-screen bitmap.
public static Bitmap DrawToBitmap(
viewport,
Viewport to draw.
width,
Width of target image.
height
Height of target image.
)
A bitmap containing the given view, or null on error.

DrawTorus

#Since v5.0
Draw a wireframe torus.
public void DrawTorus(
torus,
Torus to draw.
color,
Color to draw with.
thickness
Thickness (in pixels) of torus wires.
)

DrawTorus

#Since v5.0
Draw a wireframe torus.
public void DrawTorus(
torus,
Torus to draw.
color
Color to draw with.
)

DrawZebraPreview

#Since v6.16
Draws a shaded Brep with Zebra stripe preview.
public void DrawZebraPreview(
brep,
Brep to draw.
color
Object color.
)

DrawZebraPreview

#Since v7.4
Draws a shaded Mesh with Zebra stripe preview.
public void DrawZebraPreview(
Mesh
mesh,
Mesh to draw.
color
Object color.
)

EnableClippingPlanes

#Since v5.0
Enable or disable the Clipping Plane logic of the engine.
public void EnableClippingPlanes(
enable
true to enable Clipping Planes, false to disable.
)

EnableColorWriting

#Since v5.0
Enable or disable the ColorWriting behavior of the engine.
public void EnableColorWriting(
enable
true to enable ColorWriting, false to disable.
)

EnableDepthTesting

#Since v5.0
Enable or disable the DepthTesting behavior of the engine. When DepthTesting is disabled, objects in front will no longer occlude objects behind them.
public void EnableDepthTesting(
enable
true to enable DepthTesting, false to disable.
)

EnableDepthWriting

#Since v5.0
Enable or disable the DepthWriting behavior of the engine. When DepthWriting is disabled, drawn geometry does not affect the Z-Buffer.
public void EnableDepthWriting(
enable
true to enable DepthWriting, false to disable.
)

EnableLighting

#Since v5.0
Enable or disable the Lighting logic of the engine.
public void EnableLighting(
enable
true to enable Lighting, false to disable.
)

Flush

#Since v7.0
Force the pipeline to immediately flush any cached geometry to the display
public void Flush()

GetDirect3d11Device

#Since v9.0
If the pipeline is running on top of Direct3D 11, this function will return a pointer to the ID3D11Device being used. IntPtr.Zero is returned if the pipeline is running on some other GPU technology. NOTE: AddRef is NOT called on this IUnknown instance.
public nint GetDirect3d11Device()
Pointer to an ID3D11Device, or IntPtr.Zero.

GetDirect3d11DeviceContext

#Since v9.0
If the pipeline is running on top of Direct3D 11, this function will return a pointer to the ID3D11DeviceContext1 actively being used. IntPtr.Zero is returned if the pipeline is running on some other GPU technology. NOTE: AddRef is NOT called on this IUnknown instance.
public nint GetDirect3d11DeviceContext()
Pointer to an ID3D11DeviceContext1, or IntPtr.Zero.

GetDrawListSerialNumbers

#Since v7.0
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.
[CLSCompliant(false)] public static void GetDrawListSerialNumbers(
out uint
modelSerialNumber,
The current model draw list serial number.
out uint
pageSerialNumber
The current page view draw list serial number.
)

GetLights

#Since v6.3
Get lights that this pipeline is current using
public Light[] GetLights()

GetOpenGLCameraToClip

#Since v6.0
Get an array of 16 floats that represents the "camera" to "clip" coordinate transformation in OpenGL's right handed coordinate system
public float[] GetOpenGLCameraToClip()

GetOpenGLWorldToCamera

#Since v6.0
Get an array of 16 floats that represents the "world" to "camera" coordinate transformation in OpenGL's right handed coordinate system
public float[] GetOpenGLWorldToCamera(
includeModelTransform
)

GetOpenGLWorldToClip

#Since v6.0
Get an array of 16 floats that represents the "world" to "clip" coordinate transformation in OpenGL's right handed coordinate system
public float[] GetOpenGLWorldToClip(
includeModelTransform
)

InterruptDrawing

#Since v5.0
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 bool InterruptDrawing()
true if the pipeline should stop attempting to draw more geometry and just show the frame buffer.

IsActive

#Since v5.0
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 bool IsActive(
rhinoObject
Object to test.
)
true if this object can be drawn in the pipeline's viewport based on it's object type and display attributes.

IsInTiledDraw

#Since v8.2
Returns true if the currently drawn frame is part of a tiled capture. Tiled captures are performed when creating large raster outputs.
public bool IsInTiledDraw(
out Size
fullSize,
Final full size area that is being created
currentTile
What portion of the fullSize area that is currently being drawn
)
true if a tiled capture is being performed. If false, the fullSize parameter will have the same size as currentTile

IsVisible

#Since v5.0
Test a given box for visibility inside the view frustum under the current viewport and model transformation settings.
public bool IsVisible(
bbox
Box to test for visibility.
)
true if at least some portion of the box is visible, false if not.

IsVisible

#Since v5.0
Test a given 3d world coordinate point for visibility inside the view frustum under the current viewport and model transformation settings.
public bool IsVisible(
worldCoordinate
Point to test for visibility.
)
true if the point is visible, false if it is not.

IsVisible

#Since v5.0
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 bool IsVisible(
rhinoObject
Object to test.
)
true if the object is visible, false if not.

MakeDefaultOpenGLContextCurrent

#Since v7.0
Make a "default" OpenGL context current
public static bool MakeDefaultOpenGLContextCurrent()

Measure2dText

#Since v5.10
Determines screen rectangle that would be drawn to using the Draw2dText(..) function with the same parameters.
public Rectangle Measure2dText(
text,
text to measure.
definitionPoint,
either lower-left or middle of text.
middleJustified,
true=middle justified. false=lower-left justified.
rotationRadians,
text rotation in radians
height,
height in pixels (good default is 12)
fontFace
font name (good default is "Arial")
)
rectangle in the viewport's screen coordinates on success.

Open

#Since v7.0
Opens the pipeline.
public bool Open()
True if the pipeline was opened, false if it was already open or failed to open.

PopClipTesting

#Since v5.0 Obsolete v6.0
Pop a ClipTesting flag off the engine's stack.
public void PopClipTesting()
obsoleteUse PopDepthTesting

PopCullFaceMode

#Since v5.0
Pop a FaceCull flag off the engine's stack.
public void PopCullFaceMode()

PopDepthTesting

#Since v5.0
Pop a DepthTesting flag off the engine's stack.
public void PopDepthTesting()

PopDepthWriting

#Since v5.0
Pop a DepthWriting flag off the engine's stack.
public void PopDepthWriting()

PopModelTransform

#Since v5.0
Pop a model transformation off the engine's model transform stack.
public void PopModelTransform()

PopProjection

#Since v8.0
Pop a view projection off this pipelines projection stack
public void PopProjection()

Push2dProjection

#Since v8.0
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 void Push2dProjection()

PushClipTesting

#Since v5.0 Obsolete v6.0
Push a ClipTesting flag on the engine's stack.
public void PushClipTesting(
enable
ClipTesting flag.
)
obsoleteUse PushDepthTesting

PushCullFaceMode

#Since v5.0
Push a FaceCull flag on the engine's stack.
public void PushCullFaceMode(
mode
FaceCull flag.
)

PushDepthTesting

#Since v5.0
Push a DepthTesting flag on the engine's stack.
public void PushDepthTesting(
enable
DepthTesting flag.
)

PushDepthWriting

#Since v5.0
Push a DepthWriting flag on the engine's stack.
public void PushDepthWriting(
enable
DepthWriting flag.
)

PushModelTransform

#Since v5.0
Push a model transformation on the engine's model transform stack.
public void PushModelTransform(
xform
Transformation to push.
)

RemoveClippingPlane

#Since v6.3
Remove a clipping plane from the pipeline for this frame
public void RemoveClippingPlane(
index
)

SetupDisplayMaterial

#Since v8.0
public DisplayMaterial SetupDisplayMaterial(
color
)

SetupDisplayMaterial

#Since v8.0
Sets up a display material.
public DisplayMaterial SetupDisplayMaterial(
doc,
The active document.
rhinoObject,
The Rhino object.
attributes,
The object attributes.
instanceTransform
The instance object transformation.
)
A display material if successful, null otherwise.

SetupDisplayMaterial

#Since v8.0
Sets up a display material.
public DisplayMaterial SetupDisplayMaterial(
doc,
The active document.
rhinoObject,
The Rhino object.
attributes
The object attributes.
)
A display material if successful, null otherwise.

SetupDisplayMaterial

#Since v8.0
Sets up a display material.
public DisplayMaterial SetupDisplayMaterial(
doc,
The active document.
rhinoObject
The Rhino object.
)
A display material if successful, null otherwise.

SupportedMultisamlpleModes

#Since v9.0
Multisample modes available
public static int[] SupportedMultisamlpleModes()

Events

CalculateBoundingBox

#Since v5.0
public static event EventHandler<CalculateBoundingBoxEventArgs> CalculateBoundingBox

CalculateBoundingBoxZoomExtents

#Since v5.0
Calculate a bounding to include in the Zoom Extents command.
public static event EventHandler<CalculateBoundingBoxEventArgs> CalculateBoundingBoxZoomExtents

DisplayModeChanged

#Since v6.18
public static event EventHandler<DisplayModeChangedEventArgs> DisplayModeChanged

DrawForeground

#Since v5.0
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 static event EventHandler<DrawEventArgs> DrawForeground
Remarks: This event is actually passed a DrawForegroundEventArgs, but we could not change the event declaration without breaking the SDK. Cast to a DrawForegroundEventArgs if you need it.

DrawOverlay

#Since v5.0
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 static event EventHandler<DrawEventArgs> DrawOverlay

InitFrameBuffer

#Since v6.18
public static event EventHandler<InitFrameBufferEventArgs> InitFrameBuffer

ObjectCulling

#Since v5.3
public static event EventHandler<CullObjectEventArgs> ObjectCulling

PostDrawObject

#Since v7.0
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 static event EventHandler<DrawObjectEventArgs> PostDrawObject

PostDrawObjects

#Since v5.0
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 static event EventHandler<DrawEventArgs> PostDrawObjects

PostProcessFrameBuffer

#
Called after the frame has been drawn, with the finished frame available to be read. Use this to record or stream a viewport: PostProcessFrameBufferEventArgs.TryCopyFrameBuffer(nint, int, int) copies the frame that was just drawn, and never redraws the scene.

Every frame drawn while this event is subscribed costs an extra frame buffer read back, whether or not the handler reads anything. Unsubscribe as soon as the frames are no longer needed.

The handler 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.

public static event EventHandler<PostProcessFrameBufferEventArgs> PostProcessFrameBuffer

PreDrawObject

#Since v5.0
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 static event EventHandler<DrawObjectEventArgs> PreDrawObject

PreDrawObjects

#Since v5.0
Called before objects are been drawn. Depth writing and testing are on.
public static event EventHandler<DrawEventArgs> PreDrawObjects

PreDrawTransparentObjects

#Since v6.12
Called before transparent objects have been drawn. Depth writing and testing are on.
public static event EventHandler<DrawEventArgs> PreDrawTransparentObjects

ViewportProjectionChanged

#Since v6.18
Called when the projection changes for a viewport being drawn.
public static event EventHandler<DrawEventArgs> ViewportProjectionChanged