Renderer

Description

sealed class Tinman.Engine.Rendering.Util.Renderer

Derived from

Disposable abstract
IBeginEnd
ILineThickness

The Renderer class provides methods for performing basic 3D drawing.

When IBeginEnd.Begin is called, the following properties are reset to their default value:

The calls to IBeginEnd.Begin and IBeginEnd.End may be nested.

Public / Constructors

Renderer


public constructor Renderer → (1)

context in : IGraphicsContext

[not-null]
The graphics context to use.

Creates a new instance of Renderer.

RenderException

If a graphics subsystem error has occurred.

Public / Methods

Draw​Box


[BeginEnd]
public method DrawBox → (3)

box in : Box3D

The box to draw.

colorFace in : int64

The color to use for faces.

colorLine in : int64

The color to use for lines.

Draws the given box.

Draw​Box​Soup


[BeginEnd]
public method DrawBoxSoup → (3)

boxSoup in : BoxSoup

[not-null]
The box soup to draw.

colorFace in : int64

The color to use for faces.

colorLine in : int64

The color to use for lines.

Draws the given box soup.

Draw​Cuboid


[BeginEnd]
public method DrawCuboid → (3)

cuboid in : Cuboid

The cuboid to draw.

colorFace in : int64

The color to use for faces.

colorLine in : int64

The color to use for lines.

Draws the given cuboid.

Draw​Primitive​Begin


[BeginEnd]
public method DrawPrimitiveBegin → (1)

primitive in : Primitive

The primitive to render.

Begins to render a 3D primitive.

Draw​Primitive​End


[BeginEnd]
public method DrawPrimitiveEnd → ()

Finishes rendering of the current 3D primitive.

Draw​Primitive​Vertex

3 overloads


[BeginEnd]
public method DrawPrimitiveVertex1 → (2)

in : Vec3D

Coordinate of vertex, in world-space.

color opt : int64 = Colors.White

The vertex color.

Specifies the next vertex for the current 3D primitive.


[BeginEnd]
public method DrawPrimitiveVertex2 → (2)

in : Vec3F

Coordinate of vertex, in world-space.

color opt : int64 = Colors.White

The vertex color.

Specifies the next vertex for the current 3D primitive.


[BeginEnd]
public method DrawPrimitiveVertex3 → (4)

in : float64

X-coordinate of vertex, in world-space.

in : float64

Y-coordinate of vertex, in world-space.

in : float64

Z-coordinate of vertex, in world-space.

color opt : int64 = Colors.White

The vertex color.

Specifies the next vertex for the current 3D primitive.

Fullscreen


public method Fullscreen → ()

returns → Renderer

this

Sets the Bounds of this Renderer object to full-screen (i.e. the size of the current render target, see IGraphicsContext.Size).

Public / Attributes

Bounds


public attribute Bounds → (get,set)

value : Box2I

The screen bounds.

The screen bounds of this renderer object on the render target of the graphics context.

Parameters


public attribute Parameters → (get)

value : RendererParameters

[not-null]
The renderer parameters.

Returns the renderer parameters.