Graphics3DExtensionMethods

public static class Graphics3DExtensionMethods
Provides 3D extension methods for the Eto graphics object.

Methods

Draw3DArc

#Example
public static void Draw3DArc(this Graphics graphics, Arc arc, Pen visiblePen, Pen hiddenPen)
Draw a 3D arc.
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.

Draw3DCircle

#Example
public static void Draw3DCircle(this Graphics graphics, Circle circle, Pen visiblePen, Pen hiddenPen)
Draw a 3D circle.
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.

Draw3DGrid

#Example
public static void Draw3DGrid(this Graphics graphics, Color colour, float width, int lineCount, float span, Transform transform)
Draw a square grid.
graphics (Graphics)Graphics object to draw with.
colour (Color)Colour of grid.
width (float)Thickness of lines.
lineCount (int)Number of lines.
span (float)Span of grid (half the edge length).
transform (Transform)Transformation from normalised grid to display space.

Draw3DLine

#Example
public static void Draw3DLine(this Graphics graphics, Line line, Pen visiblePen, Pen hiddenPen)
Draw a 3D line.
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.

Draw3DMesh

#Example
public static void Draw3DMesh(this Graphics graphics, Mesh mesh, Transform projection)
graphics (Graphics)
mesh (Mesh)
projection (Transform)

Draw3DWireFrame

#Example
public static void Draw3DWireFrame(this Graphics graphics, RectangleF bounds, Color colour, params (Line line, Vector3d normalA, Vector3d normalB)[] edges)
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.
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.

DrawFading3DGrid

#Example
public static void DrawFading3DGrid(this Graphics graphics, Color colour, float width, int lineCount, float span, Transform transform)
Draw a square grid.
graphics (Graphics)Graphics object to draw with.
colour (Color)Colour of grid.
width (float)Thickness of lines.
lineCount (int)Number of lines.
span (float)Span of grid (half the edge length).
transform (Transform)Transformation from normalised grid to display space.

DrawFadingLineBundle

#Example
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.
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.

DrawLineBundle

#Example
public static void DrawLineBundle(this Graphics graphics, Color colour, float width, int lineCount, BundleCorners corners)
Draw a bundle of parallel lines.
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.