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

class ModelRenderer in Tinman.AddOns.Models

sealed class ModelRenderer implements IBeginEnd

Public / Constants

ModeCount

Count of valid renderer modes.

public constant ModeCount = 9
type int32

Remarks:

Ordinal values of ModelRendererMode items are in the range [0..ModeCount-1].

Public / Attributes

Fade

The fade range to apply to models during rendering.

public property Fade { get set }
type RangeF
value The model fade range, given as camera distance values.

Remarks:

Models will start to become visible at Start and will have become invisible again at End.

Set to Zero to disable fading.

Defaults to Zero.

Frustum

Optional view frustum to use for discarding invisible model parts.

public property Frustum { get set }
type IFrustum
value The view frustum or null.

Remarks:

The current view frustum is taken into account on each call to Render.

Defaults to null.

Instances

The range of model geometry instances to draw.

[BeginEnd]
public property Instances { get set }
type RangeI
value The instance range (see SetGeometryBuffer).

Remarks:

Will be ignored if model geometry is not instanced.

Mode

The render mode to use.

public property Mode { get set }
type ModelRendererMode
value The render mode.

Remarks:

The configured render mode is only honored when Begin is called, and is retained afterwards.

Defaults to Default.

Origin

The origin point to use for rendering models.

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

Remarks:

The final model-to-world transformation matrix is translated so that the origin point in world-space moves to Zero.

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

Defaults to Zero

Pose

The model pose container that is used for rendering.

public property Pose { get set }
type ModelPose
value [not-null] The model pose container.

StateCamera

The shader effect camera state.

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

StateLighting

The shader effect lighting state.

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

StateShadow

The shader effect shadow-mapping state.

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

StateWind

The shader effect wind state.

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

Statistics

Returns statistics for the current Begin/End cycle.

public property Statistics { get }
type ModelRendererStats
value The statistics.

See also:

StatisticsClear

Unit

The unit of measure of world-space coordinates.

public property Unit { get set }
type UnitOfMeasure
value The world-space unit. If null, Metre will be used.

Remarks:

The world-space and model-space units (see Unit) are used to compute a proper scaling factor

Defaults to Metre.

WindTime

public property WindTime { get set }
type float32
value

Public / Constructors

ModelRenderer

Creates a new instance of ModelRenderer.

public constructor ModelRenderer (Graphics graphics)
params graphics [not-null] The graphics object to use.

Public / Methods

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

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

FlushQueueOpaque

Flushes the render queue that contains opaque geometry.

[BeginEnd]
public method FlushQueueOpaque ()

FlushQueues

Flushes the render queues.

[BeginEnd]
public method FlushQueues ()

FlushQueueTransparent

Flushes the render queue that contains transparent geometry.

[BeginEnd]
public method FlushQueueTransparent ()

FlushState

Flushes the remembered render state.

[BeginEnd]
public method FlushState ()

Remarks:

Call this method when the render state has been modified outside of the scope of this ModelRenderer object. The render state will then be restored the next time a render queue is flushed.

Render

Renders the given 3D model.

[BeginEnd]
public method Render (IModel model)
params model The 3D model to render or null.

Remarks:

The following properties are used for rendering the model:

The top-most transformation matrix (see TransformPush) is used to tr

StatisticsClear

Clears the current statistic values.

public method StatisticsClear ()

See also:

Statistics

TransformPop

[BeginEnd]
public method TransformPop ()

TransformPush

[BeginEnd]
public method TransformPush (Mat4D transform)
params transform