ModelPart

Description

sealed class Tinman.Engine.Models.ModelPart

Derived from

IModelPart

Default implementation of the IModelPart interface.

Public / Constructors

Chunk


public static method Chunk → (2)

chunk in : MeshChunk

[not-null]
The terrain mesh chunk.

local opt : bool = true

Output the model part vertices in the local coordinate system of the mesh chunk (see MeshChunk.Matrix), instead of the terrain coordinate system?

returns → ModelPart

The 3D model part.

Creates a 3D model part for the given terrain mesh chunk.

If present, layer textures of the model chunk will be mapped as follows:

Model​Part

3 overloads


public constructor ModelPart1 → ()

Creates a new instance of ModelPart.


public constructor ModelPart2 → (1)

other in : IModelPart

[not-null]
The other IModelPart to copy from.

Creates a new instance of ModelPart.


public constructor ModelPart3 → (5)

geometry in : IModelGeometry

Initial value for Geometry.

batch in : PrimitiveBatch

Initial value for Batch.

material opt : IMaterial = null

Initial value for Material.

flags opt : ModelPartFlags = ModelPartFlags.FrontFaces

Initial value for Flags.

layer opt : int32 = 0

Initial value for Layer.

Creates a new instance of ModelPart.

Public / Attributes

Batch


public attribute Batch → (get,set)

value : PrimitiveBatch

The primitive batch or PrimitiveBatch.None.

The primitive batch of this model in the geometry buffer.

Defaults to PrimitiveBatch.None.

Flags


public attribute Flags → (get,set)

value : ModelPartFlags

The model part flags.

The behaviour flags of this model part.

Defaults to ModelPartFlags.None.

Geometry


public attribute Geometry → (get,set)

value : IModelGeometry

The geometry of the model part or null if none.

The geometry of this model.

IModelGeometry objects may be shared between model parts.

Defaults to null.

See also

IModelPart.Batch

Layer


public attribute Layer → (get,set)

value : int32

The surface layer offset, will be clamped to [-500..500].

The surface layer offset of this model part.

To avoid Z-fighting of coplanar surfaces, layer offsets may be used to decrease the depth value of samples during rendering.

Defaults to 0.

Material


public attribute Material → (get,set)

value : IMaterial

The material or null if none.

The material of this model.

IModelGeometry objects may be shared between model parts.

If null, a material with default values will be used for rendering.

Defaults to null.