1 | <!DOCTYPE html>
|
---|
2 | <html lang="en">
|
---|
3 | <head>
|
---|
4 | <meta charset="utf-8" />
|
---|
5 | <script src="../../list.js"></script>
|
---|
6 | <script src="../../page.js"></script>
|
---|
7 | <link type="text/css" rel="stylesheet" href="../../page.css" />
|
---|
8 | </head>
|
---|
9 | <body>
|
---|
10 | <h1>[name]</h1>
|
---|
11 |
|
---|
12 | <div class="desc">
|
---|
13 | This class makes raycasting easier. Raycasting is used for picking and more.
|
---|
14 |
|
---|
15 | </div>
|
---|
16 |
|
---|
17 |
|
---|
18 | <h2>Constructor</h2>
|
---|
19 |
|
---|
20 |
|
---|
21 | <h3>[name]( [page:Vector3 origin], [page:Vector3 direction], [page:Float near], [page:Float far] ) {</h3>
|
---|
22 | <div>
|
---|
23 | [page:Vector3 origin] â The origin vector where the ray casts from.<br />
|
---|
24 | [page:Vector3 direction] â The direction vector that gives direction to the ray.<br />
|
---|
25 | [page:Float near] â All results returned are further away then near. Near can't be negative. Default value is 0.<br />
|
---|
26 | [page:Float far] â All results returned are closer then far. Far can't be lower then near . Default value is Infinity.
|
---|
27 | </div>
|
---|
28 | <div>
|
---|
29 | This creates a new raycaster object.<br />
|
---|
30 | </div>
|
---|
31 |
|
---|
32 |
|
---|
33 | <h2>Properties</h2>
|
---|
34 |
|
---|
35 | <h3>.[page:Ray ray]</h3>
|
---|
36 | <div>
|
---|
37 | The Ray used for the raycasting.
|
---|
38 | </div>
|
---|
39 |
|
---|
40 | <h3>.[page:float near]</h3>
|
---|
41 | <div>
|
---|
42 | The near factor of the raycaster. This value indicates which objects can be discarded based on the distance.<br />
|
---|
43 | This value shouldn't be negative and should be smaller than the far property.
|
---|
44 | </div>
|
---|
45 |
|
---|
46 | <h3>.[page:float far]</h3>
|
---|
47 | <div>
|
---|
48 | The far factor of the raycaster. This value indicates which objects can be discarded based on the distance.<br />
|
---|
49 | This value shouldn't be negative and should be larger than the near property.
|
---|
50 | </div>
|
---|
51 |
|
---|
52 | <h3>.[page:float precision]</h3>
|
---|
53 | <div>
|
---|
54 | The precision factor of the raycaster.
|
---|
55 | </div>
|
---|
56 |
|
---|
57 | <h2>Methods</h2>
|
---|
58 |
|
---|
59 | <h3>.set( [page:Vector3 origin], [page:Vector3 direction] )</h3>
|
---|
60 | <div>
|
---|
61 | [page:Vector3 origin] â The origin vector where the ray casts from.<br />
|
---|
62 | [page:Vector3 direction] â The direction vector that gives direction to the ray.
|
---|
63 | </div>
|
---|
64 | <div>
|
---|
65 | Updates the ray with a new origin and direction.
|
---|
66 | </div>
|
---|
67 |
|
---|
68 | <h3>.intersectObject( [page:Object3D object], [page:Boolean recursive] )</h3>
|
---|
69 | <div>
|
---|
70 | [page:Object3D object] â The object to check for intersection with the ray.<br />
|
---|
71 | [page:Boolean recursive] â If set, it also checks all descendants. Otherwise it only checks intersecton with the object.
|
---|
72 | </div>
|
---|
73 | <div>
|
---|
74 | checks all intersection between the ray and the object with or without the descendants.
|
---|
75 | </div>
|
---|
76 |
|
---|
77 | <h3>.intersectObjects( [page:Array objects], [page:Boolean recursive] )</h3>
|
---|
78 | <div>
|
---|
79 | [page:Array objects] â The objects to check for intersection with the ray.<br />
|
---|
80 | [page:Boolean recursive] â If set, it also checks all descendants of the objects. Otherwise it only checks intersecton with the objects.
|
---|
81 | </div>
|
---|
82 | <div>
|
---|
83 | checks all intersection between the ray and the objects with or without the descendants.
|
---|
84 | </div>
|
---|
85 |
|
---|
86 |
|
---|
87 | <h2>Source</h2>
|
---|
88 |
|
---|
89 | [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
---|
90 | </body>
|
---|
91 | </html>
|
---|