|
Blender V4.3
|
Go to the source code of this file.
Macros | |
| #define | BLI_POLYFILL_ARENA_SIZE MEM_SIZE_OPTIMAL(1 << 14) |
Functions | |
| void | BLI_polyfill_calc_arena (const float(*coords)[2], unsigned int coords_num, int coords_sign, unsigned int(*r_tris)[3], struct MemArena *arena) |
| void | BLI_polyfill_calc (const float(*coords)[2], unsigned int coords_num, int coords_sign, unsigned int(*r_tris)[3]) |
| #define BLI_POLYFILL_ARENA_SIZE MEM_SIZE_OPTIMAL(1 << 14) |
Definition at line 46 of file BLI_polyfill_2d.h.
Referenced by bm_decim_triangulate_begin(), BM_mesh_triangulate(), bmo_connect_verts_concave_exec(), C_BVHTree_FromPolygons(), and test_polyfill_template().
| void BLI_polyfill_calc | ( | const float(*) | coords[2], |
| unsigned int | coords_num, | ||
| int | coords_sign, | ||
| unsigned int(*) | r_tris[3] ) |
Triangulates the given (convex or concave) simple polygon to a list of triangle vertices.
| coords | 2D coordinates describing vertices of the polygon, in either clockwise or counterclockwise order. |
| coords_num | Total points in the array. |
| coords_sign | Pass this when we know the sign in advance to avoid extra calculations. |
| r_tris | This array is filled in with triangle indices in clockwise order. The length of the array must be coords_num - 2. Indices are guaranteed to be assigned to unique triangles, with valid indices, even in the case of degenerate input (self intersecting polygons, zero area ears... etc). |
Definition at line 910 of file polyfill_2d.c.
References BLI_array_alloca, BLI_memarena_free(), BLI_memarena_new(), BLI_polyfill_calc_arena(), pf, polyfill_calc(), polyfill_prepare(), TIMEIT_END, TIMEIT_START, and UNLIKELY.
Referenced by BKE_gpencil_stroke_fill_triangulate(), BKE_mesh_remap_calc_faces_from_mesh(), BM_face_calc_tessellation(), blender::ed::sculpt_paint::trim::generate_geometry(), GPU_batch_tris_from_poly_2d_encoded(), test_polyfill_template(), and ui_draw_but_CURVEPROFILE().
| void BLI_polyfill_calc_arena | ( | const float(*) | coords[2], |
| unsigned int | coords_num, | ||
| int | coords_sign, | ||
| unsigned int(*) | r_tris[3], | ||
| struct MemArena * | arena ) |
A version of BLI_polyfill_calc that uses a memory arena to avoid re-allocations.
Definition at line 865 of file polyfill_2d.c.
References BLI_memarena_alloc(), pf, polyfill_calc(), polyfill_prepare(), TIMEIT_END, and TIMEIT_START.
Referenced by blender::geometry::PackIsland::add_polygon(), BLI_polyfill_calc(), BM_face_triangulate(), bmesh_calc_tessellation_for_face_beauty(), bmesh_calc_tessellation_for_face_impl(), C_BVHTree_FromPolygons(), blender::bke::mesh::mesh_calc_tessellation_for_face_impl(), mesh_tessface_calc(), blender::geometry::p_add_ngon(), blender::bke::greasepencil::update_triangle_cache(), and uv_select_overlap().