Graphics3DExtensionMethods

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

Methods

Draw3DArc

#Example
Draw a 3D arc.
public static void Draw3DArc(
this Graphics
graphics,
Graphics object to draw with.
arc,
Arc to draw. Arc is drawn from parallel top view.
Pen
visiblePen,
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.
Pen
hiddenPen
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
Draw a 3D circle.
public static void Draw3DCircle(
this Graphics
graphics,
Graphics object to draw with.
circle,
Circle to draw. Circle is drawn from parallel top view.
Pen
visiblePen,
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.
Pen
hiddenPen
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
Draw a square grid.
public static void Draw3DGrid(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Colour of grid.
width,
Thickness of lines.
lineCount,
Number of lines.
span,
Span of grid (half the edge length).
transform
Transformation from normalised grid to display space.
)

Draw3DLine

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

Draw3DWireFrame

#Example
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.
public static void Draw3DWireFrame(
this Graphics
graphics,
Graphics object to draw with.
RectangleF
bounds,
Framing rectangle.
Color
colour,
Colour of edges.
params (Line line, Vector3d normalA, Vector3d normalB)[]
edges
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
Draw a square grid.
public static void DrawFading3DGrid(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Colour of grid.
width,
Thickness of lines.
lineCount,
Number of lines.
span,
Span of grid (half the edge length).
transform
Transformation from normalised grid to display space.
)

DrawFadingLineBundle

#Example
Draw a bundle of parallel lines that fade out along all edges.
public static void DrawFadingLineBundle(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Colour of lines.
width,
Thickness of lines.
lineCount,
Number of lines to draw.
corners
Bundle corners.
)

DrawLineBundle

#Example
Draw a bundle of parallel lines.
public static void DrawLineBundle(
this Graphics
graphics,
Graphics object to draw with.
Color
colour,
Colour of lines.
width,
Thickness of lines.
lineCount,
Number of lines to draw.
corners
Bundle corners.
)