Graphics3DExtensionMethods
Provides 3D extension methods for the Eto graphics object.
Methods
Draw a 3D arc.
Parameters:
| graphics (Graphics) | Graphics object to draw with. |
| arc (Arc) | Arc to draw. Arc is drawn from parallel top view. |
| visiblePen (Pen) | Those parts of the arc above the XY plane will be drawn in this edge. If you do not wish to draw the visible parts, you can provide a null edge. |
| hiddenPen (Pen) | Those parts of the arc below the XY plane will be drawn in this edge. If you do not wish to draw the hidden parts, you can provide a null edge. |
public static void Draw3DCircle(this Graphics graphics, Circle circle, Pen visiblePen, Pen hiddenPen)
Draw a 3D circle.
Parameters:
| graphics (Graphics) | Graphics object to draw with. |
| circle (Circle) | Circle to draw. Circle is drawn from parallel top view. |
| visiblePen (Pen) | Those parts of the circle above the XY plane will be drawn in this edge. If you do not wish to draw the visible parts, you can provide a null edge. |
| hiddenPen (Pen) | Those parts of the circle below the XY plane will be drawn in this edge. If you do not wish to draw the hidden parts, you can provide a null edge. |
Draw a square grid.
Draw a 3D line.
Parameters:
| graphics (Graphics) | Graphics object to draw with. |
| line (Line) | Line ot draw. |
| visiblePen (Pen) | Those parts of the circle above the XY plane will be drawn in this edge. If you do not wish to draw the visible parts, you can provide a null edge. |
| hiddenPen (Pen) | Those parts of the circle below the XY plane will be drawn in this edge. If you do not wish to draw the hidden parts, you can provide a null edge. |
Draw a 3D wireframe as large as possible within a rectangle. This method will draw the shape centred in the bounding rectangle using a top-down perspective.
Parameters:
| graphics (Graphics) | Graphics object to draw with. |
| bounds (RectangleF) | Framing rectangle. |
| colour (Color) | Colour of edges. |
| edges (params (Line line, Vector3d normalA, Vector3d normalB)[]) | Collection of colour coded wireframe edges. The edges should be pre-scaled to fit within the (-1,-1,-1) to (+1,+1,+1) unit. |
Draw a square grid.
public static void DrawFadingLineBundle(this Graphics graphics, Color colour, float width, int lineCount, BundleCorners corners)
Draw a bundle of parallel lines that fade out along all edges.
Parameters:
| graphics (Graphics) | Graphics object to draw with. |
| colour (Color) | Colour of lines. |
| width (float) | Thickness of lines. |
| lineCount (int) | Number of lines to draw. |
| corners (BundleCorners) | Bundle corners. |
public static void DrawLineBundle(this Graphics graphics, Color colour, float width, int lineCount, BundleCorners corners)
Draw a bundle of parallel lines.
Parameters:
| graphics (Graphics) | Graphics object to draw with. |
| colour (Color) | Colour of lines. |
| width (float) | Thickness of lines. |
| lineCount (int) | Number of lines to draw. |
| corners (BundleCorners) | Bundle corners. |