Curve.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 curve object that contains methods for interpolation.
  14. For an array of Curves see [page:CurvePath].
  15. </div>
  16. <h2>Examples</h2>
  17. <h3>[example:webgl_geometry_extrude_splines geometry / extrude / splines ]</h3>
  18. <h2>Constructor</h2>
  19. <h3>[name]()</h3>
  20. <div>
  21. This constructor creates a new [name].
  22. </div>
  23. <h2>Methods</h2>
  24. <h3>[method:Vector getPoint]( [page:Number t] )</h3>
  25. <div>Returns a vector for point t of the curve where t is between 0 and 1. Must be implemented in the extending class.</div>
  26. <h3>[method:Vector getPointAt]( [page:Number u] )</h3>
  27. <div>
  28. Returns a vector for point at a relative position in curve according to arc length.
  29. u is in the range [0, 1].
  30. </div>
  31. <h3>[method:Array getPoints]( [page:integer divisions] )</h3>
  32. <div>
  33. divisions -- number of pieces to divide the curve into. Default is *5*.<br /><br />
  34. Returns a set of divisions + 1 points using getPoint( t ).
  35. </div>
  36. <h3>[method:Array getSpacedPoints]( divisions )</h3>
  37. <div>
  38. divisions -- number of pieces to divide the curve into. Default is *5*.<br /><br />
  39. Returns a set of divisions + 1 equi-spaced points using getPointAt( u ).
  40. </div>
  41. <h3>[method:Float getLength]()</h3>
  42. <div>Get total curve arc length.</div>
  43. <h3>[method:Array getLengths]( divisions )</h3>
  44. <div>Get list of cumulative segment lengths.</div>
  45. <h3>[method:null updateArcLengths]()</h3>
  46. <div>Update the cumlative segment distance cache.</div>
  47. <h3>[method:Float getUtoTmapping]( [page:Number u], distance )</h3>
  48. <div>
  49. Given u in the range ( 0 .. 1 ), returns [page:Number t] also in the range ( 0 .. 1 ).
  50. u and t can then be used to give you points which are equidistant from the ends of the curve,
  51. using [page:.getPoint].
  52. </div>
  53. <h3>[method:Vector getTangent]( [page:Number t] )</h3>
  54. <div>
  55. Returns a unit vector tangent at t. If the subclassed curve do not implement its
  56. tangent derivation, 2 points a small delta apart will be used to find its gradient
  57. which seems to give a reasonable approximation
  58. </div>
  59. <h3>[method:Vector getTangentAt]( [page:Number u] )</h3>
  60. <div>
  61. Returns tangent at a point which is equidistant to the ends of the curve from the
  62. point given in [page:.getTangent].
  63. </div>
  64. <h3>[method:Object computeFrenetFrames]( segments, closed )</h3>
  65. <div>
  66. Generates the Frenet Frames. Used in geometries like [page:TubeGeometry] or [page:ExtrudeGeometry].
  67. </div>
  68. <h2>Source</h2>
  69. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  70. </body>
  71. </html>