1
0

Ray.html 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Ray - Three.js Docs</title>
  6. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  7. <script src="../scripts/highlight.min.js"></script>
  8. <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
  9. <link type="text/css" rel="stylesheet" href="../styles/page.css">
  10. </head>
  11. <body>
  12. <h1 translate="no">Ray</h1>
  13. <section>
  14. <header>
  15. <div class="class-description"><p>A ray that emits from an origin in a certain direction. The class is used by
  16. <a href="Raycaster.html">Raycaster</a> to assist with raycasting. Raycasting is used for
  17. mouse picking (working out what objects in the 3D space the mouse is over)
  18. amongst other things.</p></div>
  19. </header>
  20. <article>
  21. <div class="container-overview">
  22. <h2>Constructor</h2>
  23. <h3 class="name name-method" id="Ray" translate="no">new <a href="#Ray">Ray</a><span class="signature">( origin : <span class="param-type"><a href="Vector3.html">Vector3</a></span>, direction : <span class="param-type"><a href="Vector3.html">Vector3</a></span> )</span> </h3>
  24. <div class="method">
  25. <div class="description">
  26. <p>Constructs a new ray.</p>
  27. </div>
  28. <table class="params">
  29. <tbody>
  30. <tr>
  31. <td class="name">
  32. <strong>origin</strong>
  33. </td>
  34. <td class="description last">
  35. <p>The origin of the ray.</p>
  36. <p>Default is <code>(0,0,0)</code>.</p>
  37. </td>
  38. </tr>
  39. <tr>
  40. <td class="name">
  41. <strong>direction</strong>
  42. </td>
  43. <td class="description last">
  44. <p>The (normalized) direction of the ray.</p>
  45. <p>Default is <code>(0,0,-1)</code>.</p>
  46. </td>
  47. </tr>
  48. </tbody>
  49. </table>
  50. </div>
  51. </div>
  52. <h2 class="subsection-title">Properties</h2>
  53. <div class="member">
  54. <h3 class="name" id="direction" translate="no">.<a href="#direction">direction</a><span class="type-signature"> : <a href="Vector3.html">Vector3</a></span> </h3>
  55. <div class="description">
  56. <p>The (normalized) direction of the ray.</p>
  57. </div>
  58. </div>
  59. <div class="member">
  60. <h3 class="name" id="origin" translate="no">.<a href="#origin">origin</a><span class="type-signature"> : <a href="Vector3.html">Vector3</a></span> </h3>
  61. <div class="description">
  62. <p>The origin of the ray.</p>
  63. </div>
  64. </div>
  65. <h2 class="subsection-title">Methods</h2>
  66. <h3 class="name name-method" id="applyMatrix4" translate="no">.<a href="#applyMatrix4">applyMatrix4</a><span class="signature">( matrix4 : <span class="param-type"><a href="Matrix4.html">Matrix4</a></span> )</span><span class="type-signature"> : <a href="Ray.html">Ray</a></span> </h3>
  67. <div class="method">
  68. <div class="description">
  69. <p>Transforms this ray with the given 4x4 transformation matrix.</p>
  70. </div>
  71. <table class="params">
  72. <tbody>
  73. <tr>
  74. <td class="name">
  75. <strong>matrix4</strong>
  76. </td>
  77. <td class="description last">
  78. <p>The transformation matrix.</p>
  79. </td>
  80. </tr>
  81. </tbody>
  82. </table>
  83. <dl class="details">
  84. <dt class="tag-returns"><strong>Returns:</strong> A reference to this ray.</dt>
  85. </dl>
  86. </div>
  87. <h3 class="name name-method" id="at" translate="no">.<a href="#at">at</a><span class="signature">( t : <span class="param-type">number</span>, target : <span class="param-type"><a href="Vector3.html">Vector3</a></span> )</span><span class="type-signature"> : <a href="Vector3.html">Vector3</a></span> </h3>
  88. <div class="method">
  89. <div class="description">
  90. <p>Returns a vector that is located at a given distance along this ray.</p>
  91. </div>
  92. <table class="params">
  93. <tbody>
  94. <tr>
  95. <td class="name">
  96. <strong>t</strong>
  97. </td>
  98. <td class="description last">
  99. <p>The distance along the ray to retrieve a position for.</p>
  100. </td>
  101. </tr>
  102. <tr>
  103. <td class="name">
  104. <strong>target</strong>
  105. </td>
  106. <td class="description last">
  107. <p>The target vector that is used to store the method's result.</p>
  108. </td>
  109. </tr>
  110. </tbody>
  111. </table>
  112. <dl class="details">
  113. <dt class="tag-returns"><strong>Returns:</strong> A position on the ray.</dt>
  114. </dl>
  115. </div>
  116. <h3 class="name name-method" id="clone" translate="no">.<a href="#clone">clone</a><span class="signature">()</span><span class="type-signature"> : <a href="Ray.html">Ray</a></span> </h3>
  117. <div class="method">
  118. <div class="description">
  119. <p>Returns a new ray with copied values from this instance.</p>
  120. </div>
  121. <dl class="details">
  122. <dt class="tag-returns"><strong>Returns:</strong> A clone of this instance.</dt>
  123. </dl>
  124. </div>
  125. <h3 class="name name-method" id="closestPointToPoint" translate="no">.<a href="#closestPointToPoint">closestPointToPoint</a><span class="signature">( point : <span class="param-type"><a href="Vector3.html">Vector3</a></span>, target : <span class="param-type"><a href="Vector3.html">Vector3</a></span> )</span><span class="type-signature"> : <a href="Vector3.html">Vector3</a></span> </h3>
  126. <div class="method">
  127. <div class="description">
  128. <p>Returns the point along this ray that is closest to the given point.</p>
  129. </div>
  130. <table class="params">
  131. <tbody>
  132. <tr>
  133. <td class="name">
  134. <strong>point</strong>
  135. </td>
  136. <td class="description last">
  137. <p>A point in 3D space to get the closet location on the ray for.</p>
  138. </td>
  139. </tr>
  140. <tr>
  141. <td class="name">
  142. <strong>target</strong>
  143. </td>
  144. <td class="description last">
  145. <p>The target vector that is used to store the method's result.</p>
  146. </td>
  147. </tr>
  148. </tbody>
  149. </table>
  150. <dl class="details">
  151. <dt class="tag-returns"><strong>Returns:</strong> The closest point on this ray.</dt>
  152. </dl>
  153. </div>
  154. <h3 class="name name-method" id="copy" translate="no">.<a href="#copy">copy</a><span class="signature">( ray : <span class="param-type"><a href="Ray.html">Ray</a></span> )</span><span class="type-signature"> : <a href="Ray.html">Ray</a></span> </h3>
  155. <div class="method">
  156. <div class="description">
  157. <p>Copies the values of the given ray to this instance.</p>
  158. </div>
  159. <table class="params">
  160. <tbody>
  161. <tr>
  162. <td class="name">
  163. <strong>ray</strong>
  164. </td>
  165. <td class="description last">
  166. <p>The ray to copy.</p>
  167. </td>
  168. </tr>
  169. </tbody>
  170. </table>
  171. <dl class="details">
  172. <dt class="tag-returns"><strong>Returns:</strong> A reference to this ray.</dt>
  173. </dl>
  174. </div>
  175. <h3 class="name name-method" id="distanceSqToPoint" translate="no">.<a href="#distanceSqToPoint">distanceSqToPoint</a><span class="signature">( point : <span class="param-type"><a href="Vector3.html">Vector3</a></span> )</span><span class="type-signature"> : number</span> </h3>
  176. <div class="method">
  177. <div class="description">
  178. <p>Returns the squared distance of the closest approach between this ray and the given point.</p>
  179. </div>
  180. <table class="params">
  181. <tbody>
  182. <tr>
  183. <td class="name">
  184. <strong>point</strong>
  185. </td>
  186. <td class="description last">
  187. <p>A point in 3D space to compute the distance to.</p>
  188. </td>
  189. </tr>
  190. </tbody>
  191. </table>
  192. <dl class="details">
  193. <dt class="tag-returns"><strong>Returns:</strong> The squared distance.</dt>
  194. </dl>
  195. </div>
  196. <h3 class="name name-method" id="distanceSqToSegment" translate="no">.<a href="#distanceSqToSegment">distanceSqToSegment</a><span class="signature">( v0 : <span class="param-type"><a href="Vector3.html">Vector3</a></span>, v1 : <span class="param-type"><a href="Vector3.html">Vector3</a></span>, optionalPointOnRay : <span class="param-type"><a href="Vector3.html">Vector3</a></span>, optionalPointOnSegment : <span class="param-type"><a href="Vector3.html">Vector3</a></span> )</span><span class="type-signature"> : number</span> </h3>
  197. <div class="method">
  198. <div class="description">
  199. <p>Returns the squared distance between this ray and the given line segment.</p>
  200. </div>
  201. <table class="params">
  202. <tbody>
  203. <tr>
  204. <td class="name">
  205. <strong>v0</strong>
  206. </td>
  207. <td class="description last">
  208. <p>The start point of the line segment.</p>
  209. </td>
  210. </tr>
  211. <tr>
  212. <td class="name">
  213. <strong>v1</strong>
  214. </td>
  215. <td class="description last">
  216. <p>The end point of the line segment.</p>
  217. </td>
  218. </tr>
  219. <tr>
  220. <td class="name">
  221. <strong>optionalPointOnRay</strong>
  222. </td>
  223. <td class="description last">
  224. <p>When provided, it receives the point on this ray that is closest to the segment.</p>
  225. </td>
  226. </tr>
  227. <tr>
  228. <td class="name">
  229. <strong>optionalPointOnSegment</strong>
  230. </td>
  231. <td class="description last">
  232. <p>When provided, it receives the point on the line segment that is closest to this ray.</p>
  233. </td>
  234. </tr>
  235. </tbody>
  236. </table>
  237. <dl class="details">
  238. <dt class="tag-returns"><strong>Returns:</strong> The squared distance.</dt>
  239. </dl>
  240. </div>
  241. <h3 class="name name-method" id="distanceToPlane" translate="no">.<a href="#distanceToPlane">distanceToPlane</a><span class="signature">( plane : <span class="param-type"><a href="Plane.html">Plane</a></span> )</span><span class="type-signature"> : number</span> </h3>
  242. <div class="method">
  243. <div class="description">
  244. <p>Computes the distance from the ray's origin to the given plane. Returns <code>null</code> if the ray
  245. does not intersect with the plane.</p>
  246. </div>
  247. <table class="params">
  248. <tbody>
  249. <tr>
  250. <td class="name">
  251. <strong>plane</strong>
  252. </td>
  253. <td class="description last">
  254. <p>The plane to compute the distance to.</p>
  255. </td>
  256. </tr>
  257. </tbody>
  258. </table>
  259. <dl class="details">
  260. <dt class="tag-returns"><strong>Returns:</strong> Whether this ray intersects with the given sphere or not.</dt>
  261. </dl>
  262. </div>
  263. <h3 class="name name-method" id="distanceToPoint" translate="no">.<a href="#distanceToPoint">distanceToPoint</a><span class="signature">( point : <span class="param-type"><a href="Vector3.html">Vector3</a></span> )</span><span class="type-signature"> : number</span> </h3>
  264. <div class="method">
  265. <div class="description">
  266. <p>Returns the distance of the closest approach between this ray and the given point.</p>
  267. </div>
  268. <table class="params">
  269. <tbody>
  270. <tr>
  271. <td class="name">
  272. <strong>point</strong>
  273. </td>
  274. <td class="description last">
  275. <p>A point in 3D space to compute the distance to.</p>
  276. </td>
  277. </tr>
  278. </tbody>
  279. </table>
  280. <dl class="details">
  281. <dt class="tag-returns"><strong>Returns:</strong> The distance.</dt>
  282. </dl>
  283. </div>
  284. <h3 class="name name-method" id="equals" translate="no">.<a href="#equals">equals</a><span class="signature">( ray : <span class="param-type"><a href="Ray.html">Ray</a></span> )</span><span class="type-signature"> : boolean</span> </h3>
  285. <div class="method">
  286. <div class="description">
  287. <p>Returns <code>true</code> if this ray is equal with the given one.</p>
  288. </div>
  289. <table class="params">
  290. <tbody>
  291. <tr>
  292. <td class="name">
  293. <strong>ray</strong>
  294. </td>
  295. <td class="description last">
  296. <p>The ray to test for equality.</p>
  297. </td>
  298. </tr>
  299. </tbody>
  300. </table>
  301. <dl class="details">
  302. <dt class="tag-returns"><strong>Returns:</strong> Whether this ray is equal with the given one.</dt>
  303. </dl>
  304. </div>
  305. <h3 class="name name-method" id="intersectBox" translate="no">.<a href="#intersectBox">intersectBox</a><span class="signature">( box : <span class="param-type"><a href="Box3.html">Box3</a></span>, target : <span class="param-type"><a href="Vector3.html">Vector3</a></span> )</span><span class="type-signature"> : <a href="Vector3.html">Vector3</a></span> </h3>
  306. <div class="method">
  307. <div class="description">
  308. <p>Intersects this ray with the given bounding box, returning the intersection
  309. point or <code>null</code> if there is no intersection.</p>
  310. </div>
  311. <table class="params">
  312. <tbody>
  313. <tr>
  314. <td class="name">
  315. <strong>box</strong>
  316. </td>
  317. <td class="description last">
  318. <p>The box to intersect.</p>
  319. </td>
  320. </tr>
  321. <tr>
  322. <td class="name">
  323. <strong>target</strong>
  324. </td>
  325. <td class="description last">
  326. <p>The target vector that is used to store the method's result.</p>
  327. </td>
  328. </tr>
  329. </tbody>
  330. </table>
  331. <dl class="details">
  332. <dt class="tag-returns"><strong>Returns:</strong> The intersection point.</dt>
  333. </dl>
  334. </div>
  335. <h3 class="name name-method" id="intersectPlane" translate="no">.<a href="#intersectPlane">intersectPlane</a><span class="signature">( plane : <span class="param-type"><a href="Plane.html">Plane</a></span>, target : <span class="param-type"><a href="Vector3.html">Vector3</a></span> )</span><span class="type-signature"> : <a href="Vector3.html">Vector3</a></span> </h3>
  336. <div class="method">
  337. <div class="description">
  338. <p>Intersects this ray with the given plane, returning the intersection
  339. point or <code>null</code> if there is no intersection.</p>
  340. </div>
  341. <table class="params">
  342. <tbody>
  343. <tr>
  344. <td class="name">
  345. <strong>plane</strong>
  346. </td>
  347. <td class="description last">
  348. <p>The plane to intersect.</p>
  349. </td>
  350. </tr>
  351. <tr>
  352. <td class="name">
  353. <strong>target</strong>
  354. </td>
  355. <td class="description last">
  356. <p>The target vector that is used to store the method's result.</p>
  357. </td>
  358. </tr>
  359. </tbody>
  360. </table>
  361. <dl class="details">
  362. <dt class="tag-returns"><strong>Returns:</strong> The intersection point.</dt>
  363. </dl>
  364. </div>
  365. <h3 class="name name-method" id="intersectSphere" translate="no">.<a href="#intersectSphere">intersectSphere</a><span class="signature">( sphere : <span class="param-type"><a href="Sphere.html">Sphere</a></span>, target : <span class="param-type"><a href="Vector3.html">Vector3</a></span> )</span><span class="type-signature"> : <a href="Vector3.html">Vector3</a></span> </h3>
  366. <div class="method">
  367. <div class="description">
  368. <p>Intersects this ray with the given sphere, returning the intersection
  369. point or <code>null</code> if there is no intersection.</p>
  370. </div>
  371. <table class="params">
  372. <tbody>
  373. <tr>
  374. <td class="name">
  375. <strong>sphere</strong>
  376. </td>
  377. <td class="description last">
  378. <p>The sphere to intersect.</p>
  379. </td>
  380. </tr>
  381. <tr>
  382. <td class="name">
  383. <strong>target</strong>
  384. </td>
  385. <td class="description last">
  386. <p>The target vector that is used to store the method's result.</p>
  387. </td>
  388. </tr>
  389. </tbody>
  390. </table>
  391. <dl class="details">
  392. <dt class="tag-returns"><strong>Returns:</strong> The intersection point.</dt>
  393. </dl>
  394. </div>
  395. <h3 class="name name-method" id="intersectTriangle" translate="no">.<a href="#intersectTriangle">intersectTriangle</a><span class="signature">( a : <span class="param-type"><a href="Vector3.html">Vector3</a></span>, b : <span class="param-type"><a href="Vector3.html">Vector3</a></span>, c : <span class="param-type"><a href="Vector3.html">Vector3</a></span>, backfaceCulling : <span class="param-type">boolean</span>, target : <span class="param-type"><a href="Vector3.html">Vector3</a></span> )</span><span class="type-signature"> : <a href="Vector3.html">Vector3</a></span> </h3>
  396. <div class="method">
  397. <div class="description">
  398. <p>Intersects this ray with the given triangle, returning the intersection
  399. point or <code>null</code> if there is no intersection.</p>
  400. </div>
  401. <table class="params">
  402. <tbody>
  403. <tr>
  404. <td class="name">
  405. <strong>a</strong>
  406. </td>
  407. <td class="description last">
  408. <p>The first vertex of the triangle.</p>
  409. </td>
  410. </tr>
  411. <tr>
  412. <td class="name">
  413. <strong>b</strong>
  414. </td>
  415. <td class="description last">
  416. <p>The second vertex of the triangle.</p>
  417. </td>
  418. </tr>
  419. <tr>
  420. <td class="name">
  421. <strong>c</strong>
  422. </td>
  423. <td class="description last">
  424. <p>The third vertex of the triangle.</p>
  425. </td>
  426. </tr>
  427. <tr>
  428. <td class="name">
  429. <strong>backfaceCulling</strong>
  430. </td>
  431. <td class="description last">
  432. <p>Whether to use backface culling or not.</p>
  433. </td>
  434. </tr>
  435. <tr>
  436. <td class="name">
  437. <strong>target</strong>
  438. </td>
  439. <td class="description last">
  440. <p>The target vector that is used to store the method's result.</p>
  441. </td>
  442. </tr>
  443. </tbody>
  444. </table>
  445. <dl class="details">
  446. <dt class="tag-returns"><strong>Returns:</strong> The intersection point.</dt>
  447. </dl>
  448. </div>
  449. <h3 class="name name-method" id="intersectsBox" translate="no">.<a href="#intersectsBox">intersectsBox</a><span class="signature">( box : <span class="param-type"><a href="Box3.html">Box3</a></span> )</span><span class="type-signature"> : boolean</span> </h3>
  450. <div class="method">
  451. <div class="description">
  452. <p>Returns <code>true</code> if this ray intersects with the given box.</p>
  453. </div>
  454. <table class="params">
  455. <tbody>
  456. <tr>
  457. <td class="name">
  458. <strong>box</strong>
  459. </td>
  460. <td class="description last">
  461. <p>The box to intersect.</p>
  462. </td>
  463. </tr>
  464. </tbody>
  465. </table>
  466. <dl class="details">
  467. <dt class="tag-returns"><strong>Returns:</strong> Whether this ray intersects with the given box or not.</dt>
  468. </dl>
  469. </div>
  470. <h3 class="name name-method" id="intersectsPlane" translate="no">.<a href="#intersectsPlane">intersectsPlane</a><span class="signature">( plane : <span class="param-type"><a href="Plane.html">Plane</a></span> )</span><span class="type-signature"> : boolean</span> </h3>
  471. <div class="method">
  472. <div class="description">
  473. <p>Returns <code>true</code> if this ray intersects with the given plane.</p>
  474. </div>
  475. <table class="params">
  476. <tbody>
  477. <tr>
  478. <td class="name">
  479. <strong>plane</strong>
  480. </td>
  481. <td class="description last">
  482. <p>The plane to intersect.</p>
  483. </td>
  484. </tr>
  485. </tbody>
  486. </table>
  487. <dl class="details">
  488. <dt class="tag-returns"><strong>Returns:</strong> Whether this ray intersects with the given plane or not.</dt>
  489. </dl>
  490. </div>
  491. <h3 class="name name-method" id="intersectsSphere" translate="no">.<a href="#intersectsSphere">intersectsSphere</a><span class="signature">( sphere : <span class="param-type"><a href="Sphere.html">Sphere</a></span> )</span><span class="type-signature"> : boolean</span> </h3>
  492. <div class="method">
  493. <div class="description">
  494. <p>Returns <code>true</code> if this ray intersects with the given sphere.</p>
  495. </div>
  496. <table class="params">
  497. <tbody>
  498. <tr>
  499. <td class="name">
  500. <strong>sphere</strong>
  501. </td>
  502. <td class="description last">
  503. <p>The sphere to intersect.</p>
  504. </td>
  505. </tr>
  506. </tbody>
  507. </table>
  508. <dl class="details">
  509. <dt class="tag-returns"><strong>Returns:</strong> Whether this ray intersects with the given sphere or not.</dt>
  510. </dl>
  511. </div>
  512. <h3 class="name name-method" id="lookAt" translate="no">.<a href="#lookAt">lookAt</a><span class="signature">( v : <span class="param-type"><a href="Vector3.html">Vector3</a></span> )</span><span class="type-signature"> : <a href="Ray.html">Ray</a></span> </h3>
  513. <div class="method">
  514. <div class="description">
  515. <p>Adjusts the direction of the ray to point at the given vector in world space.</p>
  516. </div>
  517. <table class="params">
  518. <tbody>
  519. <tr>
  520. <td class="name">
  521. <strong>v</strong>
  522. </td>
  523. <td class="description last">
  524. <p>The target position.</p>
  525. </td>
  526. </tr>
  527. </tbody>
  528. </table>
  529. <dl class="details">
  530. <dt class="tag-returns"><strong>Returns:</strong> A reference to this ray.</dt>
  531. </dl>
  532. </div>
  533. <h3 class="name name-method" id="recast" translate="no">.<a href="#recast">recast</a><span class="signature">( t : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="Ray.html">Ray</a></span> </h3>
  534. <div class="method">
  535. <div class="description">
  536. <p>Shift the origin of this ray along its direction by the given distance.</p>
  537. </div>
  538. <table class="params">
  539. <tbody>
  540. <tr>
  541. <td class="name">
  542. <strong>t</strong>
  543. </td>
  544. <td class="description last">
  545. <p>The distance along the ray to interpolate.</p>
  546. </td>
  547. </tr>
  548. </tbody>
  549. </table>
  550. <dl class="details">
  551. <dt class="tag-returns"><strong>Returns:</strong> A reference to this ray.</dt>
  552. </dl>
  553. </div>
  554. <h3 class="name name-method" id="set" translate="no">.<a href="#set">set</a><span class="signature">( origin : <span class="param-type"><a href="Vector3.html">Vector3</a></span>, direction : <span class="param-type"><a href="Vector3.html">Vector3</a></span> )</span><span class="type-signature"> : <a href="Ray.html">Ray</a></span> </h3>
  555. <div class="method">
  556. <div class="description">
  557. <p>Sets the ray's components by copying the given values.</p>
  558. </div>
  559. <table class="params">
  560. <tbody>
  561. <tr>
  562. <td class="name">
  563. <strong>origin</strong>
  564. </td>
  565. <td class="description last">
  566. <p>The origin.</p>
  567. </td>
  568. </tr>
  569. <tr>
  570. <td class="name">
  571. <strong>direction</strong>
  572. </td>
  573. <td class="description last">
  574. <p>The direction.</p>
  575. </td>
  576. </tr>
  577. </tbody>
  578. </table>
  579. <dl class="details">
  580. <dt class="tag-returns"><strong>Returns:</strong> A reference to this ray.</dt>
  581. </dl>
  582. </div>
  583. <h2 class="subsection-title">Source</h2>
  584. <p>
  585. <a href="https://github.com/mrdoob/three.js/blob/master/src/math/Ray.js" translate="no" target="_blank" rel="noopener">src/math/Ray.js</a>
  586. </p>
  587. </article>
  588. </section>
  589. <script src="../scripts/linenumber.js"></script>
  590. <script src="../scripts/page.js"></script>
  591. </body>
  592. </html>
粤ICP备19079148号