Curve.html 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. <h1>[name]</h1>
  12. <div class="desc">
  13. An abstract base class for creating a [name] object that contains methods for interpolation.
  14. For an array of [name]s see [page:CurvePath].
  15. </div>
  16. <h2>Constructor</h2>
  17. <h3>[name]()</h3>
  18. <div>
  19. This constructor creates a new [name].
  20. </div>
  21. <h2>Properties</h2>
  22. <h3>[property:Integer arcLengthDivisions]</h3>
  23. <div>This value determines the amount of divisions when calculating the cumulative segment lengths of a curve via [page:.getLengths].
  24. To ensure precision when using methods like [page:.getSpacedPoints], it is recommended to increase [page:.arcLengthDivisions] if the curve is very large. Default is 200.</div>
  25. <h2>Methods</h2>
  26. <h3>[method:Vector getPoint]( [page:Float t] )</h3>
  27. <div>Returns a vector for point t of the curve where t is between 0 and 1. Must be implemented in the extending curve.</div>
  28. <h3>[method:Vector getPointAt]( [page:Float u] )</h3>
  29. <div>
  30. Returns a vector for point at a relative position in curve according to arc length.
  31. u is in the range [0, 1].
  32. </div>
  33. <h3>[method:Array getPoints]( [page:Integer divisions] )</h3>
  34. <div>
  35. divisions -- number of pieces to divide the curve into. Default is *5*.<br /><br />
  36. Returns a set of divisions + 1 points using getPoint( t ).
  37. </div>
  38. <h3>[method:Array getSpacedPoints]( [page:Integer divisions] )</h3>
  39. <div>
  40. divisions -- number of pieces to divide the curve into. Default is *5*.<br /><br />
  41. Returns a set of divisions + 1 equi-spaced points using getPointAt( u ).
  42. </div>
  43. <h3>[method:Float getLength]()</h3>
  44. <div>Get total curve arc length.</div>
  45. <h3>[method:Array getLengths]( [page:Integer divisions] )</h3>
  46. <div>Get list of cumulative segment lengths.</div>
  47. <h3>[method:null updateArcLengths]()</h3>
  48. <div>Update the cumlative segment distance cache.</div>
  49. <h3>[method:Float getUtoTmapping]( [page:Float u], [page:Float distance] )</h3>
  50. <div>
  51. Given u in the range ( 0 .. 1 ), returns [page:Float t] also in the range ( 0 .. 1 ).
  52. u and t can then be used to give you points which are equidistant from the ends of the curve,
  53. using [page:.getPoint].
  54. </div>
  55. <h3>[method:Vector getTangent]( [page:Float t] )</h3>
  56. <div>
  57. Returns a unit vector tangent at t. If the derived curve does not implement its
  58. tangent derivation, two points a small delta apart will be used to find its gradient
  59. which seems to give a reasonable approximation.
  60. </div>
  61. <h3>[method:Vector getTangentAt]( [page:Float u] )</h3>
  62. <div>
  63. Returns tangent at a point which is equidistant to the ends of the curve from the
  64. point given in [page:.getTangent].
  65. </div>
  66. <h3>[method:Object computeFrenetFrames]( [page:Integer segments], [page:Boolean closed] )</h3>
  67. <div>
  68. Generates the Frenet Frames. Used in geometries like [page:TubeGeometry] or [page:ExtrudeGeometry].
  69. </div>
  70. <h2>Source</h2>
  71. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  72. </body>
  73. </html>