Module utils

Source
Expand description

Utilities useful for various generations tasks.

Functionsยง

apply_revolution
Applies a revolution, using the Y symmetry axis passing through the origin.
push_arc
Pushes to out a set of points forming an arc starting at start, ending at end with revolution center at center. The curve is approximated by pushing nsubdivs points. The start and end point are not pushed to out.
push_arc_and_idx
Pushes to out_vtx a set of points forming an arc starting at start, ending at end with revolution center at center. The curve is approximated by pushing nsubdivs points. The start and end point are not pushed to out_vtx.
push_arc_idx
Pushes the index buffer for an arc between start and end and intermediate points in the range arc.
push_circle
Pushes a discretized counterclockwise circle to a buffer.
push_circle_outline_indices
Pushes the index buffer of a closed loop.
push_degenerate_open_top_ring_indices
Creates the faces from a circle and a point that is shared by all triangle.
push_degenerate_top_ring_indices
Creates the faces from a circle and a point that is shared by all triangle.
push_filled_circle_indices
Pushes indices so that a circle is filled with triangles. Each triangle will have the base_circle point in common. Pushes nsubdiv - 2 elements to out.
push_open_circle_outline_indices
Pushes the index buffer of an open chain.
push_open_ring_indices
Creates the faces from two circles with the same discretization.
push_rectangle_indices
Given four corner points, pushes to two counterclockwise triangles to out.
push_ring_indices
Creates the faces from two circles with the same discretization.
reverse_clockwising
Reverses the clockwising of a set of faces.
scaled
Returns the transformed version of a vector of points.
transform
Applies in-place a transformation to an array of points.
transformed
Returns the transformed version of a vector of points.