interface Tinman.Engine.Models.IModelGeometry

Base interface for classes that represent geometry (vertices and indices) for 3D models.

IModelGeometry objects act as resource handles and produce ModelGeometryBuffer resource objects.

Public / Methods


public method Dynamic → ()

returns → IModelGeometryDynamic

The dynamic model geometry.

Makes this model geometry dynamic.

If necessary, a new model geometry is created by copying index and vertex data from this model geometry.


If an I/O exception has occurred.


public method Instanced → (1)

instanceBuffer in : IResourceHandle

The resource handle that returns a IVertexBuffer object that holds instance data to use for this model geometry object or null to disable geometry instancing. The instanceBuffer in value will be returned by the InstanceBuffer property of the returned model geometry object.

returns → IModelGeometry

The resulting model geometry.

Configures geometry instancing for this model geometry.


public method Optimized → ()

returns → IModelGeometry

The optimized geometry, without instancing. Will be this if ReadIndices return null.

Optimizes this model geometry by reordering those vertices that are actually referenced by the index data.


public method ReadIndices → ()

returns → int32 [ ]

The vertex index data or null iff IndexCount returns 0 (i.e. the geometry is not indexed).

Read vertex index data.


If an I/O exception has occurred.


public method ReadVertices → ()

returns → VertexArrays

The vertex data array.

Reads vertex data.


If an I/O exception has occurred.


public method Reduced → (1)

reduced in : bool

Use 32-bit floating-point precision (true) or 64-bit floating-point precision ( false)?

returns → IModelGeometry

The reduced geometry.

Reduce the floating-point precision for this model geometry?

Using reduced precision will consume less memory resp. storage space, but might introduce jitter artefacts during rendering.


public method Transform → (1)

matrix in : Mat4D

The transformation matrix.

returns → IModelGeometry

The transformed geometry.

Transforms the model geometry using the given matrix.

Public / Attributes


public attribute IndexCount → (get)

value : int32

The vertex index count. Will be 0 iff ReadIndices returns null.

The vertex index count.


public attribute InstanceBuffer → (get)

value : IResourceHandle

The instance buffer to use for geometry instancing or null if geometry instancing is disabled for this model geometry object.

The resource handle that returns a IGeometryBuffer object that holds instance data to use for this model geometry object.


public attribute VertexCount → (get)

value : int32

The vertex count.

The vertex count.


public attribute VertexFormat → (get)

value : ModelVertexFormat

The format flags.

The vertex format flags.