Line3.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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">A geometric line segment represented by a start and end point.</div>
  13. <h2>Constructor</h2>
  14. <h3>[name]( [page:Vector3 start], [page:Vector3 end] )</h3>
  15. <div>
  16. start -- [page:Vector3] Start of the line segment<br />
  17. end -- [page:Vector3] End of the line segment
  18. </div>
  19. <div>
  20. The start and end vectors default to origin vectors if none are set.
  21. </div>
  22. <h2>Properties</h2>
  23. <h3>[property:Vector3 start]</h3>
  24. <h3>[property:Vector3 end]</h3>
  25. <h2>Methods</h2>
  26. <h3>[method:Line3 set]( [page:Vector3 start], [page:Vector3 end] )</h3>
  27. <div>
  28. start -- [page:Vector3] <br />
  29. end -- [page:Vector3]
  30. </div>
  31. <div>
  32. Sets the start and end values by copying the provided vectors.
  33. </div>
  34. <h3>[method:Line3 copy]( [page:Line3 line] )</h3>
  35. <div>
  36. line -- [page:Line3]
  37. </div>
  38. <div>
  39. Copies the passed line's start and end vectors to this line.
  40. </div>
  41. <h3>[method:Line3 clone]()</h3>
  42. <div>
  43. Return a new copy of this [page:Line3].
  44. </div>
  45. <h3>[method:Boolean equals]( [page:Line3 line] )</h3>
  46. <div>
  47. line -- [page:Line3]
  48. </div>
  49. <div>
  50. Returns true if both line's start and end points are equal.
  51. </div>
  52. <h3>[method:Float distance]()</h3>
  53. <div>
  54. Returns the length of the line segment.
  55. </div>
  56. <h3>[method:Float distanceSq]()</h3>
  57. <div>
  58. Returns the line segment's length squared.
  59. </div>
  60. <h3>[method:Line3 applyMatrix4]( [page:Matrix4 matrix] ) [page:Line3 this]</h3>
  61. <div>
  62. matrix -- [page:Matrix4]
  63. </div>
  64. <div>
  65. Apply a matrix transform to the line segment.
  66. </div>
  67. <h3>[method:Vector3 at]( [page:Float t], [page:Vector3 optionalTarget] )</h3>
  68. <div>
  69. t -- [page:Float] Use values 0-1 to return a result on the line segment. <br />
  70. optionalTarget -- [page:Vector] Optional target to set the result.
  71. </div>
  72. <div>
  73. Return a vector at a certain position along the line. When t = 0, it returns the start vector, and when t=1 it returns the end vector.
  74. </div>
  75. <h3>[method:Vector3 getCenter]( [page:Vector3 optionalTarget] )</h3>
  76. <div>
  77. optionalTarget -- [page:Vector3] Optional target to set the result.
  78. </div>
  79. <div>
  80. Return the center of the line segment.
  81. </div>
  82. <h3>[method:Vector3 delta]( [page:Vector3 optionalTarget] )</h3>
  83. <div>
  84. optionalTarget -- [page:Vector3] Optional target to set the result.
  85. </div>
  86. <div>
  87. Returns the delta vector of the line segment, or the end vector minus the start vector.
  88. </div>
  89. <h3>[method:Vector3 closestPointToPoint]( [page:Vector3 point], [page:Boolean clampToLine], [page:Vector3 optionalTarget] )</h3>
  90. <div>
  91. point -- [page:Vector3] <br />
  92. clampToLine -- [page:Boolean] <br />
  93. optionalTarget -- [page:Vector3] Optional target to set the result.
  94. </div>
  95. <div>
  96. Returns the closets point on the line. If clamp to line is true, then the returned value will be clamped to the line segment.
  97. </div>
  98. <h3>[method:Float closestPointToPointParameter]( [page:Vector3 point], [page:Boolean clampToLine] )</h3>
  99. <div>
  100. point -- [page:Vector3] <br />
  101. clampToLine -- [page:Boolean]
  102. </div>
  103. <div>
  104. Returns a point parameter based on the closest point as projected on the line segement. If clamp to line is true, then the returned value will be between 0 and 1.
  105. </div>
  106. <h2>Source</h2>
  107. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  108. </body>
  109. </html>