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

interface IModelGeometrySimple in Tinman.Engine.Models

interface IModelGeometrySimple extends IModelGeometry

Attributes

IndexCount

The vertex index count.

property IndexCount { get }
type int32
value [>=0] The vertex index count. Will be 0 iff ReadIndices returns null.
inherited IModelGeometry.IndexCount

InstanceBuffer

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

property InstanceBuffer { get }
type IResourceHandle
value The instance buffer to use for geometry instancing or null if geometry instancing is disabled for this model geometry object.
inherited IModelGeometry.InstanceBuffer

Lines

The primitive batch that represents the edge lines.

property Lines { get }
type PrimitiveBatch
value The batch.

MemoryConsumption

Returns the estimated memory consumption of this object.

property MemoryConsumption { get }
type int64
value [>=0] The estimated memory consumption, in bytes.
inherited IMemoryConsumption.MemoryConsumption

Triangles

The primitive batch that represents the surface triangles.

property Triangles { get }
type PrimitiveBatch
value The batch.

VertexCount

The vertex count.

property VertexCount { get }
type int32
value [>0] The vertex count.
inherited IModelGeometry.VertexCount

VertexFormat

The vertex format flags.

property VertexFormat { get }
type ModelVertexFormat
value The format flags.
inherited IModelGeometry.VertexFormat

Extensions

ToModel

Creates a simple IModel from this geometry.

method ToModel (Model model, int32 faces = 0, int64 colorEdges = -1, int64 colorTriangles = 0x7FFFFFFFFFFFFFFF)
type Model
params model [not-null] The parent model that will get additional child models based on this geometry.
  faces > 0 : show only front-facing triangles
= 0 : show both front- and back-facing triangles
< 0 : show only back-facing triangles
Defaults to 0.
  colorEdges The color to use for edges. Defaults to White.
  colorTriangles The color to use for triangles. Defaults to semi-transparent White.
returns [not-null] The resulting model.

Creates a simple IModel from this geometry.

method ToModel (int32 faces = 0, bool lighting = false, int64 colorEdges = -1, int64 colorTriangles = 0x7FFFFFFFFFFFFFFF)
type Model
params faces > 0 : show only front-facing triangles
= 0 : show both front- and back-facing triangles
< 0 : show only back-facing triangles
Defaults to 0.
  lighting Enable lighting (see Lighting)? Defaults to false.
  colorEdges The color to use for edges. Defaults to White.
  colorTriangles The color to use for triangles. Defaults to semi-transparent White.
returns [not-null] The resulting model.

Methods

CreateResource

Creates a new resource object, using the given graphics context.

[OwnerReturn]
method CreateResource (Graphics graphics)
type IResource
params graphics [not-null] The graphics context to use.
returns [not-null] The resource object.
inherited IResourceHandle.CreateResource

Remarks:

Resource objects may implement the IMemoryConsumption interface. In this case, the reported memory consumption will be interpreted as an estimate on how much GPU memory is consumed by the resource. This estimate can then be used for resource caching (e.g. CacheMemory).

Exceptions:

Dynamic

Makes this model geometry dynamic.

method Dynamic ()
type IModelGeometryDynamic
returns [not-null] The dynamic model geometry.
inherited IModelGeometry.Dynamic

Remarks:

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

Exceptions:

Equals

Compares this object with the given one.

[Pure]
method Equals (IResourceHandle other)
type bool
params other The object to compare to.
returns true if this object is equal to other, false if not.
inherited IEquatable.Equals

Instanced

Configures geometry instancing for this model geometry.

method Instanced (IResourceHandle instanceBuffer)
type IModelGeometry
params instanceBuffer 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 value will be returned by the IModelGeometry property of the returned model geometry object.
returns [not-null] The resulting model geometry.
inherited IModelGeometry.Instanced

See also:

IModelGeometry

Optimized

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

method Optimized ()
type IModelGeometry
returns [not-null] The optimized geometry, without instancing. Will be this if ReadIndices return null.
inherited IModelGeometry.Optimized

ReadIndices

Read vertex index data.

method ReadIndices ()
type int32[]
returns The vertex index data or null iff IndexCount returns 0 (i.e. the geometry is not indexed).
inherited IModelGeometry.ReadIndices

Exceptions:

ReadVertices

Reads vertex data.

method ReadVertices ()
type VertexArrays
returns [not-null] The vertex data array.
inherited IModelGeometry.ReadVertices

Exceptions:

Reduced

Reduce the floating-point precision for this model geometry?

method Reduced (bool reduced)
type IModelGeometry
params reduced Use 32-bit floating-point precision (true) or 64-bit floating-point precision ( false)?
returns [not-null] The reduced geometry.
inherited IModelGeometry.Reduced

Remarks:

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

Transform

Transforms the model geometry using the given matrix.

method Transform (Mat4D matrix)
type IModelGeometry
params matrix The transformation matrix.
returns [not-null] The transformed geometry.
inherited IModelGeometry.Transform