IModelGeometry

Description

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

Dynamic


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.

IOException

If an I/O exception has occurred.

Instanced


public method Instanced → (1)

instanceBuffer in : IResourceHandle

The resource handle that returns an 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.

Optimized


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.

ReadIndices


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.

IOException

If an I/O exception has occurred.

ReadVertices


public method ReadVertices → ()

returns → VertexArrays

The vertex data array.

Reads vertex data.

IOException

If an I/O exception has occurred.

Reduced


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 artifacts during rendering.

Transform


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

IndexCount


public attribute IndexCount → (get)

value : int32

[>=0]
The vertex index count. Will be 0 iff ReadIndices returns null.

The vertex index count.

InstanceBuffer


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 an IGeometryBuffer object that holds instance data to use for this model geometry object.

VertexCount


public attribute VertexCount → (get)

value : int32

[>0]
The vertex count.

The vertex count.

VertexFormat


public attribute VertexFormat → (get)

value : ModelVertexFormat

The format flags.

The vertex format flags.