TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class Renderer in Tinman.AddOns.Rendering

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

sealed class Renderer extends Disposable
  implements IBeginEnd

Public / Attributes

Bounds

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

public property Bounds { get set }
type Box2I
value The screen bounds.

LifecycleState

Returns the lifecycle state of this object.

public virtual property LifecycleState { get }
type LifecycleState
value The lifecycle state.
inherited Disposable.LifecycleState

Origin

The origin point to use for rendering 3D primitives.

public property Origin { get set }
type Vec3D
value Coordinates of the origin point.

Remarks:

The configured origin point is only honored when Begin is called, and is retained afterwards.

Defaults to Zero

StateCamera

The shader effect camera state.

public property StateCamera { get }
type CameraState
value [not-null] The state wrapper.

Public / Constructors

Renderer

Creates a new instance of Renderer.

public constructor Renderer ([Owner] IGraphicsContext context)
params context [not-null] The graphics context to use.

Remarks:

The shader effect 'Tinman.Renderer' must have been registered with the given graphics context before a Renderer object can be created.

Public / Methods

AcquireTry

Acquires a strong reference to this disposable object.

[OwnerReturn, ThreadSafe]
public method AcquireTry ()
type IDisposable
returns this if a new strong reference has been acquired, null if this object is already being disposed.
inherited Disposable.AcquireTry

Remarks:

The object will not be actually disposed by calls to Dispose when there is at least one strong reference left. Code that calls the AcquireTry method is responsible for calling the Dispose method accordingly.

This method is not intended to be used in performance-critical code. It should only be used to high-level resource management.

Begin

Begins an access to this object.

public method Begin ()
implements IBeginEnd.Begin

Remarks:

See the documentation of the class which implements this interface for details on the operations that must be wrapped in Begin and End calls.

See also:

BeginEnd

Dispose

Releases all resources held by this object if there are no more strong references to it, decrements the reference counter by one otherwise.

[Dispose, OwnerThis, ThreadSafe]
public method Dispose ()
inherited Disposable.Dispose

Remarks:

The Dispose method silently returns if the object has already been disposed.

DrawPrimitiveBegin

Begins to render a 3D primitive.

[BeginEnd]
public method DrawPrimitiveBegin (Primitive primitive)
params primitive The primitive to render.

See also:

DrawPrimitiveEnd
DrawPrimitiveVertex

DrawPrimitiveEnd

Finishes rendering of the current 3D primitive.

[BeginEnd]
public method DrawPrimitiveEnd ()

See also:

DrawPrimitiveBegin
DrawPrimitiveVertex

DrawPrimitiveVertex

Specifies the next vertex for the current 3D primitive.

[BeginEnd]
public method DrawPrimitiveVertex (Vec3D v, int64 color = Colors.White)
params v Coordinate of vertex, in world-space.
  color The vertex color.

See also:

DrawPrimitiveBegin
DrawPrimitiveEnd

Specifies the next vertex for the current 3D primitive.

[BeginEnd]
public method DrawPrimitiveVertex (Vec3F v, int64 color = Colors.White)
params v Coordinate of vertex, in world-space.
  color The vertex color.

See also:

DrawPrimitiveBegin
DrawPrimitiveEnd

Specifies the next vertex for the current 3D primitive.

[BeginEnd]
public method DrawPrimitiveVertex (float64 x, float64 y, float64 z, int64 color = Colors.White)
params x X-coordinate of vertex, in world-space.
  y Y-coordinate of vertex, in world-space.
  z Z-coordinate of vertex, in world-space.
  color The vertex color.

See also:

DrawPrimitiveBegin
DrawPrimitiveEnd

End

Ends the current access to this object.

public method End ()
implements IBeginEnd.End

Remarks:

See the documentation of the class which implements this interface for details on the operations that must be wrapped in Begin and End calls.

See also:

BeginEnd

Fullscreen

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

public method Fullscreen ()
type Renderer
returns [not-null] this