TerrainModelFlags

Description

[Flags]
enum Tinman.Engine.Components.TerrainModelFlags

Enumeration of 3D model flags.

These flags control visual aspects of a 3D model:

These flags control the model behaviour in the scene:

See also

TerrainModel

Public / Constants

None

public constant None → (0:int32)

No flags.

Render

public constant Render → (1:int32)

The 3D model will be visible in the 3D scene.

This flag controls whether or not the model will be rendered into the framebuffer.

ShadowCaster

public constant ShadowCaster → (2:int32)

The 3D model will cast a shadow.

This flag controls whether or not the model will be rendered into the shadow maps.

ShadowReceiver

public constant ShadowReceiver → (4:int32)

The 3D model will receive shadows.

This flag controls whether or not shadow mapping will be active when rendering the model.

Query

public constant Query → (8:int32)

The 3D model will be included in spatial queries.

Culling

public constant Culling → (16:int32)

Perform visibility culling for the model?

Visibility culling uses the IModel.Collider object, which must be recreated each time the structure or geometry of a 3D model has changed. If a model is updated frequently, this flag can be used to avoid unnecessary computations.

Wireframe

public constant Wireframe → (32:int32)

Render the model in wireframe mode?

ExpandZRange

public constant ExpandZRange → (64:int32)

Use the bounding sphere of the model to expand the Z-range that is used for rendering?

By default, the Z-range for rendering is calculated automatically, based on the distance between the camera and the visible horizon of the terrain. When this flag is present, the Z-range is extended (if necessary) so that it fully contains the bounding sphere of the model.

Since the renderer uses logarithmic Z-buffering, expanding the Z-range extensively is not a problem (e.g. to make it contain the Moon at realistic distance to the Earth).

Shadowing should be disabled when this flag is set, i.e. neither ShadowCaster nor ShadowReceiver should be set. For largely expanded Z-ranges, shadow mapping quality will be reduced significantly.

LightingAlways

public constant LightingAlways → (128:int32)

Forces lighting to be enabled when rendering this model.

By default, lighting is enabled if any of the terrain layers has lighting enabled.

LightingNever

public constant LightingNever → (256:int32)

Forces lighting to be disabled when rendering this model.

By default, lighting is enabled if any of the terrain layers has lighting enabled.

All

public constant All → (511:int32)

All flags.