MeshTopology
EnumMesh topology types used by MeshBuilder.
- Available on all platforms
Index
Enumeration Members
Example
// Constructs a new mesh builder
var builder = new MeshBuilder([
{ name: "position", components: 3 },
{ name: "normal", components: 3, normalized: true },
{ name: "texture0", components: 2 },
{ name: "color", components: 4 },
]);
builder.topology = MeshTopology.Triangles;
builder.indexType = MeshIndexType.UInt16;
Enumeration Members
Lines
Lines:
number
Draws unconnected line segments. Each group of two vertices specifies a new line segment.
LineStrip
LineStrip:
number
Draws connected line segments. Starting with the second vertex, a line is drawn between each vertex and the preceding one.
Points
Points:
number
Draws individual points. Each vertex specifies a new point to draw.
TriangleFan
TriangleFan:
number
Draws connected triangles sharing one central vertex. The first vertex is the shared one, or "hub" vertex. Starting with the third vertex, each vertex forms a triangle connecting with the previous vertex and hub vertex.
Triangles
Triangles:
number
Draws unconnected triangles. Each group of three vertices specifies a new triangle.
TriangleStrip
TriangleStrip:
number
Draws connected triangles in a strip. After the first two vertices, each vertex defines the third point on a new triangle extending from the previous one.