Comments: notes on polyfill2d, minor corrections
This commit is contained in:
@@ -121,7 +121,7 @@ static bool test_path(char *targetpath, const char *path_base, const char *path_
|
||||
if (path_sep) BLI_join_dirfile(tmppath, sizeof(tmppath), path_base, path_sep);
|
||||
else BLI_strncpy(tmppath, path_base, sizeof(tmppath));
|
||||
|
||||
/* rare cases folder_name is omitted (when looking for ~/.blender/2.xx dir only) */
|
||||
/* rare cases folder_name is omitted (when looking for ~/.config/blender/2.xx dir only) */
|
||||
if (folder_name)
|
||||
BLI_make_file_string("/", targetpath, tmppath, folder_name);
|
||||
else
|
||||
|
||||
@@ -21,8 +21,15 @@
|
||||
/** \file blender/blenlib/intern/polyfill2d.c
|
||||
* \ingroup bli
|
||||
*
|
||||
* A simple implementation of the ear cutting algorithm
|
||||
* to triangulate simple polygons without holes.
|
||||
* An ear clipping algorithm to triangulate single boundary polygons.
|
||||
*
|
||||
* Details:
|
||||
*
|
||||
* - The algorithm guarantees all triangles are assigned (number of coords - 2)
|
||||
* and that triangles will have non-overlapping indices (even for degenerate geometry).
|
||||
* - Self-intersections are considered degenerate (resulting triangles will overlap).
|
||||
* - While multiple polygons aren't supported, holes can still be defined using *key-holes*
|
||||
* (where the polygon doubles back on its self with *exactly* matching coordinates).
|
||||
*
|
||||
* \note
|
||||
*
|
||||
@@ -74,6 +81,12 @@ typedef signed char eSign;
|
||||
|
||||
#ifdef USE_KDTREE
|
||||
/**
|
||||
* Spatial optimization for point-in-triangle intersection checks.
|
||||
* The simple version of this algorithm is ``O(n^2)`` complexity
|
||||
* (every point needing to check the triangle defined by every other point),
|
||||
* Using a binary-tree reduces the complexity to ``O(n log n)``
|
||||
* plus some overhead of creating the tree.
|
||||
*
|
||||
* This is a single purpose KDTree based on BLI_kdtree with some modifications
|
||||
* to better suit polyfill2d.
|
||||
*
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
* - write #TEST (#RenderInfo struct. 128x128 blend file preview is optional).
|
||||
* - write #GLOB (#FileGlobal struct) (some global vars).
|
||||
* - write #DNA1 (#SDNA struct)
|
||||
* - write #USER (#UserDef struct) if filename is ``~/X.XX/config/startup.blend``.
|
||||
* - write #USER (#UserDef struct) if filename is ``~/.config/blender/X.XX/config/startup.blend``.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user