ModelGeometryBuilder
Description
Helper class for generating content for IModelGeometry objects.
Public / Methods
Append
Remembers the current values of CountVertices and CountIndices, in order to resolve subsequently added vertices and indices.
The remembered vertex count is added to each vertex index value that is added by any of the primitive building methods:
The remembered vertex resp. index count is added to PrimitiveBatch.First by the Batch method.
BuildSimple
2 overloads
Builds a simple model geometry from the content of this builder.
The IModelGeometrySimple.Triangles batch will be an indexed Primitive.TriangleList, using vertices in the range [0..triangles[.
The IModelGeometrySimple.Lines batch will be an indexed Primitive.LineList, using vertices in the range [triangles..CountIndices[.
Builds simple model geometry from the content of this builder, using the given primitive batches for triangles and/or lines.
- See also
LineSegment
Adds the given vertex indices, usually to create a single primitive of a Primitive.LineList.
Vertex indices are added in this sequence:
(a in, b in)
- See also
Point
Adds the given vertex index, usually to create a single primitive of a Primitive.PointList.
Vertex indices are added in this sequence:
(a in)
- See also
Quad
Adds the given vertex indices, usually to create two primitives of a Primitive.TriangleList, that forms a single quadrilateral.
The resulting quadrilateral has the following structure:
(a)---(b) | \ 1.| a,b,c,d = quadrilateral vertices | \ | |2. \ | 1,2 = 1st resp. 2nd triangle (d)---(c)
Vertex indices are added in this sequence:
(a in, b in, c in, a in, c in, d in)
- See also
Triangle
Adds the given vertex indices, usually to create a single primitive of a Primitive.TriangleList.
Vertex indices are added in this sequence:
(a in, b in, c in)
- See also
Public / Attributes
CountIndices
Returns the number of vertex indices that have been written since the last call to Append.