Add a clipping plane to be used during the drawing of this frame
Parameters:| point (Point3d) | point on the plane |
| normal (Vector3d) | vector perpendicular to the plane |
Returns: index for the added clipping plane
If Rhino is using OpenGL for display, this function will return major.minor version of OpenGL available for this instance of Rhino
Parameters:| coreProfile (out bool) | If true, OpenGL is being used in "core profile" mode |
Returns: major version * 10 + minor version For example, OpenGL 4.5 returns 45
public void ClearFrameBuffer(Color color
) Fill the frame buffer with a single color. This function also clears the depth buffer for engines that support depth buffered drawing.
Parameters:| color (Color) | the color to fill the frame buffer with |
Clones the pipeline. Creates an identical copy of "this" pipeline. Copies all conduits from "this" pipeline to the new pipeline.
Returns: The newly cloned pipeline if successful, null otherwise. or failed to close.
Closes the pipeline.
Returns: True if the pipeline was closed, false if it was already closed or failed to close.
public static bool CullControlPolygon() Returns a value indicating if only points on the side of the surface that face the camera are displayed.
Returns: true if back faces of surface and mesh control polygons are culled. This value is determined by the _CullControlPolygon command.
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.
Parameters:| from (Point2f) | Start of the line, in screen coordinates. |
| to (Point2f) | End of the line, in screen coordinates. |
| pen (DisplayPen) | Pen to stroke the line with. |
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.
Parameters:| from (PointF) | Start of the line, in screen coordinates. |
| to (PointF) | End of the line, in screen coordinates. |
| pen (DisplayPen) | Pen to stroke the line with. |
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.
Parameters:| points (Point2f[]) | The polyline vertices, in screen coordinates. Fewer than two draws nothing. |
| pen (DisplayPen) | Pen to stroke the polyline with. |
| closed (bool) | 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. |
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.
Parameters:| points (Point2f[]) | The polyline vertices, in screen coordinates. Fewer than two draws nothing. |
| pen (DisplayPen) | Pen to stroke the polyline with. |
Draws 2D text on the viewport.
Parameters:| text (string) | the string to draw. |
| color (Color) | text color. |
| screenCoordinate (Point2d) | definition point in screen coordinates (0,0 is top-left corner) |
| middleJustified (bool) | if true text is centered around the definition point, otherwise it is lower-left justified. |
| height (int) | height in pixels (good default is 12) |
| fontface (string) | font name (good default is "Arial") |
Draws 2D text on the viewport.
Parameters:| text (string) | the string to draw. |
| color (Color) | text color. |
| screenCoordinate (Point2d) | definition point in screen coordinates (0,0 is top-left corner) |
| middleJustified (bool) | if true text is centered around the definition point, otherwise it is lower-left justified. |
| height (int) | height in pixels (good default is 12) |
Draws 2D text on the viewport.
Parameters:| text (string) | the string to draw. |
| color (Color) | text color. |
| screenCoordinate (Point2d) | definition point in screen coordinates (0,0 is top-left corner) |
| middleJustified (bool) | if true text is centered around the definition point, otherwise it is lower-left justified. |
public void Draw2dText(string text
, Color color
, Point2d screenCoordinate
, TextHorizontalAlignment horizontalAlignment
, TextVerticalAlignment verticalAlignment
, float height
, string fontface
, bool bold
, bool italic
, bool underline
, bool strikethrough
, bool applyKerning
) Draws 2D text on the viewport.
Parameters:| text (string) | The string to draw. |
| color (Color) | Text color. |
| screenCoordinate (Point2d) | Definition point in screen coordinates (0,0 is top-left corner). The alignment attaches to this point. |
| horizontalAlignment (TextHorizontalAlignment) | Where the definition point sits across the text's horizontal advance. |
| verticalAlignment (TextVerticalAlignment) | 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 (float) | Height in pixels (good default is 12). |
| fontface (string) | Font name (good default is "Arial"). |
| bold (bool) | If true, the bold face of the font family is used. |
| italic (bool) | If true, the italic face of the font family is used. |
| underline (bool) | If true, the text is underlined. |
| strikethrough (bool) | If true, the text is struck through. |
| applyKerning (bool) | If true, the font's kerning pairs are used to space the glyphs. |
Draws 2D text on the viewport.
Parameters:| text (string) | The string to draw. |
| color (Color) | Text color. |
| worldCoordinate (Point3d) | Definition point in world coordinates. |
| middleJustified (bool) | If true text is centered around the definition point, otherwise it is lower-left justified. |
| height (int) | Height in pixels (good default is 12). |
| fontface (string) | Font name (good default is "Arial"). |
Draws 2D text on the viewport.
Parameters:| text (string) | the string to draw. |
| color (Color) | text color. |
| worldCoordinate (Point3d) | definition point in world coordinates. |
| middleJustified (bool) | if true text is centered around the definition point, otherwise it is lower-left justified. |
| height (int) | height in pixels (good default is 12) |
Draws 2D text on the viewport.
Parameters:| text (string) | the string to draw. |
| color (Color) | text color. |
| worldCoordinate (Point3d) | definition point in world coordinates. |
| middleJustified (bool) | if true text is centered around the definition point, otherwise it is lower-left justified. |
public void Draw2dText(string text
, Color color
, Point3d worldCoordinate
, TextHorizontalAlignment horizontalAlignment
, TextVerticalAlignment verticalAlignment
, float height
, string fontface
, bool bold
, bool italic
, bool underline
, bool strikethrough
, bool applyKerning
) Draws 2D text on the viewport.
Parameters:| text (string) | The string to draw. |
| color (Color) | Text color. |
| worldCoordinate (Point3d) | Definition point in world coordinates. The alignment attaches to this point. |
| horizontalAlignment (TextHorizontalAlignment) | Where the definition point sits across the text's horizontal advance. |
| verticalAlignment (TextVerticalAlignment) | 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 (float) | Height in pixels (good default is 12). |
| fontface (string) | Font name (good default is "Arial"). |
| bold (bool) | If true, the bold face of the font family is used. |
| italic (bool) | If true, the italic face of the font family is used. |
| underline (bool) | If true, the text is underlined. |
| strikethrough (bool) | If true, the text is struck through. |
| applyKerning (bool) | If true, the font's kerning pairs are used to space the glyphs. |
Draws 3d text with a different plane than what is defined in the Text3d class.
Parameters:| text (Text3d) | The string to draw. |
| color (Color) | Text color. |
| textPlane (Plane) | The plane for the text object. |
Draws 3d text using the Text3d plane with an adjusted origin.
Parameters:| text (Text3d) | The string to draw. |
| color (Color) | Text color. |
| textPlaneOrigin (Point3d) | The origin of the plane to draw. |
public void DrawActivePoint(Point3d point
) Draws a point in style used during "GetPoint" operations
Parameters:| point (Point3d) | Location of the point in world coordinates |
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 DrawArc(Arc arc
, Color color
, int thickness
) Draw a single arc object.
Parameters:| arc (Arc) | Arc to draw. |
| color (Color) | Color to draw with. |
| thickness (int) | Thickness (in pixels) of arc. |
public void DrawArc(Arc arc
, Color color
) Draw a single arc object.
Parameters:| arc (Arc) | Arc to draw. |
| color (Color) | Color to draw with. |
Draws a single arrow object. An arrow consists of a Shaft and an Arrow head at the end of the shaft.
Parameters:| line (Line) | Arrow shaft. |
| color (Color) | Color of arrow. |
| screenSize (double) | If screenSize != 0.0 then the size (in screen pixels) of the arrow head will be equal to screenSize. |
| relativeSize (double) | If relativeSize != 0.0 and screen size == 0.0 the size of the arrow head will be proportional to the arrow shaft length. |
public void DrawArrow(Line line
, Color color
) Draws a single arrow object. An arrow consists of a Shaft and an Arrow head at the end of the shaft.
Parameters:| line (Line) | Arrow shaft. |
| color (Color) | Color of arrow. |
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.
Parameters:| line (Line) | Vector shaft to draw. |
| headSize (double) | Size of the head as a factor of arrow length. 0.1 would be a decent size. |
| color (Color) | Color of arrow geometry. |
| shaftWidth (float) | 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. |
Draws a single arrow head.
Parameters:| tip (Point3d) | Point of arrow head tip. |
| direction (Vector3d) | Direction in which arrow head is pointing. |
| color (Color) | Color of arrow head. |
| screenSize (double) | If screenSize != 0.0, then the size (in screen pixels) of the arrow head will be equal to the screenSize. |
| worldSize (double) | 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. |
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
, Color color
) Draws a collection of arrow objects. An arrow consists of a Shaft and an Arrow head at the end of the shaft.
Parameters:| lines (Line[]) | Arrow shafts. |
| color (Color) | Color of arrows. |
Draws a bitmap in screen coordinates, scaled to fit the given size.
Parameters:| bitmap (DisplayBitmap) | bitmap to draw |
| left (int) | where the left edge of the bitmap should appear in screen coordinates |
| top (int) | where the top edge of the bitmap should appear in screen coordinates |
| width (int) | width (in pixels) to draw the bitmap at |
| height (int) | height (in pixels) to draw the bitmap at |
Draws a bitmap in screen coordinates
Parameters:| bitmap (DisplayBitmap) | bitmap to draw |
| left (int) | where top/left corner of bitmap should appear in screen coordinates |
| top (int) | where top/left corner of bitmap should appear in screen coordinates |
Draws the edges of a BoundingBox.
Parameters:| box (BoundingBox) | Box to draw. |
| color (Color) | Color to draw in. |
| thickness (int) | Thickness (in pixels) of box edges. |
Draws the edges of a BoundingBox.
public void DrawBox(Box box
, Color color
, int thickness
) Draws the edges of a Box object.
Parameters:| box (Box) | Box to draw. |
| color (Color) | Color to draw in. |
| thickness (int) | Thickness (in pixels) of box edges. |
public void DrawBox(Box box
, Color color
) Draws the edges of a Box object.
Parameters:| box (Box) | Box to draw. |
| color (Color) | Color to draw in. |
Draws corner widgets of a world aligned bounding box.
Parameters:| box (BoundingBox) | Box to draw. |
| color (Color) | Color to draw with. |
| size (double) | Size (in model units) of the corner widgets. |
| thickness (int) | Thickness (in pixels) of the corner widgets. |
Draws corner widgets of a world aligned bounding box.
Parameters:| box (BoundingBox) | Box to draw. |
| color (Color) | Color to draw with. |
| size (double) | Size (in model units) of the corner widgets. |
Draws corner widgets of a world aligned bounding box. Widget size will be 5% of the Box diagonal.
Draws a shaded mesh representation of a brep.
public void DrawBrepWires(Brep brep
, Color color
, int wireDensity
) Draws all the wireframe curves of a brep object.
Parameters:| brep (Brep) | Brep to draw. |
| color (Color) | Color of Wireframe curves. |
| wireDensity (int) | "Density" of wireframe curves. -1 = no internal wires. 0 = default internal wires. >0 = custom high density. |
public void DrawBrepWires(Brep brep
, Color color
) Draws all the wireframe curves of a brep object.
Parameters:| brep (Brep) | Brep to draw. |
| color (Color) | Color of Wireframe curves. |
Draw a single circle object.
Parameters:| circle (Circle) | Circle to draw. |
| color (Color) | Color to draw with. |
| thickness (int) | Thickness (in pixels) of circle. |
Draw a single circle object.
Parameters:| circle (Circle) | Circle to draw. |
| color (Color) | Color to draw with. |
Draw a wireframe cone.
Parameters:| cone (Cone) | Cone to draw. |
| color (Color) | Color to draw with. |
| thickness (int) | Thickness (in pixels) of Cone wires. |
Draw a wireframe cone.
Parameters:| cone (Cone) | Cone to draw. |
| color (Color) | Color to draw with. |
Draws a construction plane.
public void DrawCurvatureGraph(Curve curve
, Color color
, int hairScale
, int hairDensity
, int sampleDensity
) Draw a typical Rhino Curvature Graph.
Parameters:| curve (Curve) | Base curve for curvature graph. |
| color (Color) | Color of curvature graph. |
| hairScale (int) | 100 = true length, > 100 magnified, < 100 shortened. |
| hairDensity (int) | >= 0 larger numbers = more hairs (good default is 1). |
| sampleDensity (int) | Between 1 and 10. Higher numbers draw smoother outer curves. (good default is 2). |
public void DrawCurvatureGraph(Curve curve
, Color color
, int hairScale
) Draw a typical Rhino Curvature Graph.
Parameters:| curve (Curve) | Base curve for curvature graph. |
| color (Color) | Color of curvature graph. |
| hairScale (int) | 100 = true length, > 100 magnified, < 100 shortened. |
public void DrawCurvatureGraph(Curve curve
, Color color
) Draw a typical Rhino Curvature Graph.
Parameters:| curve (Curve) | Base curve for curvature graph. |
| color (Color) | Color of curvature graph. |
public void DrawCurvaturePreview(Brep brep
, Color color
) Draws a Brep in Curvature Analysis preview.
Parameters:| brep (Brep) | Brep to draw. |
| color (Color) | Objct color. |
public void DrawCurvaturePreview(Mesh mesh
, Color color
) Draws a Mesh in Curvature Analysis preview.
Parameters:| mesh (Mesh) | Mesh to draw. |
| color (Color) | Objct color. |
Draw a single Curve object.
Parameters:| curve (Curve) | Curve to draw. |
| color (Color) | Color to draw with. |
| thickness (int) | Thickness (in pixels) of curve. |
Draw a single Curve object.
Parameters:| curve (Curve) | Curve to draw. |
| color (Color) | Color to draw with. |
Draw a wireframe cylinder.
Parameters:| cylinder (Cylinder) | Cylinder to draw. |
| color (Color) | Color to draw with. |
| thickness (int) | Thickness (in pixels) of cylinder wires. |
Draw a wireframe cylinder.
Parameters:| cylinder (Cylinder) | Cylinder to draw. |
| color (Color) | Color to draw with. |
Draws a text dot in screen coordinates.
Parameters:| screenX (float) | X coordinate (in pixels) of dot center. |
| screenY (float) | Y coordinate (in pixels) of dot center. |
| text (string) | Text content of dot. |
| dotColor (Color) | Dot background color. |
| textColor (Color) | Dot foreground color. |
Draws a text dot in screen coordinates.
Parameters:| screenX (float) | X coordinate (in pixels) of dot center. |
| screenY (float) | Y coordinate (in pixels) of dot center. |
| text (string) | Text content of dot. |
Draw a text dot in world coordinates.
Parameters:| worldPosition (Point3d) | Location of dot in world coordinates. |
| text (string) | Text content of dot. |
| dotColor (Color) | Dot background color. |
| textColor (Color) | Dot foreground color. |
Draws a text dot in world coordinates.
Parameters:| worldPosition (Point3d) | Location of dot in world coordinates. |
| text (string) | Text content of dot. |
Draw a text dot as defined by the text dot class
public void DrawDottedLine(Line line
, Color color
) Draws a single dotted line.
Parameters:| line (Line) | Line to draw. |
| color (Color) | Color of line. |
Draws a single dotted line.
Draws a set of connected lines (polyline) in a dotted pattern (0x00001111).
Parameters:| points (IEnumerable<Point3d>) | End points of each line segment. |
| color (Color) | Color of polyline. |
| close (bool) | Draw a line between the first and last points. |
public void DrawDraftAnglePreview(Brep brep
, Color color
) Draws a Brep in Draft Angle preview.
Parameters:| brep (Brep) | Brep to draw. |
| color (Color) | Objct color. |
public void DrawDraftAnglePreview(Mesh mesh
, Color color
) Draws a Mesh in Draft Angle preview.
Parameters:| mesh (Mesh) | Mesh to draw. |
| color (Color) | Objct color. |
Draw inference point used in gesture based snapping
Parameters:| P (Point3d) | Location of point in world coordinates |
| color (Color) | Color of the point |
Draws a Brep in Environment Map preview with a texture of your own, instead of the one in
EmapAnalysisSettings.
public void DrawEmapPreview(Brep brep
, Color color
) Draws a Brep in Environment Map preview.
Parameters:| brep (Brep) | Brep to draw. |
| color (Color) | Objct color. |
Draws a Mesh in Environment Map preview with a texture of your own, instead of the one in
EmapAnalysisSettings.
public void DrawEmapPreview(Mesh mesh
, Color color
) Draws a Mesh in Environment Map preview.
Parameters:| mesh (Mesh) | Mesh to draw. |
| color (Color) | Objct color. |
Draws all the wireframe curves of an extrusion object.
Parameters:| extrusion (Extrusion) | Extrusion to draw. |
| color (Color) | Color of Wireframe curves. |
| wireDensity (int) | "Density" of wireframe curves. -1 = no internal wires. 0 = default internal wires. >0 = custom high density. |
Draws all the wireframe curves of an extrusion object.
Parameters:| extrusion (Extrusion) | Extrusion to draw. |
| color (Color) | Color of Wireframe curves. |
Draw a two point gradient filled hatch
Draw an inference line used in gesture based snapping
public void DrawLight(Light light
, Color wireframeColor
) Draws a light.
Parameters:| light (Light) | The light to draw. |
| wireframeColor (Color) | The wireframe color. |
Draws a single line object.
Parameters:| line (Line) | Line to draw. |
| color (Color) | Color to draw line in. |
| thickness (int) | Thickness (in pixels) of line. |
Draws a single line object.
Parameters:| line (Line) | Line to draw. |
| color (Color) | Color to draw line in. |
Draws a single line object.
Parameters:| from (Point3d) | Line from point. |
| to (Point3d) | Line to point. |
| color (Color) | Color to draw line in. |
| thickness (int) | Thickness (in pixels) of line. |
Draws a single line object.
Draws an arrow made up of three line segments.
Parameters:| line (Line) | Base line for arrow. |
| color (Color) | Color of arrow. |
| thickness (int) | Thickness (in pixels) of the arrow line segments. |
| size (double) | Size (in world units) of the arrow tip lines. |
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
Parameters:| from (Point3d) | Line from point. |
| to (Point3d) | Line to point. |
| color (Color) | Color to draw line in. |
| thickness (int) | Thickness (in pixels) of line. |
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.
Parameters:| lines (IEnumerable<Line>) | Lines to draw. |
| color (Color) | Color to draw with. |
| thickness (int) | Thickness (in pixels) of lines. |
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.
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
Parameters:| lines (IEnumerable<Line>) | the lines to draw |
| color (Color) | Color to draw lines in |
| thickness (int) | Thickness (in pixels) of lines |
Draws an arrow marker as a view-aligned widget.
Parameters:| tip (Point3d) | Location of arrow tip point. |
| direction (Vector3d) | Direction of arrow. |
| color (Color) | Color of arrow widget. |
| thickness (int) | Thickness of arrow widget lines. |
| size (double) | Size (in pixels) of the arrow shaft. |
| rotation (double) | Rotational angle adjustment (in radians, counter-clockwise of direction. |
Draws an arrow marker as a view-aligned widget.
Parameters:| tip (Point3d) | Location of arrow tip point. |
| direction (Vector3d) | Direction of arrow. |
| color (Color) | Color of arrow widget. |
| thickness (int) | Thickness of arrow widget lines. |
| size (double) | Size (in pixels) of the arrow shaft. |
Draws an arrow marker as a view-aligned widget.
Parameters:| tip (Point3d) | Location of arrow tip point. |
| direction (Vector3d) | Direction of arrow. |
| color (Color) | Color of arrow widget. |
| thickness (int) | Thickness of arrow widget lines. |
Draws an arrow marker as a view-aligned widget.
Parameters:| tip (Point3d) | Location of arrow tip point. |
| direction (Vector3d) | Direction of arrow. |
| color (Color) | Color of arrow widget. |
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.
Parameters:| meshes (IEnumerable<Mesh>) | The meshes to draw as one batch. Each should have current single-precision vertices and vertex normals (see remarks); null entries are skipped. |
| material (GrasshopperDisplayMaterial) | The G2 shaded settings to draw with. When null, default settings are used. |
public void DrawMeshFalseColors(Mesh mesh)
Draws the mesh faces as false color patches. The mesh must have Vertex Colors defined for this to work.
public void DrawMeshShaded(Mesh mesh
, Color diffuseMaterialColor
, IsoDrawEffect zebraSettings
) Draws shaded mesh with isodraw settings applied (zebra)
Draws the shaded faces of a given mesh.
Draws the shaded faces of a given mesh.
Parameters:| mesh (Mesh) | Mesh to draw. |
| material (DisplayMaterial) | Material to draw faces with. |
| faceIndices (int[]) | Indices of specific faces to draw. |
Draws the shaded faces of a given mesh.
public void DrawMeshVertices(Mesh mesh
, Color color
) Draws all the vertices in a given mesh.
Parameters:| mesh (Mesh) | Mesh for vertex drawing. |
| color (Color) | Color of mesh vertices. |
public void DrawMeshWires(Mesh mesh
, Color color
, int thickness
) Draws all the wires in a given mesh.
Parameters:| mesh (Mesh) | Mesh for wire drawing. |
| color (Color) | Color of mesh wires. |
| thickness (int) | Thickness (in pixels) of mesh wires. |
public void DrawMeshWires(Mesh mesh
, Color color
) Draws all the wires in a given mesh.
Parameters:| mesh (Mesh) | Mesh for wire drawing. |
| color (Color) | Color of mesh wires. |
public void DrawPatternedLine(Line line
, Color color
, int pattern
, int thickness
) Draws a single line with specified pattern.
Parameters:| line (Line) | Line to draw. |
| color (Color) | Color of line. |
| pattern (int) | Pattern of the line (like 0x00001111 for dotted line). |
| thickness (int) | Thickness (in pixels) of lines. |
Draws a single line with specified pattern.
Parameters:| from (Point3d) | Line start point. |
| to (Point3d) | Line end point. |
| color (Color) | Color of line. |
| pattern (int) | Pattern of the line (like 0x00001111 for dotted line). |
| thickness (int) | Thickness (in pixels) of lines. |
Draws a set of connected lines (polyline) with specified pattern.
Parameters:| points (IEnumerable<Point3d>) | End points of each line segment. |
| color (Color) | Color of polyline. |
| pattern (int) | Pattern to use for the line (like 0x00001111 for dotted). |
| thickness (int) | Thickness (in pixels) of lines. |
| close (bool) | Draw a line between the first and last points. |
Draws a point with a given radius, style and color.
Parameters:| point (Point3d) | Location of point in world coordinates. |
| color (Color) | Color of point. |
Draws a point with a given radius, style and color.
Parameters:| point (Point3d) | Location of point in world coordinates. |
| style (PointStyle) | Point display style. |
| radius (float) | Point size in pixels. |
| color (Color) | Color of point. If style is ControlPoint, this will be the border color. |
Draws a point with a given radius, style and color.
Parameters:| point (Point3d) | Location of point in world coordinates. |
| style (PointStyle) | Point display style. |
| radius (int) | Point size in pixels. |
| color (Color) | Color of point. If style is ControlPoint, this will be the border color. |
public void DrawPoint(Point3d point
) Draws a point using the current display attribute size, style and color
Parameters:| point (Point3d) | Location of point in world coordinates. |
Draws a point cloud.
Parameters:| cloud (PointCloud) | Point cloud to draw. |
| size (float) | Size of points. |
| color (Color) | Color of points in the cloud, if the cloud has a color array this setting is ignored. |
Draws a point cloud.
Parameters:| cloud (PointCloud) | Point cloud to draw, if the cloud has a color array, it will be used, otherwise the points will be black. |
| size (float) | Size of points. |
Draws a point cloud.
Parameters:| cloud (PointCloud) | Point cloud to draw. |
| size (int) | Size of points. |
| color (Color) | Color of points in the cloud, if the cloud has a color array this setting is ignored. |
Draws a point cloud.
Parameters:| cloud (PointCloud) | Point cloud to draw, if the cloud has a color array, it will be used, otherwise the points will be black. |
| size (int) | Size of points. |
Draw a set of points with a given radius, style and color.
Parameters:| points (IEnumerable<Point3d>) | Location of points in world coordinates. |
| style (PointStyle) | Point display style. |
| radius (float) | Point size in pixels. |
| color (Color) | Color of points. If style is ControlPoint, this will be the border color. |
Draw a set of points with a given radius, style and color.
Parameters:| points (IEnumerable<Point3d>) | Location of points in world coordinates. |
| style (PointStyle) | Point display style. |
| radius (int) | Point size in pixels. |
| color (Color) | Color of points. If style is ControlPoint, this will be the border color. |
Draws a filled, convex polygon from a collection of points.
Parameters:| points (IEnumerable<Point3d>) | Collection of world coordinate points that are connected by lines to form a closed shape. Collection must contain at least 3 points. |
| color (Color) | Color to draw with. |
| filled (bool) | true if the closed area should be filled with color. false if you want to draw just the border of the closed shape. |
Draws a single Polyline object.
Parameters:| polyline (IEnumerable<Point3d>) | Polyline to draw. |
| color (Color) | Color to draw in. |
| thickness (int) | Thickness (in pixels) of the Polyline. |
Draws a single Polyline object.
Draw a wireframe sphere.
Parameters:| sphere (Sphere) | Sphere to draw. |
| color (Color) | Color to draw with. |
| thickness (int) | Thickness (in pixels) of Sphere wires. |
Draw a wireframe sphere.
Parameters:| sphere (Sphere) | Sphere to draw. |
| color (Color) | Color to draw with. |
Draw screen oriented image centered at 2d screen location
Draws the viewport as seen from the left and the right eye viewports and returns the result as OpenGL texture handles.
Parameters:| viewportLeft (ViewportInfo) | The viewport representing the left eye location and look direction. |
| viewportRight (ViewportInfo) | The viewport representing the right eye location and look direction. |
| handleLeft (out uint) | Will contain the OpenGL texture handle which references the left output color buffer. |
| handleRight (out uint) | Will contain the OpenGL texture handle which references the right output color buffer. |
Returns: true if drawing succeeded, false otherwise.
Draw a shaded mesh representation of a SubD
Draws all the wireframe curves of a SubD object
Parameters:| subd (SubD) | SubD to draw |
| color (Color) | wire color |
| thickness (float) | wire thickness |
Draws all the wireframe curves os a SubD object using different pens
Parameters:| subd (SubD) | SubD to draw |
| boundaryPen (DisplayPen) | Pen to use for boundary wires. If null, no boundary wires will be drawn |
| smoothInteriorPen (DisplayPen) | Pen to use for smooth interior wires. If null, no smooth interior wires will be drawn |
| creasePen (DisplayPen) | Pen to use for crease wires. If null, no crease wires will be drawn |
| nonmanifoldPen (DisplayPen) | Pen to use for non-manifold wires. If null, no non-manifold wires will be drawn |
Draw wireframe display for a single surface.
Parameters:| surface (Surface) | Surface to draw. |
| wireColor (Color) | Color to draw with. |
| wireDensity (int) | Thickness (in pixels) or wires to draw. |
Draw a given viewport to an off-screen bitmap.
Parameters:| viewport (RhinoViewport) | Viewport to draw. |
| width (int) | Width of target image. |
| height (int) | Height of target image. |
Returns: A bitmap containing the given view, or null on error.
Draw a wireframe torus.
Parameters:| torus (Torus) | Torus to draw. |
| color (Color) | Color to draw with. |
| thickness (int) | Thickness (in pixels) of torus wires. |
Draw a wireframe torus.
Parameters:| torus (Torus) | Torus to draw. |
| color (Color) | Color to draw with. |
public void DrawZebraPreview(Brep brep
, Color color
) Draws a shaded Brep with Zebra stripe preview.
Parameters:| brep (Brep) | Brep to draw. |
| color (Color) | Object color. |
public void DrawZebraPreview(Mesh mesh
, Color color
) Draws a shaded Mesh with Zebra stripe preview.
Parameters:| mesh (Mesh) | Mesh to draw. |
| color (Color) | Object color. |
public void EnableClippingPlanes(bool enable
) Enable or disable the Clipping Plane logic of the engine.
Parameters:| enable (bool) | true to enable Clipping Planes, false to disable. |
public void EnableColorWriting(bool enable
) Enable or disable the ColorWriting behavior of the engine.
Parameters:| enable (bool) | true to enable ColorWriting, false to disable. |
public void EnableDepthTesting(bool enable
) Enable or disable the DepthTesting behavior of the engine. When DepthTesting is disabled, objects in front will no longer occlude objects behind them.
Parameters:| enable (bool) | true to enable DepthTesting, false to disable. |
public void EnableDepthWriting(bool enable
) Enable or disable the DepthWriting behavior of the engine. When DepthWriting is disabled, drawn geometry does not affect the Z-Buffer.
Parameters:| enable (bool) | true to enable DepthWriting, false to disable. |
public void EnableLighting(bool enable
) Enable or disable the Lighting logic of the engine.
Parameters:| enable (bool) | true to enable Lighting, false to disable. |
public void Flush()
Force the pipeline to immediately flush any cached geometry to the display
public nint GetDirect3d11Device()
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.
Returns: Pointer to an ID3D11Device, or IntPtr.Zero.
public nint GetDirect3d11DeviceContext()
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.
Returns: Pointer to an ID3D11DeviceContext1, or IntPtr.Zero.
[CLSCompliant(false)]
public static void GetDrawListSerialNumbers(out uint modelSerialNumber
, out uint pageSerialNumber
) 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.
Parameters:| modelSerialNumber (out uint) | The current model draw list serial number. |
| pageSerialNumber (out uint) | The current page view draw list serial number. |
public Light[] GetLights()
Get lights that this pipeline is current using
public float[] GetOpenGLCameraToClip() Get an array of 16 floats that represents the "camera" to "clip" coordinate transformation in OpenGL's right handed coordinate system
public float[] GetOpenGLWorldToCamera(bool includeModelTransform
) Get an array of 16 floats that represents the "world" to "camera" coordinate transformation in OpenGL's right handed coordinate system
Parameters:| includeModelTransform (bool) | |
public float[] GetOpenGLWorldToClip(bool includeModelTransform
) Get an array of 16 floats that represents the "world" to "clip" coordinate transformation in OpenGL's right handed coordinate system
Parameters:| includeModelTransform (bool) | |
public bool InterruptDrawing() 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.
Returns: true if the pipeline should stop attempting to draw more geometry and just show the frame buffer.
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.
Returns: true if this object can be drawn in the pipeline's viewport based on it's object type and display attributes.
Returns true if the currently drawn frame is part of a tiled capture. Tiled captures are performed when creating large raster outputs.
Parameters:| fullSize (out Size) | Final full size area that is being created |
| currentTile (out Rectangle) | What portion of the fullSize area that is currently being drawn |
Returns: true if a tiled capture is being performed. If false, the fullSize parameter will have the same size as currentTile
Test a given box for visibility inside the view frustum under the current viewport and model transformation settings.
Returns: true if at least some portion of the box is visible, false if not.
Test a given 3d world coordinate point for visibility inside the view frustum under the current viewport and model transformation settings.
Parameters:| worldCoordinate (Point3d) | Point to test for visibility. |
Returns: true if the point is visible, false if it is not.
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.
Returns: true if the object is visible, false if not.
public static bool MakeDefaultOpenGLContextCurrent() Make a "default" OpenGL context current
Determines screen rectangle that would be drawn to using the Draw2dText(..) function with the same parameters.
Parameters:| text (string) | text to measure. |
| definitionPoint (Point2d) | either lower-left or middle of text. |
| middleJustified (bool) | true=middle justified. false=lower-left justified. |
| rotationRadians (double) | text rotation in radians |
| height (int) | height in pixels (good default is 12) |
| fontFace (string) | font name (good default is "Arial") |
Returns: rectangle in the viewport's screen coordinates on success.
Opens the pipeline.
Returns: True if the pipeline was opened, false if it was already open or failed to open.
public void PopClipTesting()
obsoleteUse PopDepthTesting
Pop a ClipTesting flag off the engine's stack.
public void PopCullFaceMode()
Pop a FaceCull flag off the engine's stack.
public void PopDepthTesting()
Pop a DepthTesting flag off the engine's stack.
public void PopDepthWriting()
Pop a DepthWriting flag off the engine's stack.
public void PopProjection()
Pop a view projection off this pipelines projection stack
public void Push2dProjection()
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 PushClipTesting(bool enable
) obsoleteUse PushDepthTesting
Push a ClipTesting flag on the engine's stack.
Parameters:| enable (bool) | ClipTesting flag. |
Push a FaceCull flag on the engine's stack.
public void PushDepthTesting(bool enable
) Push a DepthTesting flag on the engine's stack.
Parameters:| enable (bool) | DepthTesting flag. |
public void PushDepthWriting(bool enable
) Push a DepthWriting flag on the engine's stack.
Parameters:| enable (bool) | DepthWriting flag. |
public void RemoveClippingPlane(int index
) Remove a clipping plane from the pipeline for this frame
Sets up a display material.
Returns: A display material if successful, null otherwise.
Sets up a display material.
Returns: A display material if successful, null otherwise.
Multisample modes available