Difference between revisions of "Path2D:getPathPoints"
From GiderosMobile
(Created page with "__NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2018.12<br/> '''<translate>Class</translate>:''' Path2D<br/> === <t...") |
|||
Line 10: | Line 10: | ||
=== <translate>Parameters</translate> === | === <translate>Parameters</translate> === | ||
'''interval''': (number) <translate>distance between each considered point</translate> <br/> | '''interval''': (number) <translate>distance between each considered point</translate> <br/> | ||
− | '''offset''': (number) <translate>distance to first point of interest</translate> <br/> | + | '''offset''': (number) <translate>distance to first point of interest. Defaults to 0.</translate> <translate>'''optional'''</translate> <br/> |
− | '''maxpts''': (number) <translate>maximum number of points to sample</translate> <br/> | + | '''maxpts''': (number) <translate>maximum number of points to sample. Defaults to 1000.</translate> <translate>'''optional'''</translate> <br/> |
− | '''flatness''': (number) <translate>maximum acceptable deviation for real curve</translate> <br/> | + | '''flatness''': (number) <translate>maximum acceptable deviation for real curve. Defaults to 1.</translate> <translate>'''optional'''</translate> <br/> |
− | '''subdiv_limit''': (number) <translate>maximum curve subdivision limit</translate> <br/> | + | '''subdiv_limit''': (number) <translate>maximum curve subdivision limit. Defaults to 10.</translate> <translate>'''optional'''</translate> <br/> |
+ | |||
=== <translate>Return values</translate> === | === <translate>Return values</translate> === | ||
'''<translate>Returns</translate>''' (table) <translate>information about selected points</translate><br/> | '''<translate>Returns</translate>''' (table) <translate>information about selected points</translate><br/> |
Revision as of 11:47, 3 December 2018
Available since: Gideros 2018.12
Class: Path2D
Description
Compute points location along the path. To do so, the path is converted into a series of straight segments and particular points are sampled along it. The resulting table outputs, for each point, its location (x,y) and its tangent orientation (angle)
(table) = Path2D:getPathPoints(interval,offset,maxpts,flatness,subdiv_limit)
Parameters
interval: (number) distance between each considered point
offset: (number) distance to first point of interest. Defaults to 0. optional
maxpts: (number) maximum number of points to sample. Defaults to 1000. optional
flatness: (number) maximum acceptable deviation for real curve. Defaults to 1. optional
subdiv_limit: (number) maximum curve subdivision limit. Defaults to 10. optional
Return values
Returns (table) information about selected points