![]() |
libsxbp
v0.27
Experimental generation of 2D spiralling lines based on input binary data.
|
This compilation unit provides functions for plotting and caching the points which make up the lines of a spiral. More...

Go to the source code of this file.
Functions | |
| size_t | sxbp_sum_lines (sxbp_spiral_t spiral, size_t start, size_t end) |
| Calculates the sum of all line lengths in this spiral within the given start and end indexes. More... | |
| sxbp_status_t | sxbp_spiral_points (sxbp_spiral_t spiral, sxbp_co_ord_array_t *output, sxbp_co_ord_t start_point, size_t start, size_t end) |
| Calculates a series of co-ords for which trace a given part of a spiral line. More... | |
| sxbp_status_t | sxbp_cache_spiral_points (sxbp_spiral_t *spiral, size_t limit) |
| Caches any uncached co-ords of the line of a spiral up to a given line index. More... | |
This compilation unit provides functions for plotting and caching the points which make up the lines of a spiral.
| sxbp_status_t sxbp_cache_spiral_points | ( | sxbp_spiral_t * | spiral, |
| size_t | limit | ||
| ) |
Caches any uncached co-ords of the line of a spiral up to a given line index.
If there are any outstanding co-ordinates which haven't been stored in the spiral's internal cache, then these will be calculated and stored in the cache. Subsequent identical calls will not incur the overhead of re-calculating these co-ords, provided the lengths of any of the spiral's lines are not changed in the process.
| [in,out] | spiral | The spiral for which co-ords should be cached. |
| limit | The highest index of line for which co-ords should be cached to. |
| sxbp_status_t sxbp_spiral_points | ( | sxbp_spiral_t | spiral, |
| sxbp_co_ord_array_t * | output, | ||
| sxbp_co_ord_t | start_point, | ||
| size_t | start, | ||
| size_t | end | ||
| ) |
Calculates a series of co-ords for which trace a given part of a spiral line.
The whole spiral may be calculated, or just a given segment of it. This is controlled by specifying which line to start at and which to end at.
| spiral | The spiral for which line co-ords should be calculated. | |
| [out] | output | The co-ords array which calculated co-ords should be written to. |
| start_point | The x/y co-ordinates at which the line being plotted originates at. | |
| start | The index of the first line which makes up the segment which is being calculated. | |
| end | The index of the line after the last line which makes up the segment which is being calculated. |
| size_t sxbp_sum_lines | ( | sxbp_spiral_t | spiral, |
| size_t | start, | ||
| size_t | end | ||
| ) |
Calculates the sum of all line lengths in this spiral within the given start and end indexes.
params start and end specify the range of line indexes to use for the lines which are to be summed. These are inclusive of the lower bound but exclusive of the upper bound.
| spiral | The spiral of which line lengths should be summed. |
| start | The index of the first line to include in those of which lengths should be summed. |
| end | The index of the line after the last line to include in those of which lengths should be summed. |
1.8.11