IModelGeometrySimple

Description

interface Tinman.Engine.Models.IModelGeometrySimple

Derived from

IModelGeometry

Base interface for IModelGeometry classes that contain simple line and/or triangle geometry that can be described with a single PrimitiveBatch, each.

Public / Attributes

Lines


public attribute Lines → (get)

value : PrimitiveBatch

The batch.

The primitive batch that represents the edge lines.

Triangles


public attribute Triangles → (get)

value : PrimitiveBatch

The batch.

The primitive batch that represents the surface triangles.

Extensions

To​Model

3 overloads


public static method ToModel1 → (6)

model in : Model

[not-null]
The model that will get additional model parts based on this geometry (see remarks).

materialEdges in : IMaterial

The material to use for edges.

materialTriangles in : IMaterial

The material to use for triangles.

faces opt : int32 = 0

> 0 : show only front-facing triangles
= 0 : show both front- and back-facing triangles
< 0 : show only back-facing triangles

lighting opt : bool = true

Enable lighting for the triangle model part, i.e. do not use the ModelPartFlags.NoLighting flag?

layer opt : int32 = 0

The surface layer (see IModelPart.Layer). If both model parts are added, the layer for the line part will be incremented by one.

returns → Model

The resulting model.

Creates a simple IModel from this geometry.

The given model in will get up to two additional model parts:

  1. Triangles:
    If materialTriangles in is not null and this geometry has at least one triangle.

  2. Lines:
    If materialEdges in is not null and this geometry has at least one line.


public static method ToModel2 → (7)

model in : Model

[not-null]
The model that will get additional model parts based on this geometry (see remarks).

faces opt : int32 = 0

> 0 : show only front-facing triangles
= 0 : show both front- and back-facing triangles
< 0 : show only back-facing triangles

lighting opt : bool = true

Enable lighting for the triangle model part, i.e. do not use the ModelPartFlags.NoLighting flag?

colorEdges opt : int64 = Colors.White

The color to use for edges. If fully transparent, no model part will be generated for edges.

colorTriangles opt : int64 = Colors.Opaque50

The color to use for triangles. If fully transparent, no model part will be generated for triangles.

lineThickness opt : float32 = 1

The line thickness (see IMaterial.LineThickness).

layer opt : int32 = 0

The surface layer (see IModelPart.Layer). If both model parts are added, the layer for the line part will be incremented by one.

returns → Model

The resulting model.

Creates a simple IModel from this geometry.

This method creates a new instance(s) of Material and then delegates to ToModel1. See Material.Uniform1.


public static method ToModel3 → (7)

faces opt : int32 = 0

> 0 : show only front-facing triangles
= 0 : show both front- and back-facing triangles
< 0 : show only back-facing triangles

lighting opt : bool = false

Enable lighting for the triangle model part, i.e. do not use the ModelPartFlags.NoLighting flag?

colorEdges opt : int64 = Colors.White

The color to use for edges. If fully transparent, no model part will be generated for edges.

colorTriangles opt : int64 = Colors.Opaque50

The color to use for triangles. If fully transparent, no model part will be generated for triangles.

lineThickness opt : float32 = 1

The line thickness (see IMaterial.LineThickness).

layer opt : int32 = 0

The surface layer (see IModelPart.Layer).

name opt : string = null

The model name, see IModel.Name.

returns → Model

The resulting model.

Creates a simple IModel from this geometry.

This method creates a new instance of Model and then delegates to ToModel2.