@jdultra/threedtiles 13.2.6 → 13.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entry.d.ts +1 -0
- package/dist/geometry/obb.d.ts +130 -13
- package/dist/threedtiles.cjs.js +15 -15
- package/dist/threedtiles.cjs.js.map +1 -1
- package/dist/threedtiles.es.js +3031 -2992
- package/dist/threedtiles.es.js.map +1 -1
- package/dist/threedtiles.umd.js +15 -15
- package/dist/threedtiles.umd.js.map +1 -1
- package/dist/tileset/OGC3DTile.d.ts +10 -0
- package/package.json +1 -1
package/dist/entry.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ export { OcclusionCullingService } from "./tileset/OcclusionCullingService";
|
|
|
2
2
|
export { TileLoader } from "./tileset/TileLoader";
|
|
3
3
|
export { InstancedOGC3DTile } from "./tileset/instanced/InstancedOGC3DTile.js";
|
|
4
4
|
export { InstancedTileLoader } from "./tileset/instanced/InstancedTileLoader.js";
|
|
5
|
+
export { OBB } from "./geometry/obb.js";
|
|
5
6
|
export { OGC3DTile, getOGC3DTilesCopyrightInfo } from "./tileset/OGC3DTile";
|
|
6
7
|
export { splatsVertexShader, splatsFragmentShader } from "./splats/SplatsMesh.js";
|
package/dist/geometry/obb.d.ts
CHANGED
|
@@ -1,23 +1,140 @@
|
|
|
1
1
|
export class OBB {
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Creates an oriented-bounding-box (OBB) from a 12-element numeric array.
|
|
4
|
+
*
|
|
5
|
+
* @param {number[]} values 12 numbers:
|
|
6
|
+
* `[cx, cy, cz, e1x, e1y, e1z, e2x, e2y, e2z, e3x, e3y, e3z]` where
|
|
7
|
+
* `center = (cx, cy, cz)` and `e1 e2 e3` are the local edge vectors.
|
|
8
|
+
* @constructor
|
|
9
|
+
* @memberof OBB
|
|
10
|
+
* @see OBB implementation source :contentReference[oaicite:0]{index=0}
|
|
11
|
+
*/
|
|
12
|
+
constructor(values: number[]);
|
|
13
|
+
isOBB: boolean;
|
|
3
14
|
center: Vector3;
|
|
4
15
|
e1: Vector3;
|
|
5
16
|
e2: Vector3;
|
|
6
17
|
e3: Vector3;
|
|
7
18
|
halfSize: Vector3;
|
|
8
19
|
rotationMatrix: Matrix3;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Copy all geometric properties from another {@link OBB}.
|
|
22
|
+
*
|
|
23
|
+
* @param {OBB} aObb Source OBB whose data will be copied.
|
|
24
|
+
* @returns {void}
|
|
25
|
+
* @memberof OBB
|
|
26
|
+
* @see OBB implementation source :contentReference[oaicite:1]{index=1}
|
|
27
|
+
*/
|
|
28
|
+
copy(aObb: OBB): void;
|
|
29
|
+
/**
|
|
30
|
+
* Get the full **size** (width, height, depth) of this OBB.
|
|
31
|
+
*
|
|
32
|
+
* @param {THREE.Vector3} result Pre-allocated vector that receives the size.
|
|
33
|
+
* @returns {THREE.Vector3} The same `result` instance for chaining.
|
|
34
|
+
* @memberof OBB
|
|
35
|
+
* @see OBB implementation source :contentReference[oaicite:2]{index=2}
|
|
36
|
+
*/
|
|
37
|
+
getSize(result: THREE.Vector3): THREE.Vector3;
|
|
38
|
+
/**
|
|
39
|
+
* Apply an arbitrary affine transformation to this OBB.
|
|
40
|
+
*
|
|
41
|
+
* Scales, rotations (including non-uniform scale & reflection) and translations
|
|
42
|
+
* encoded in the 4×4 matrix are baked into `center`, `rotationMatrix`
|
|
43
|
+
* and `halfSize`.
|
|
44
|
+
*
|
|
45
|
+
* @param {THREE.Matrix4} matrix World-space transform to apply.
|
|
46
|
+
* @returns {OBB} This instance for chaining.
|
|
47
|
+
* @memberof OBB
|
|
48
|
+
* @see OBB implementation source :contentReference[oaicite:3]{index=3}
|
|
49
|
+
*/
|
|
50
|
+
applyMatrix4(matrix: THREE.Matrix4): OBB;
|
|
51
|
+
/**
|
|
52
|
+
* Compute the exact intersection point between a world-space ray and this OBB.
|
|
53
|
+
*
|
|
54
|
+
* @param {THREE.Ray} ray Ray expressed in world coordinates.
|
|
55
|
+
* @param {THREE.Vector3} result Vector that receives the intersection point.
|
|
56
|
+
* @returns {?THREE.Vector3} `result` with the hit point, or `null` if no hit.
|
|
57
|
+
* @memberof OBB
|
|
58
|
+
* @see OBB implementation source :contentReference[oaicite:4]{index=4}
|
|
59
|
+
*/
|
|
60
|
+
intersectRay(ray: THREE.Ray, result: THREE.Vector3): THREE.Vector3 | null;
|
|
61
|
+
/**
|
|
62
|
+
* Clamp a point to the surface or interior of the OBB (closest point query).
|
|
63
|
+
*
|
|
64
|
+
* @param {THREE.Vector3} point World-space point to be clamped.
|
|
65
|
+
* @param {THREE.Vector3} target Vector that will receive the clamped point.
|
|
66
|
+
* @returns {THREE.Vector3} The same `target` instance for chaining.
|
|
67
|
+
* @memberof OBB
|
|
68
|
+
* @see OBB implementation source :contentReference[oaicite:5]{index=5}
|
|
69
|
+
*/
|
|
70
|
+
clampPoint(point: THREE.Vector3, target: THREE.Vector3): THREE.Vector3;
|
|
71
|
+
/**
|
|
72
|
+
* Test whether a {@link THREE.Sphere} intersects or is contained by this OBB.
|
|
73
|
+
*
|
|
74
|
+
* @param {THREE.Sphere} sphere Sphere to test.
|
|
75
|
+
* @returns {boolean} `true` if the sphere overlaps the OBB.
|
|
76
|
+
* @memberof OBB
|
|
77
|
+
* @see OBB implementation source :contentReference[oaicite:6]{index=6}
|
|
78
|
+
*/
|
|
79
|
+
intersectsSphere(sphere: THREE.Sphere): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Separating-Axis-Theorem (SAT) intersection test between two OBBs.
|
|
82
|
+
*
|
|
83
|
+
* @param {OBB} other The second OBB.
|
|
84
|
+
* @param {number} [epsilon=Number.EPSILON] Numerical tolerance for stability.
|
|
85
|
+
* @returns {boolean} `true` if the two OBBs overlap.
|
|
86
|
+
* @memberof OBB
|
|
87
|
+
* @see OBB implementation source :contentReference[oaicite:7]{index=7}
|
|
88
|
+
*/
|
|
89
|
+
intersectsOBB(other: OBB, epsilon?: number): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Fast boolean ray-OBB intersection convenience method.
|
|
92
|
+
*
|
|
93
|
+
* @param {THREE.Ray} ray Ray expressed in world coordinates.
|
|
94
|
+
* @returns {boolean} `true` if the ray intersects the OBB.
|
|
95
|
+
* @memberof OBB
|
|
96
|
+
* @see OBB implementation source :contentReference[oaicite:8]{index=8}
|
|
97
|
+
*/
|
|
98
|
+
intersectsRay(ray: THREE.Ray): boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Determine whether the OBB lies on the positive side of (or intersects) a plane.
|
|
101
|
+
*
|
|
102
|
+
* The plane is interpreted as **inside-facing** when its normal points toward
|
|
103
|
+
* the allowed half-space.
|
|
104
|
+
*
|
|
105
|
+
* @param {THREE.Plane} plane Plane used for the half-space test.
|
|
106
|
+
* @returns {boolean} `true` if any part of the OBB is inside or touching the plane.
|
|
107
|
+
* @memberof OBB
|
|
108
|
+
* @see OBB implementation source :contentReference[oaicite:9]{index=9}
|
|
109
|
+
*/
|
|
110
|
+
insidePlane(plane: THREE.Plane): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* View-frustum culling test.
|
|
113
|
+
*
|
|
114
|
+
* @param {THREE.Frustum} frustum Frustum to test against.
|
|
115
|
+
* @returns {boolean} `true` if this OBB is at least partially inside the frustum.
|
|
116
|
+
* @memberof OBB
|
|
117
|
+
* @see OBB implementation source :contentReference[oaicite:10]{index=10}
|
|
118
|
+
*/
|
|
119
|
+
inFrustum(frustum: THREE.Frustum): boolean;
|
|
120
|
+
/**
|
|
121
|
+
* Compute the shortest Euclidean distance from the OBB to a point.
|
|
122
|
+
*
|
|
123
|
+
* @param {THREE.Vector3} point Point in world coordinates.
|
|
124
|
+
* @returns {number} Distance (≥ 0). Zero indicates the point is inside.
|
|
125
|
+
* @memberof OBB
|
|
126
|
+
* @see OBB implementation source :contentReference[oaicite:11]{index=11}
|
|
127
|
+
*/
|
|
128
|
+
distanceToPoint(point: THREE.Vector3): number;
|
|
129
|
+
/**
|
|
130
|
+
* Create a red wire-frame visual helper for debugging purposes.
|
|
131
|
+
*
|
|
132
|
+
* @returns {THREE.LineSegments} A disposable wireframe object that
|
|
133
|
+
* renders the eight corners and twelve edges of the OBB.
|
|
134
|
+
* @memberof OBB
|
|
135
|
+
* @see OBB implementation source :contentReference[oaicite:12]{index=12}
|
|
136
|
+
*/
|
|
137
|
+
helper(): THREE.LineSegments;
|
|
18
138
|
}
|
|
19
139
|
import { Vector3 } from "three";
|
|
20
140
|
import { Matrix3 } from "three";
|
|
21
|
-
import { BufferGeometry } from "three";
|
|
22
|
-
import { LineBasicMaterial } from "three";
|
|
23
|
-
import { LineSegments } from "three";
|