TriangleMeshBuilder
A class that provides a simple Domain Specific Language to construct and deform triangle-based 3D meshes.
Types
Functions
Generate a box of size width, height and depth. Specify the number of segments with widthSegments, heightSegments and depthSegments. Use flipNormals for an inside-out shape.
Generate dodecahedron mesh
Deforms the vertices written so far into volume, by their places in the basis box: the CPU form of org.openrndr.extra.shapes.bezierpatches.bezierVolumeShadeStyle, and the counterpart of org.openrndr.extra.shapes.distort.envelope for meshes. Positions go to the point of the volume at their u, v, w in the box, normals are mapped by the inverse transpose of the Jacobian of that mapping and normalized, so lighting follows the deformed surface. Triangles keep their vertices, so a mesh needs enough of them to bend smoothly.
Extrudes a Shape from its triangulations
Extrudes a Shape
Extrudes a list of Shape
Create a 2D grid of width x height 3D elements. The builder function will get called with the u and v coordinates of each grid cell, so you have an opportunity to add meshes to the scene using those coordinates. The coordinate values will be scaled according to coordinates. Use:
Create a 3D grid of width x height x depth 3D elements. The builder function will get called with the u, v and w coordinates of each grid cell, so you have an opportunity to add meshes to the scene using those coordinates. The coordinate values will be scaled according to coordinates. Use:
Creates a group. Can be used to avoid leaking mesh properties like color and transform into any following meshes or groups.
Add a hemisphere
Writes the triangles of loft: its side on a grid of along steps along the path and around steps around the cross-section, and with caps its ends, when it has them: a closed cross-section along a path that is not closed makes a closed solid. Normals point out of the loft, triangles are wound counterclockwise seen from outside. Texture coordinates are (u, v) on the side, and the bounds of the cross-section on the caps. With sharpCorners the corners of the cross-section, its Loft.corners, are sharp edges; see Loft.side.
Writes the part of patch inside clip's shape: the surface, or with a thickness a solid between the surface and its offset along the normal, see PatchClip.vertices. Make the PatchClip once and write it again for a patch that changes.
Generate plane centered at center, using the right, forward and up vectors for its orientation. width and height specify the dimensions of the plane. widthSegments and heightSegments control the plane's number of segments.
Pop the active transform matrix from the transform state stack.
Push the active transform matrix on the transform state stack.
Generate a tapered cylinder along the z-axis
Returns a MPPBuffer representation of data used for rendering.
Twists a 3D mesh around an axis that starts at Vector3.ZERO and ends at axis. degreesPerUnit controls the twist amount. start is currently unused.