Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Alfakhori
M4labplatform
Commits
c53f4211
Commit
c53f4211
authored
Feb 24, 2021
by
Patrick
Browse files
update vcs version
parent
a7c8b61b
Changes
156
Expand all
Show whitespace changes
Inline
Side-by-side
vcm/lib/Cesium/Workers/IndexDatatype-527cbd94.js
0 → 100644
View file @
c53f4211
/**
* Cesium - https://github.com/CesiumGS/cesium
*
* Copyright 2011-2020 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/master/LICENSE.md for full licensing details.
*/
define
([
"
exports
"
,
"
./when-60b00257
"
,
"
./Check-4274a1fd
"
,
"
./Math-9d37f659
"
,
"
./WebGLConstants-779bf0bc
"
],
function
(
e
,
r
,
t
,
N
,
n
){
"
use strict
"
;
var
E
=
{
UNSIGNED_BYTE
:
n
.
WebGLConstants
.
UNSIGNED_BYTE
,
UNSIGNED_SHORT
:
n
.
WebGLConstants
.
UNSIGNED_SHORT
,
UNSIGNED_INT
:
n
.
WebGLConstants
.
UNSIGNED_INT
,
getSizeInBytes
:
function
(
e
){
switch
(
e
){
case
E
.
UNSIGNED_BYTE
:
return
Uint8Array
.
BYTES_PER_ELEMENT
;
case
E
.
UNSIGNED_SHORT
:
return
Uint16Array
.
BYTES_PER_ELEMENT
;
case
E
.
UNSIGNED_INT
:
return
Uint32Array
.
BYTES_PER_ELEMENT
}},
fromSizeInBytes
:
function
(
e
){
switch
(
e
){
case
2
:
return
E
.
UNSIGNED_SHORT
;
case
4
:
return
E
.
UNSIGNED_INT
;
case
1
:
return
E
.
UNSIGNED_BYTE
}},
validate
:
function
(
e
){
return
r
.
defined
(
e
)
&&
(
e
===
E
.
UNSIGNED_BYTE
||
e
===
E
.
UNSIGNED_SHORT
||
e
===
E
.
UNSIGNED_INT
)},
createTypedArray
:
function
(
e
,
r
){
return
new
(
e
>=
N
.
CesiumMath
.
SIXTY_FOUR_KILOBYTES
?
Uint32Array
:
Uint16Array
)(
r
)},
createTypedArrayFromArrayBuffer
:
function
(
e
,
r
,
t
,
n
){
return
new
(
e
>=
N
.
CesiumMath
.
SIXTY_FOUR_KILOBYTES
?
Uint32Array
:
Uint16Array
)(
r
,
t
,
n
)}},
a
=
Object
.
freeze
(
E
);
e
.
IndexDatatype
=
a
});
vcm/lib/Cesium/Workers/IntersectionTests-57fe18b2.js
0 → 100644
View file @
c53f4211
/**
* Cesium - https://github.com/CesiumGS/cesium
*
* Copyright 2011-2020 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/master/LICENSE.md for full licensing details.
*/
define
([
"
exports
"
,
"
./when-60b00257
"
,
"
./Check-4274a1fd
"
,
"
./Math-9d37f659
"
,
"
./Cartesian2-2951f601
"
,
"
./Transforms-53ff6d12
"
],
function
(
a
,
q
,
t
,
z
,
T
,
U
){
"
use strict
"
;
var
W
=
{};
function
C
(
a
,
t
,
e
){
var
r
=
a
+
t
;
return
z
.
CesiumMath
.
sign
(
a
)
!==
z
.
CesiumMath
.
sign
(
t
)
&&
Math
.
abs
(
r
/
Math
.
max
(
Math
.
abs
(
a
),
Math
.
abs
(
t
)))
<
e
?
0
:
r
}
W
.
computeDiscriminant
=
function
(
a
,
t
,
e
){
return
t
*
t
-
4
*
a
*
e
},
W
.
computeRealRoots
=
function
(
a
,
t
,
e
){
var
r
;
if
(
0
===
a
)
return
0
===
t
?[]:[
-
e
/
t
];
if
(
0
===
t
){
if
(
0
===
e
)
return
[
0
,
0
];
var
n
=
Math
.
abs
(
e
),
i
=
Math
.
abs
(
a
);
if
(
n
<
i
&&
n
/
i
<
z
.
CesiumMath
.
EPSILON14
)
return
[
0
,
0
];
if
(
i
<
n
&&
i
/
n
<
z
.
CesiumMath
.
EPSILON14
)
return
[];
if
((
r
=-
e
/
a
)
<
0
)
return
[];
var
s
=
Math
.
sqrt
(
r
);
return
[
-
s
,
s
]}
if
(
0
===
e
)
return
(
r
=-
t
/
a
)
<
0
?[
r
,
0
]:[
0
,
r
];
var
o
=
C
(
t
*
t
,
-
(
4
*
a
*
e
),
z
.
CesiumMath
.
EPSILON14
);
if
(
o
<
0
)
return
[];
var
u
=-
.
5
*
C
(
t
,
z
.
CesiumMath
.
sign
(
t
)
*
Math
.
sqrt
(
o
),
z
.
CesiumMath
.
EPSILON14
);
return
0
<
t
?[
u
/
a
,
e
/
u
]:[
e
/
u
,
u
/
a
]};
var
b
=
{};
function
o
(
a
,
t
,
e
,
r
){
var
n
,
i
,
s
=
a
,
o
=
t
/
3
,
u
=
e
/
3
,
C
=
r
,
c
=
s
*
u
,
l
=
o
*
C
,
h
=
o
*
o
,
M
=
u
*
u
,
f
=
s
*
u
-
h
,
m
=
s
*
C
-
o
*
u
,
d
=
o
*
C
-
M
,
v
=
4
*
f
*
d
-
m
*
m
;
if
(
v
<
0
){
var
g
,
p
,
w
,
R
=-
((
w
=
c
*
M
<=
h
*
l
?
-
2
*
o
*
(
p
=
f
)
+
(
g
=
s
)
*
m
:
-
(
g
=
C
)
*
m
+
2
*
u
*
(
p
=
d
))
<
0
?
-
1
:
1
)
*
Math
.
abs
(
g
)
*
Math
.
sqrt
(
-
v
),
S
=
(
i
=
R
-
w
)
/
2
,
O
=
S
<
0
?
-
Math
.
pow
(
-
S
,
1
/
3
):
Math
.
pow
(
S
,
1
/
3
),
x
=
i
===
R
?
-
O
:
-
p
/
O
;
return
n
=
p
<=
0
?
O
+
x
:
-
w
/
(
O
*
O
+
x
*
x
+
p
),
c
*
M
<=
h
*
l
?[(
n
-
o
)
/
s
]:[
-
C
/
(
n
+
u
)]}
var
y
=
f
,
P
=-
2
*
o
*
f
+
s
*
m
,
N
=
d
,
b
=-
C
*
m
+
2
*
u
*
d
,
q
=
Math
.
sqrt
(
v
),
L
=
Math
.
sqrt
(
3
)
/
2
,
I
=
Math
.
abs
(
Math
.
atan2
(
s
*
q
,
-
P
)
/
3
);
n
=
2
*
Math
.
sqrt
(
-
y
);
var
E
=
Math
.
cos
(
I
);
i
=
n
*
E
;
var
z
=
n
*
(
-
E
/
2
-
L
*
Math
.
sin
(
I
)),
T
=
2
*
o
<
i
+
z
?
i
-
o
:
z
-
o
,
U
=
s
,
W
=
T
/
U
;
I
=
Math
.
abs
(
Math
.
atan2
(
C
*
q
,
-
b
)
/
3
);
var
B
=-
C
,
V
=
(
i
=
(
n
=
2
*
Math
.
sqrt
(
-
N
))
*
(
E
=
Math
.
cos
(
I
)))
+
(
z
=
n
*
(
-
E
/
2
-
L
*
Math
.
sin
(
I
)))
<
2
*
u
?
i
+
u
:
z
+
u
,
Z
=
B
/
V
,
A
=-
T
*
V
-
U
*
B
,
D
=
(
u
*
A
-
o
*
(
T
*
B
))
/
(
-
o
*
A
+
u
*
(
U
*
V
));
return
W
<=
D
?
W
<=
Z
?
D
<=
Z
?[
W
,
D
,
Z
]:[
W
,
Z
,
D
]:[
Z
,
W
,
D
]:
W
<=
Z
?[
D
,
W
,
Z
]:
D
<=
Z
?[
D
,
Z
,
W
]:[
Z
,
D
,
W
]}
b
.
computeDiscriminant
=
function
(
a
,
t
,
e
,
r
){
var
n
=
t
*
t
,
i
=
e
*
e
;
return
18
*
a
*
t
*
e
*
r
+
n
*
i
-
27
*
(
a
*
a
)
*
(
r
*
r
)
-
4
*
(
a
*
i
*
e
+
n
*
t
*
r
)},
b
.
computeRealRoots
=
function
(
a
,
t
,
e
,
r
){
var
n
,
i
;
if
(
0
===
a
)
return
W
.
computeRealRoots
(
t
,
e
,
r
);
if
(
0
!==
t
)
return
0
===
e
?
0
===
r
?(
i
=-
t
/
a
)
<
0
?[
i
,
0
,
0
]:[
0
,
0
,
i
]:
o
(
a
,
t
,
0
,
r
):
0
===
r
?
0
===
(
n
=
W
.
computeRealRoots
(
a
,
t
,
e
)).
length
?[
0
]:
n
[
1
]
<=
0
?[
n
[
0
],
n
[
1
],
0
]:
0
<=
n
[
0
]?[
0
,
n
[
0
],
n
[
1
]]:[
n
[
0
],
0
,
n
[
1
]]:
o
(
a
,
t
,
e
,
r
);
if
(
0
!==
e
)
return
0
===
r
?
0
===
(
n
=
W
.
computeRealRoots
(
a
,
0
,
e
)).
Length
?[
0
]:[
n
[
0
],
0
,
n
[
1
]]:
o
(
a
,
0
,
e
,
r
);
if
(
0
===
r
)
return
[
0
,
0
,
0
];
var
s
=
(
i
=-
r
/
a
)
<
0
?
-
Math
.
pow
(
-
i
,
1
/
3
):
Math
.
pow
(
i
,
1
/
3
);
return
[
s
,
s
,
s
]};
var
B
=
{};
function
c
(
a
,
t
,
e
,
r
){
var
n
=
a
*
a
,
i
=
t
-
3
*
n
/
8
,
s
=
e
-
t
*
a
/
2
+
n
*
a
/
8
,
o
=
r
-
e
*
a
/
4
+
t
*
n
/
16
-
3
*
n
*
n
/
256
,
u
=
b
.
computeRealRoots
(
1
,
2
*
i
,
i
*
i
-
4
*
o
,
-
s
*
s
);
if
(
0
<
u
.
length
){
var
C
=-
a
/
4
,
c
=
u
[
u
.
length
-
1
];
if
(
Math
.
abs
(
c
)
<
z
.
CesiumMath
.
EPSILON14
){
var
l
=
W
.
computeRealRoots
(
1
,
i
,
o
);
if
(
2
===
l
.
length
){
var
h
,
M
=
l
[
0
],
f
=
l
[
1
];
if
(
0
<=
M
&&
0
<=
f
){
var
m
=
Math
.
sqrt
(
M
),
d
=
Math
.
sqrt
(
f
);
return
[
C
-
d
,
C
-
m
,
C
+
m
,
C
+
d
]}
if
(
0
<=
M
&&
f
<
0
)
return
[
C
-
(
h
=
Math
.
sqrt
(
M
)),
C
+
h
];
if
(
M
<
0
&&
0
<=
f
)
return
[
C
-
(
h
=
Math
.
sqrt
(
f
)),
C
+
h
]}
return
[]}
if
(
0
<
c
){
var
v
=
Math
.
sqrt
(
c
),
g
=
(
i
+
c
-
s
/
v
)
/
2
,
p
=
(
i
+
c
+
s
/
v
)
/
2
,
w
=
W
.
computeRealRoots
(
1
,
v
,
g
),
R
=
W
.
computeRealRoots
(
1
,
-
v
,
p
);
return
0
!==
w
.
length
?(
w
[
0
]
+=
C
,
w
[
1
]
+=
C
,
0
!==
R
.
length
?(
R
[
0
]
+=
C
,
R
[
1
]
+=
C
,
w
[
1
]
<=
R
[
0
]?[
w
[
0
],
w
[
1
],
R
[
0
],
R
[
1
]]:
R
[
1
]
<=
w
[
0
]?[
R
[
0
],
R
[
1
],
w
[
0
],
w
[
1
]]:
w
[
0
]
>=
R
[
0
]
&&
w
[
1
]
<=
R
[
1
]?[
R
[
0
],
w
[
0
],
w
[
1
],
R
[
1
]]:
R
[
0
]
>=
w
[
0
]
&&
R
[
1
]
<=
w
[
1
]?[
w
[
0
],
R
[
0
],
R
[
1
],
w
[
1
]]:
w
[
0
]
>
R
[
0
]
&&
w
[
0
]
<
R
[
1
]?[
R
[
0
],
w
[
0
],
R
[
1
],
w
[
1
]]:[
w
[
0
],
R
[
0
],
w
[
1
],
R
[
1
]]):
w
):
0
!==
R
.
length
?(
R
[
0
]
+=
C
,
R
[
1
]
+=
C
,
R
):[]}}
return
[]}
function
l
(
a
,
t
,
e
,
r
){
var
n
=
a
*
a
,
i
=-
2
*
t
,
s
=
e
*
a
+
t
*
t
-
4
*
r
,
o
=
n
*
r
-
e
*
t
*
a
+
e
*
e
,
u
=
b
.
computeRealRoots
(
1
,
i
,
s
,
o
);
if
(
0
<
u
.
length
){
var
C
,
c
,
l
,
h
,
M
,
f
,
m
=
u
[
0
],
d
=
t
-
m
,
v
=
d
*
d
,
g
=
a
/
2
,
p
=
d
/
2
,
w
=
v
-
4
*
r
,
R
=
v
+
4
*
Math
.
abs
(
r
),
S
=
n
-
4
*
m
,
O
=
n
+
4
*
Math
.
abs
(
m
);
if
(
m
<
0
||
w
*
O
<
S
*
R
){
var
x
=
Math
.
sqrt
(
S
);
C
=
x
/
2
,
c
=
0
===
x
?
0
:(
a
*
p
-
e
)
/
x
}
else
{
var
y
=
Math
.
sqrt
(
w
);
C
=
0
===
y
?
0
:(
a
*
p
-
e
)
/
y
,
c
=
y
/
2
}
0
==
g
&&
0
===
C
?
h
=
l
=
0
:
z
.
CesiumMath
.
sign
(
g
)
===
z
.
CesiumMath
.
sign
(
C
)?
h
=
m
/
(
l
=
g
+
C
):
l
=
m
/
(
h
=
g
-
C
),
0
==
p
&&
0
===
c
?
f
=
M
=
0
:
z
.
CesiumMath
.
sign
(
p
)
===
z
.
CesiumMath
.
sign
(
c
)?
f
=
r
/
(
M
=
p
+
c
):
M
=
r
/
(
f
=
p
-
c
);
var
P
=
W
.
computeRealRoots
(
1
,
l
,
M
),
N
=
W
.
computeRealRoots
(
1
,
h
,
f
);
if
(
0
!==
P
.
length
)
return
0
!==
N
.
length
?
P
[
1
]
<=
N
[
0
]?[
P
[
0
],
P
[
1
],
N
[
0
],
N
[
1
]]:
N
[
1
]
<=
P
[
0
]?[
N
[
0
],
N
[
1
],
P
[
0
],
P
[
1
]]:
P
[
0
]
>=
N
[
0
]
&&
P
[
1
]
<=
N
[
1
]?[
N
[
0
],
P
[
0
],
P
[
1
],
N
[
1
]]:
N
[
0
]
>=
P
[
0
]
&&
N
[
1
]
<=
P
[
1
]?[
P
[
0
],
N
[
0
],
N
[
1
],
P
[
1
]]:
P
[
0
]
>
N
[
0
]
&&
P
[
0
]
<
N
[
1
]?[
N
[
0
],
P
[
0
],
N
[
1
],
P
[
1
]]:[
P
[
0
],
N
[
0
],
P
[
1
],
N
[
1
]]:
P
;
if
(
0
!==
N
.
length
)
return
N
}
return
[]}
function
e
(
a
,
t
){
t
=
T
.
Cartesian3
.
clone
(
q
.
defaultValue
(
t
,
T
.
Cartesian3
.
ZERO
)),
T
.
Cartesian3
.
equals
(
t
,
T
.
Cartesian3
.
ZERO
)
||
T
.
Cartesian3
.
normalize
(
t
,
t
),
this
.
origin
=
T
.
Cartesian3
.
clone
(
q
.
defaultValue
(
a
,
T
.
Cartesian3
.
ZERO
)),
this
.
direction
=
t
}
B
.
computeDiscriminant
=
function
(
a
,
t
,
e
,
r
,
n
){
var
i
=
a
*
a
,
s
=
t
*
t
,
o
=
s
*
t
,
u
=
e
*
e
,
C
=
u
*
e
,
c
=
r
*
r
,
l
=
c
*
r
,
h
=
n
*
n
;
return
s
*
u
*
c
-
4
*
o
*
l
-
4
*
a
*
C
*
c
+
18
*
a
*
t
*
e
*
l
-
27
*
i
*
c
*
c
+
256
*
(
i
*
a
)
*
(
h
*
n
)
+
n
*
(
18
*
o
*
e
*
r
-
4
*
s
*
C
+
16
*
a
*
u
*
u
-
80
*
a
*
t
*
u
*
r
-
6
*
a
*
s
*
c
+
144
*
i
*
e
*
c
)
+
h
*
(
144
*
a
*
s
*
e
-
27
*
s
*
s
-
128
*
i
*
u
-
192
*
i
*
t
*
r
)},
B
.
computeRealRoots
=
function
(
a
,
t
,
e
,
r
,
n
){
if
(
Math
.
abs
(
a
)
<
z
.
CesiumMath
.
EPSILON15
)
return
b
.
computeRealRoots
(
t
,
e
,
r
,
n
);
var
i
=
t
/
a
,
s
=
e
/
a
,
o
=
r
/
a
,
u
=
n
/
a
,
C
=
i
<
0
?
1
:
0
;
switch
(
C
+=
s
<
0
?
C
+
1
:
C
,
C
+=
o
<
0
?
C
+
1
:
C
,
C
+=
u
<
0
?
C
+
1
:
C
){
case
0
:
return
c
(
i
,
s
,
o
,
u
);
case
1
:
case
2
:
return
l
(
i
,
s
,
o
,
u
);
case
3
:
case
4
:
return
c
(
i
,
s
,
o
,
u
);
case
5
:
return
l
(
i
,
s
,
o
,
u
);
case
6
:
case
7
:
return
c
(
i
,
s
,
o
,
u
);
case
8
:
return
l
(
i
,
s
,
o
,
u
);
case
9
:
case
10
:
return
c
(
i
,
s
,
o
,
u
);
case
11
:
return
l
(
i
,
s
,
o
,
u
);
case
12
:
case
13
:
case
14
:
case
15
:
return
c
(
i
,
s
,
o
,
u
);
default
:
return
}},
e
.
clone
=
function
(
a
,
t
){
if
(
q
.
defined
(
a
))
return
q
.
defined
(
t
)?(
t
.
origin
=
T
.
Cartesian3
.
clone
(
a
.
origin
),
t
.
direction
=
T
.
Cartesian3
.
clone
(
a
.
direction
),
t
):
new
e
(
a
.
origin
,
a
.
direction
)},
e
.
getPoint
=
function
(
a
,
t
,
e
){
return
q
.
defined
(
e
)
||
(
e
=
new
T
.
Cartesian3
),
e
=
T
.
Cartesian3
.
multiplyByScalar
(
a
.
direction
,
t
,
e
),
T
.
Cartesian3
.
add
(
a
.
origin
,
e
,
e
)};
var
h
=
{
rayPlane
:
function
(
a
,
t
,
e
){
q
.
defined
(
e
)
||
(
e
=
new
T
.
Cartesian3
);
var
r
=
a
.
origin
,
n
=
a
.
direction
,
i
=
t
.
normal
,
s
=
T
.
Cartesian3
.
dot
(
i
,
n
);
if
(
!
(
Math
.
abs
(
s
)
<
z
.
CesiumMath
.
EPSILON15
)){
var
o
=
(
-
t
.
distance
-
T
.
Cartesian3
.
dot
(
i
,
r
))
/
s
;
if
(
!
(
o
<
0
))
return
e
=
T
.
Cartesian3
.
multiplyByScalar
(
n
,
o
,
e
),
T
.
Cartesian3
.
add
(
r
,
e
,
e
)}}},
v
=
new
T
.
Cartesian3
,
g
=
new
T
.
Cartesian3
,
p
=
new
T
.
Cartesian3
,
w
=
new
T
.
Cartesian3
,
R
=
new
T
.
Cartesian3
;
h
.
rayTriangleParametric
=
function
(
a
,
t
,
e
,
r
,
n
){
n
=
q
.
defaultValue
(
n
,
!
1
);
var
i
,
s
,
o
,
u
,
C
,
c
=
a
.
origin
,
l
=
a
.
direction
,
h
=
T
.
Cartesian3
.
subtract
(
e
,
t
,
v
),
M
=
T
.
Cartesian3
.
subtract
(
r
,
t
,
g
),
f
=
T
.
Cartesian3
.
cross
(
l
,
M
,
p
),
m
=
T
.
Cartesian3
.
dot
(
h
,
f
);
if
(
n
){
if
(
m
<
z
.
CesiumMath
.
EPSILON6
)
return
;
if
(
i
=
T
.
Cartesian3
.
subtract
(
c
,
t
,
w
),(
o
=
T
.
Cartesian3
.
dot
(
i
,
f
))
<
0
||
m
<
o
)
return
;
if
(
s
=
T
.
Cartesian3
.
cross
(
i
,
h
,
R
),(
u
=
T
.
Cartesian3
.
dot
(
l
,
s
))
<
0
||
m
<
o
+
u
)
return
;
C
=
T
.
Cartesian3
.
dot
(
M
,
s
)
/
m
}
else
{
if
(
Math
.
abs
(
m
)
<
z
.
CesiumMath
.
EPSILON6
)
return
;
var
d
=
1
/
m
;
if
(
i
=
T
.
Cartesian3
.
subtract
(
c
,
t
,
w
),(
o
=
T
.
Cartesian3
.
dot
(
i
,
f
)
*
d
)
<
0
||
1
<
o
)
return
;
if
(
s
=
T
.
Cartesian3
.
cross
(
i
,
h
,
R
),(
u
=
T
.
Cartesian3
.
dot
(
l
,
s
)
*
d
)
<
0
||
1
<
o
+
u
)
return
;
C
=
T
.
Cartesian3
.
dot
(
M
,
s
)
*
d
}
return
C
},
h
.
rayTriangle
=
function
(
a
,
t
,
e
,
r
,
n
,
i
){
var
s
=
h
.
rayTriangleParametric
(
a
,
t
,
e
,
r
,
n
);
if
(
q
.
defined
(
s
)
&&!
(
s
<
0
))
return
q
.
defined
(
i
)
||
(
i
=
new
T
.
Cartesian3
),
T
.
Cartesian3
.
multiplyByScalar
(
a
.
direction
,
s
,
i
),
T
.
Cartesian3
.
add
(
a
.
origin
,
i
,
i
)};
var
M
=
new
e
;
h
.
lineSegmentTriangle
=
function
(
a
,
t
,
e
,
r
,
n
,
i
,
s
){
var
o
=
M
;
T
.
Cartesian3
.
clone
(
a
,
o
.
origin
),
T
.
Cartesian3
.
subtract
(
t
,
a
,
o
.
direction
),
T
.
Cartesian3
.
normalize
(
o
.
direction
,
o
.
direction
);
var
u
=
h
.
rayTriangleParametric
(
o
,
e
,
r
,
n
,
i
);
if
(
!
(
!
q
.
defined
(
u
)
||
u
<
0
||
u
>
T
.
Cartesian3
.
distance
(
a
,
t
)))
return
q
.
defined
(
s
)
||
(
s
=
new
T
.
Cartesian3
),
T
.
Cartesian3
.
multiplyByScalar
(
o
.
direction
,
u
,
s
),
T
.
Cartesian3
.
add
(
o
.
origin
,
s
,
s
)};
var
f
=
{
root0
:
0
,
root1
:
0
};
function
u
(
a
,
t
,
e
){
q
.
defined
(
e
)
||
(
e
=
new
U
.
Interval
);
var
r
=
a
.
origin
,
n
=
a
.
direction
,
i
=
t
.
center
,
s
=
t
.
radius
*
t
.
radius
,
o
=
T
.
Cartesian3
.
subtract
(
r
,
i
,
p
),
u
=
function
(
a
,
t
,
e
,
r
){
var
n
=
t
*
t
-
4
*
a
*
e
;
if
(
!
(
n
<
0
)){
if
(
0
<
n
){
var
i
=
1
/
(
2
*
a
),
s
=
Math
.
sqrt
(
n
),
o
=
(
-
t
+
s
)
*
i
,
u
=
(
-
t
-
s
)
*
i
;
return
o
<
u
?(
r
.
root0
=
o
,
r
.
root1
=
u
):(
r
.
root0
=
u
,
r
.
root1
=
o
),
r
}
var
C
=-
t
/
(
2
*
a
);
if
(
0
!=
C
)
return
r
.
root0
=
r
.
root1
=
C
,
r
}}(
T
.
Cartesian3
.
dot
(
n
,
n
),
2
*
T
.
Cartesian3
.
dot
(
n
,
o
),
T
.
Cartesian3
.
magnitudeSquared
(
o
)
-
s
,
f
);
if
(
q
.
defined
(
u
))
return
e
.
start
=
u
.
root0
,
e
.
stop
=
u
.
root1
,
e
}
h
.
raySphere
=
function
(
a
,
t
,
e
){
if
(
e
=
u
(
a
,
t
,
e
),
q
.
defined
(
e
)
&&!
(
e
.
stop
<
0
))
return
e
.
start
=
Math
.
max
(
e
.
start
,
0
),
e
};
var
m
=
new
e
;
h
.
lineSegmentSphere
=
function
(
a
,
t
,
e
,
r
){
var
n
=
m
;
T
.
Cartesian3
.
clone
(
a
,
n
.
origin
);
var
i
=
T
.
Cartesian3
.
subtract
(
t
,
a
,
n
.
direction
),
s
=
T
.
Cartesian3
.
magnitude
(
i
);
if
(
T
.
Cartesian3
.
normalize
(
i
,
i
),
r
=
u
(
n
,
e
,
r
),
!
(
!
q
.
defined
(
r
)
||
r
.
stop
<
0
||
r
.
start
>
s
))
return
r
.
start
=
Math
.
max
(
r
.
start
,
0
),
r
.
stop
=
Math
.
min
(
r
.
stop
,
s
),
r
};
var
d
=
new
T
.
Cartesian3
,
S
=
new
T
.
Cartesian3
;
function
V
(
a
,
t
,
e
){
var
r
=
a
+
t
;
return
z
.
CesiumMath
.
sign
(
a
)
!==
z
.
CesiumMath
.
sign
(
t
)
&&
Math
.
abs
(
r
/
Math
.
max
(
Math
.
abs
(
a
),
Math
.
abs
(
t
)))
<
e
?
0
:
r
}
h
.
rayEllipsoid
=
function
(
a
,
t
){
var
e
,
r
,
n
,
i
,
s
,
o
=
t
.
oneOverRadii
,
u
=
T
.
Cartesian3
.
multiplyComponents
(
o
,
a
.
origin
,
d
),
C
=
T
.
Cartesian3
.
multiplyComponents
(
o
,
a
.
direction
,
S
),
c
=
T
.
Cartesian3
.
magnitudeSquared
(
u
),
l
=
T
.
Cartesian3
.
dot
(
u
,
C
);
if
(
1
<
c
){
if
(
0
<=
l
)
return
;
var
h
=
l
*
l
;
if
(
e
=
c
-
1
,
h
<
(
n
=
(
r
=
T
.
Cartesian3
.
magnitudeSquared
(
C
))
*
e
))
return
;
if
(
n
<
h
){
i
=
l
*
l
-
n
;
var
M
=
(
s
=-
l
+
Math
.
sqrt
(
i
))
/
r
,
f
=
e
/
s
;
return
M
<
f
?
new
U
.
Interval
(
M
,
f
):{
start
:
f
,
stop
:
M
}}
var
m
=
Math
.
sqrt
(
e
/
r
);
return
new
U
.
Interval
(
m
,
m
)}
return
c
<
1
?(
e
=
c
-
1
,
i
=
l
*
l
-
(
n
=
(
r
=
T
.
Cartesian3
.
magnitudeSquared
(
C
))
*
e
),
s
=-
l
+
Math
.
sqrt
(
i
),
new
U
.
Interval
(
0
,
s
/
r
)):
l
<
0
?(
r
=
T
.
Cartesian3
.
magnitudeSquared
(
C
),
new
U
.
Interval
(
0
,
-
l
/
r
)):
void
0
};
var
L
=
new
T
.
Cartesian3
,
I
=
new
T
.
Cartesian3
,
E
=
new
T
.
Cartesian3
,
Z
=
new
T
.
Cartesian3
,
A
=
new
T
.
Cartesian3
,
D
=
new
U
.
Matrix3
,
k
=
new
U
.
Matrix3
,
F
=
new
U
.
Matrix3
,
G
=
new
U
.
Matrix3
,
Y
=
new
U
.
Matrix3
,
_
=
new
U
.
Matrix3
,
j
=
new
U
.
Matrix3
,
H
=
new
T
.
Cartesian3
,
J
=
new
T
.
Cartesian3
,
K
=
new
T
.
Cartographic
;
h
.
grazingAltitudeLocation
=
function
(
a
,
t
){
var
e
=
a
.
origin
,
r
=
a
.
direction
;
if
(
!
T
.
Cartesian3
.
equals
(
e
,
T
.
Cartesian3
.
ZERO
)){
var
n
=
t
.
geodeticSurfaceNormal
(
e
,
L
);
if
(
0
<=
T
.
Cartesian3
.
dot
(
r
,
n
))
return
e
}
var
i
=
q
.
defined
(
this
.
rayEllipsoid
(
a
,
t
)),
s
=
t
.
transformPositionToScaledSpace
(
r
,
L
),
o
=
T
.
Cartesian3
.
normalize
(
s
,
s
),
u
=
T
.
Cartesian3
.
mostOrthogonalAxis
(
s
,
Z
),
C
=
T
.
Cartesian3
.
normalize
(
T
.
Cartesian3
.
cross
(
u
,
o
,
I
),
I
),
c
=
T
.
Cartesian3
.
normalize
(
T
.
Cartesian3
.
cross
(
o
,
C
,
E
),
E
),
l
=
D
;
l
[
0
]
=
o
.
x
,
l
[
1
]
=
o
.
y
,
l
[
2
]
=
o
.
z
,
l
[
3
]
=
C
.
x
,
l
[
4
]
=
C
.
y
,
l
[
5
]
=
C
.
z
,
l
[
6
]
=
c
.
x
,
l
[
7
]
=
c
.
y
,
l
[
8
]
=
c
.
z
;
var
h
=
U
.
Matrix3
.
transpose
(
l
,
k
),
M
=
U
.
Matrix3
.
fromScale
(
t
.
radii
,
F
),
f
=
U
.
Matrix3
.
fromScale
(
t
.
oneOverRadii
,
G
),
m
=
Y
;
m
[
0
]
=
0
,
m
[
1
]
=-
r
.
z
,
m
[
2
]
=
r
.
y
,
m
[
3
]
=
r
.
z
,
m
[
4
]
=
0
,
m
[
5
]
=-
r
.
x
,
m
[
6
]
=-
r
.
y
,
m
[
7
]
=
r
.
x
,
m
[
8
]
=
0
;
var
d
,
v
,
g
=
U
.
Matrix3
.
multiply
(
U
.
Matrix3
.
multiply
(
h
,
f
,
_
),
m
,
_
),
p
=
U
.
Matrix3
.
multiply
(
U
.
Matrix3
.
multiply
(
g
,
M
,
j
),
l
,
j
),
w
=
U
.
Matrix3
.
multiplyByVector
(
g
,
e
,
A
),
R
=
function
(
a
,
t
,
e
,
r
,
n
){
var
i
,
s
=
r
*
r
,
o
=
n
*
n
,
u
=
(
a
[
U
.
Matrix3
.
COLUMN1ROW1
]
-
a
[
U
.
Matrix3
.
COLUMN2ROW2
])
*
o
,
C
=
n
*
(
r
*
V
(
a
[
U
.
Matrix3
.
COLUMN1ROW0
],
a
[
U
.
Matrix3
.
COLUMN0ROW1
],
z
.
CesiumMath
.
EPSILON15
)
+
t
.
y
),
c
=
a
[
U
.
Matrix3
.
COLUMN0ROW0
]
*
s
+
a
[
U
.
Matrix3
.
COLUMN2ROW2
]
*
o
+
r
*
t
.
x
+
e
,
l
=
o
*
V
(
a
[
U
.
Matrix3
.
COLUMN2ROW1
],
a
[
U
.
Matrix3
.
COLUMN1ROW2
],
z
.
CesiumMath
.
EPSILON15
),
h
=
n
*
(
r
*
V
(
a
[
U
.
Matrix3
.
COLUMN2ROW0
],
a
[
U
.
Matrix3
.
COLUMN0ROW2
])
+
t
.
z
),
M
=
[];
if
(
0
==
h
&&
0
==
l
){
if
(
0
===
(
i
=
W
.
computeRealRoots
(
u
,
C
,
c
)).
length
)
return
M
;
var
f
=
i
[
0
],
m
=
Math
.
sqrt
(
Math
.
max
(
1
-
f
*
f
,
0
));
if
(
M
.
push
(
new
T
.
Cartesian3
(
r
,
n
*
f
,
n
*-
m
)),
M
.
push
(
new
T
.
Cartesian3
(
r
,
n
*
f
,
n
*
m
)),
2
===
i
.
length
){
var
d
=
i
[
1
],
v
=
Math
.
sqrt
(
Math
.
max
(
1
-
d
*
d
,
0
));
M
.
push
(
new
T
.
Cartesian3
(
r
,
n
*
d
,
n
*-
v
)),
M
.
push
(
new
T
.
Cartesian3
(
r
,
n
*
d
,
n
*
v
))}
return
M
}
var
g
=
h
*
h
,
p
=
l
*
l
,
w
=
h
*
l
,
R
=
u
*
u
+
p
,
S
=
2
*
(
C
*
u
+
w
),
O
=
2
*
c
*
u
+
C
*
C
-
p
+
g
,
x
=
2
*
(
c
*
C
-
w
),
y
=
c
*
c
-
g
;
if
(
0
==
R
&&
0
==
S
&&
0
==
O
&&
0
==
x
)
return
M
;
var
P
=
(
i
=
B
.
computeRealRoots
(
R
,
S
,
O
,
x
,
y
)).
length
;
if
(
0
===
P
)
return
M
;
for
(
var
N
=
0
;
N
<
P
;
++
N
){
var
b
=
i
[
N
],
q
=
b
*
b
,
L
=
Math
.
max
(
1
-
q
,
0
),
I
=
Math
.
sqrt
(
L
),
E
=
(
z
.
CesiumMath
.
sign
(
u
)
===
z
.
CesiumMath
.
sign
(
c
)?
V
(
u
*
q
+
c
,
C
*
b
,
z
.
CesiumMath
.
EPSILON12
):
z
.
CesiumMath
.
sign
(
c
)
===
z
.
CesiumMath
.
sign
(
C
*
b
)?
V
(
u
*
q
,
C
*
b
+
c
,
z
.
CesiumMath
.
EPSILON12
):
V
(
u
*
q
+
C
*
b
,
c
,
z
.
CesiumMath
.
EPSILON12
))
*
V
(
l
*
b
,
h
,
z
.
CesiumMath
.
EPSILON15
);
E
<
0
?
M
.
push
(
new
T
.
Cartesian3
(
r
,
n
*
b
,
n
*
I
)):
0
<
E
?
M
.
push
(
new
T
.
Cartesian3
(
r
,
n
*
b
,
n
*-
I
)):
0
!==
I
?(
M
.
push
(
new
T
.
Cartesian3
(
r
,
n
*
b
,
n
*-
I
)),
M
.
push
(
new
T
.
Cartesian3
(
r
,
n
*
b
,
n
*
I
)),
++
N
):
M
.
push
(
new
T
.
Cartesian3
(
r
,
n
*
b
,
n
*
I
))}
return
M
}(
p
,
T
.
Cartesian3
.
negate
(
w
,
L
),
0
,
0
,
1
),
S
=
R
.
length
;
if
(
0
<
S
){
for
(
var
O
=
T
.
Cartesian3
.
clone
(
T
.
Cartesian3
.
ZERO
,
J
),
x
=
Number
.
NEGATIVE_INFINITY
,
y
=
0
;
y
<
S
;
++
y
){
d
=
U
.
Matrix3
.
multiplyByVector
(
M
,
U
.
Matrix3
.
multiplyByVector
(
l
,
R
[
y
],
H
),
H
);
var
P
=
T
.
Cartesian3
.
normalize
(
T
.
Cartesian3
.
subtract
(
d
,
e
,
Z
),
Z
),
N
=
T
.
Cartesian3
.
dot
(
P
,
r
);
x
<
N
&&
(
x
=
N
,
O
=
T
.
Cartesian3
.
clone
(
d
,
O
))}
var
b
=
t
.
cartesianToCartographic
(
O
,
K
);
return
x
=
z
.
CesiumMath
.
clamp
(
x
,
0
,
1
),
v
=
T
.
Cartesian3
.
magnitude
(
T
.
Cartesian3
.
subtract
(
O
,
e
,
Z
))
*
Math
.
sqrt
(
1
-
x
*
x
),
v
=
i
?
-
v
:
v
,
b
.
height
=
v
,
t
.
cartographicToCartesian
(
b
,
new
T
.
Cartesian3
)}};
var
O
=
new
T
.
Cartesian3
;
h
.
lineSegmentPlane
=
function
(
a
,
t
,
e
,
r
){
q
.
defined
(
r
)
||
(
r
=
new
T
.
Cartesian3
);
var
n
=
T
.
Cartesian3
.
subtract
(
t
,
a
,
O
),
i
=
e
.
normal
,
s
=
T
.
Cartesian3
.
dot
(
i
,
n
);
if
(
!
(
Math
.
abs
(
s
)
<
z
.
CesiumMath
.
EPSILON6
)){
var
o
=
T
.
Cartesian3
.
dot
(
i
,
a
),
u
=-
(
e
.
distance
+
o
)
/
s
;
if
(
!
(
u
<
0
||
1
<
u
))
return
T
.
Cartesian3
.
multiplyByScalar
(
n
,
u
,
r
),
T
.
Cartesian3
.
add
(
a
,
r
,
r
),
r
}},
h
.
trianglePlaneIntersection
=
function
(
a
,
t
,
e
,
r
){
var
n
,
i
,
s
=
r
.
normal
,
o
=
r
.
distance
,
u
=
T
.
Cartesian3
.
dot
(
s
,
a
)
+
o
<
0
,
C
=
T
.
Cartesian3
.
dot
(
s
,
t
)
+
o
<
0
,
c
=
T
.
Cartesian3
.
dot
(
s
,
e
)
+
o
<
0
,
l
=
0
;
if
(
l
+=
u
?
1
:
0
,
l
+=
C
?
1
:
0
,
1
!=
(
l
+=
c
?
1
:
0
)
&&
2
!=
l
||
(
n
=
new
T
.
Cartesian3
,
i
=
new
T
.
Cartesian3
),
1
==
l
){
if
(
u
)
return
h
.
lineSegmentPlane
(
a
,
t
,
r
,
n
),
h
.
lineSegmentPlane
(
a
,
e
,
r
,
i
),{
positions
:[
a
,
t
,
e
,
n
,
i
],
indices
:[
0
,
3
,
4
,
1
,
2
,
4
,
1
,
4
,
3
]};
if
(
C
)
return
h
.
lineSegmentPlane
(
t
,
e
,
r
,
n
),
h
.
lineSegmentPlane
(
t
,
a
,
r
,
i
),{
positions
:[
a
,
t
,
e
,
n
,
i
],
indices
:[
1
,
3
,
4
,
2
,
0
,
4
,
2
,
4
,
3
]};
if
(
c
)
return
h
.
lineSegmentPlane
(
e
,
a
,
r
,
n
),
h
.
lineSegmentPlane
(
e
,
t
,
r
,
i
),{
positions
:[
a
,
t
,
e
,
n
,
i
],
indices
:[
2
,
3
,
4
,
0
,
1
,
4
,
0
,
4
,
3
]}}
else
if
(
2
==
l
){
if
(
!
u
)
return
h
.
lineSegmentPlane
(
t
,
a
,
r
,
n
),
h
.
lineSegmentPlane
(
e
,
a
,
r
,
i
),{
positions
:[
a
,
t
,
e
,
n
,
i
],
indices
:[
1
,
2
,
4
,
1
,
4
,
3
,
0
,
3
,
4
]};
if
(
!
C
)
return
h
.
lineSegmentPlane
(
e
,
t
,
r
,
n
),
h
.
lineSegmentPlane
(
a
,
t
,
r
,
i
),{
positions
:[
a
,
t
,
e
,
n
,
i
],
indices
:[
2
,
0
,
4
,
2
,
4
,
3
,
1
,
3
,
4
]};
if
(
!
c
)
return
h
.
lineSegmentPlane
(
a
,
e
,
r
,
n
),
h
.
lineSegmentPlane
(
t
,
e
,
r
,
i
),{
positions
:[
a
,
t
,
e
,
n
,
i
],
indices
:[
0
,
1
,
4
,
0
,
4
,
3
,
2
,
3
,
4
]}}},
a
.
IntersectionTests
=
h
,
a
.
Ray
=
e
});
vcm/lib/Cesium/Workers/Math-9d37f659.js
0 → 100644
View file @
c53f4211
/**
* Cesium - https://github.com/CesiumGS/cesium
*
* Copyright 2011-2020 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/master/LICENSE.md for full licensing details.
*/
define
([
"
exports
"
,
"
./when-60b00257
"
,
"
./Check-4274a1fd
"
],
function
(
t
,
r
,
n
){
"
use strict
"
;
function
i
(
t
){
null
==
t
&&
(
t
=
(
new
Date
).
getTime
()),
this
.
N
=
624
,
this
.
M
=
397
,
this
.
MATRIX_A
=
2567483615
,
this
.
UPPER_MASK
=
2147483648
,
this
.
LOWER_MASK
=
2147483647
,
this
.
mt
=
new
Array
(
this
.
N
),
this
.
mti
=
this
.
N
+
1
,
this
.
init_genrand
(
t
)}
i
.
prototype
.
init_genrand
=
function
(
t
){
for
(
this
.
mt
[
0
]
=
t
>>>
0
,
this
.
mti
=
1
;
this
.
mti
<
this
.
N
;
this
.
mti
++
){
t
=
this
.
mt
[
this
.
mti
-
1
]
^
this
.
mt
[
this
.
mti
-
1
]
>>>
30
;
this
.
mt
[
this
.
mti
]
=
(
1812433253
*
((
4294901760
&
t
)
>>>
16
)
<<
16
)
+
1812433253
*
(
65535
&
t
)
+
this
.
mti
,
this
.
mt
[
this
.
mti
]
>>>=
0
}},
i
.
prototype
.
genrand_int32
=
function
(){
var
t
,
n
=
new
Array
(
0
,
this
.
MATRIX_A
);
if
(
this
.
mti
>=
this
.
N
){
var
i
;
for
(
this
.
mti
==
this
.
N
+
1
&&
this
.
init_genrand
(
5489
),
i
=
0
;
i
<
this
.
N
-
this
.
M
;
i
++
)
t
=
this
.
mt
[
i
]
&
this
.
UPPER_MASK
|
this
.
mt
[
i
+
1
]
&
this
.
LOWER_MASK
,
this
.
mt
[
i
]
=
this
.
mt
[
i
+
this
.
M
]
^
t
>>>
1
^
n
[
1
&
t
];
for
(;
i
<
this
.
N
-
1
;
i
++
)
t
=
this
.
mt
[
i
]
&
this
.
UPPER_MASK
|
this
.
mt
[
i
+
1
]
&
this
.
LOWER_MASK
,
this
.
mt
[
i
]
=
this
.
mt
[
i
+
(
this
.
M
-
this
.
N
)]
^
t
>>>
1
^
n
[
1
&
t
];
t
=
this
.
mt
[
this
.
N
-
1
]
&
this
.
UPPER_MASK
|
this
.
mt
[
0
]
&
this
.
LOWER_MASK
,
this
.
mt
[
this
.
N
-
1
]
=
this
.
mt
[
this
.
M
-
1
]
^
t
>>>
1
^
n
[
1
&
t
],
this
.
mti
=
0
}
return
t
=
this
.
mt
[
this
.
mti
++
],
t
^=
t
>>>
11
,
t
^=
t
<<
7
&
2636928640
,
t
^=
t
<<
15
&
4022730752
,(
t
^=
t
>>>
18
)
>>>
0
},
i
.
prototype
.
random
=
function
(){
return
this
.
genrand_int32
()
*
(
1
/
4294967296
)};
var
h
=
{
EPSILON1
:.
1
,
EPSILON2
:.
01
,
EPSILON3
:.
001
,
EPSILON4
:
1
e
-
4
,
EPSILON5
:
1
e
-
5
,
EPSILON6
:
1
e
-
6
,
EPSILON7
:
1
e
-
7
,
EPSILON8
:
1
e
-
8
,
EPSILON9
:
1
e
-
9
,
EPSILON10
:
1
e
-
10
,
EPSILON11
:
1
e
-
11
,
EPSILON12
:
1
e
-
12
,
EPSILON13
:
1
e
-
13
,
EPSILON14
:
1
e
-
14
,
EPSILON15
:
1
e
-
15
,
EPSILON16
:
1
e
-
16
,
EPSILON17
:
1
e
-
17
,
EPSILON18
:
1
e
-
18
,
EPSILON19
:
1
e
-
19
,
EPSILON20
:
1
e
-
20
,
EPSILON21
:
1
e
-
21
,
GRAVITATIONALPARAMETER
:
3986004418
e5
,
SOLAR_RADIUS
:
6955
e5
,
LUNAR_RADIUS
:
1737400
,
SIXTY_FOUR_KILOBYTES
:
65536
,
FOUR_GIGABYTES
:
4294967296
};
h
.
sign
=
r
.
defaultValue
(
Math
.
sign
,
function
(
t
){
return
0
===
(
t
=+
t
)
||
t
!=
t
?
t
:
0
<
t
?
1
:
-
1
}),
h
.
signNotZero
=
function
(
t
){
return
t
<
0
?
-
1
:
1
},
h
.
toSNorm
=
function
(
t
,
n
){
return
n
=
r
.
defaultValue
(
n
,
255
),
Math
.
round
((.
5
*
h
.
clamp
(
t
,
-
1
,
1
)
+
.
5
)
*
n
)},
h
.
fromSNorm
=
function
(
t
,
n
){
return
n
=
r
.
defaultValue
(
n
,
255
),
h
.
clamp
(
t
,
0
,
n
)
/
n
*
2
-
1
},
h
.
normalize
=
function
(
t
,
n
,
i
){
return
0
===
(
i
=
Math
.
max
(
i
-
n
,
0
))?
0
:
h
.
clamp
((
t
-
n
)
/
i
,
0
,
1
)},
h
.
sinh
=
r
.
defaultValue
(
Math
.
sinh
,
function
(
t
){
return
(
Math
.
exp
(
t
)
-
Math
.
exp
(
-
t
))
/
2
}),
h
.
cosh
=
r
.
defaultValue
(
Math
.
cosh
,
function
(
t
){
return
(
Math
.
exp
(
t
)
+
Math
.
exp
(
-
t
))
/
2
}),
h
.
lerp
=
function
(
t
,
n
,
i
){
return
(
1
-
i
)
*
t
+
i
*
n
},
h
.
PI
=
Math
.
PI
,
h
.
ONE_OVER_PI
=
1
/
Math
.
PI
,
h
.
PI_OVER_TWO
=
Math
.
PI
/
2
,
h
.
PI_OVER_THREE
=
Math
.
PI
/
3
,
h
.
PI_OVER_FOUR
=
Math
.
PI
/
4
,
h
.
PI_OVER_SIX
=
Math
.
PI
/
6
,
h
.
THREE_PI_OVER_TWO
=
3
*
Math
.
PI
/
2
,
h
.
TWO_PI
=
2
*
Math
.
PI
,
h
.
ONE_OVER_TWO_PI
=
1
/
(
2
*
Math
.
PI
),
h
.
RADIANS_PER_DEGREE
=
Math
.
PI
/
180
,
h
.
DEGREES_PER_RADIAN
=
180
/
Math
.
PI
,
h
.
RADIANS_PER_ARCSECOND
=
h
.
RADIANS_PER_DEGREE
/
3600
,
h
.
toRadians
=
function
(
t
){
return
t
*
h
.
RADIANS_PER_DEGREE
},
h
.
toDegrees
=
function
(
t
){
return
t
*
h
.
DEGREES_PER_RADIAN
},
h
.
convertLongitudeRange
=
function
(
t
){
var
n
=
h
.
TWO_PI
,
i
=
t
-
Math
.
floor
(
t
/
n
)
*
n
;
return
i
<-
Math
.
PI
?
i
+
n
:
i
>=
Math
.
PI
?
i
-
n
:
i
},
h
.
clampToLatitudeRange
=
function
(
t
){
return
h
.
clamp
(
t
,
-
1
*
h
.
PI_OVER_TWO
,
h
.
PI_OVER_TWO
)},
h
.
negativePiToPi
=
function
(
t
){
return
h
.
zeroToTwoPi
(
t
+
h
.
PI
)
-
h
.
PI
},
h
.
zeroToTwoPi
=
function
(
t
){
var
n
=
h
.
mod
(
t
,
h
.
TWO_PI
);
return
Math
.
abs
(
n
)
<
h
.
EPSILON14
&&
Math
.
abs
(
t
)
>
h
.
EPSILON14
?
h
.
TWO_PI
:
n
},
h
.
mod
=
function
(
t
,
n
){
return
(
t
%
n
+
n
)
%
n
},
h
.
equalsEpsilon
=
function
(
t
,
n
,
i
,
a
){
a
=
r
.
defaultValue
(
a
,
i
);
var
e
=
Math
.
abs
(
t
-
n
);
return
e
<=
a
||
e
<=
i
*
Math
.
max
(
Math
.
abs
(
t
),
Math
.
abs
(
n
))},
h
.
lessThan
=
function
(
t
,
n
,
i
){
return
t
-
n
<-
i
},
h
.
lessThanOrEquals
=
function
(
t
,
n
,
i
){
return
t
-
n
<
i
},
h
.
greaterThan
=
function
(
t
,
n
,
i
){
return
i
<
t
-
n
},
h
.
greaterThanOrEquals
=
function
(
t
,
n
,
i
){
return
-
i
<
t
-
n
};
var
u
=
[
1
];
h
.
factorial
=
function
(
t
){
var
n
=
u
.
length
;
if
(
n
<=
t
)
for
(
var
i
=
u
[
n
-
1
],
a
=
n
;
a
<=
t
;
a
++
){
var
e
=
i
*
a
;
u
.
push
(
e
),
i
=
e
}
return
u
[
t
]},
h
.
incrementWrap
=
function
(
t
,
n
,
i
){
return
i
=
r
.
defaultValue
(
i
,
0
),
n
<++
t
&&
(
t
=
i
),
t
},
h
.
isPowerOfTwo
=
function
(
t
){
return
0
!==
t
&&
0
==
(
t
&
t
-
1
)},
h
.
nextPowerOfTwo
=
function
(
t
){
return
--
t
,
t
|=
t
>>
1
,
t
|=
t
>>
2
,
t
|=
t
>>
4
,
t
|=
t
>>
8
,
t
|=
t
>>
16
,
++
t
},
h
.
clamp
=
function
(
t
,
n
,
i
){
return
t
<
n
?
n
:
i
<
t
?
i
:
t
};
var
a
=
new
i
;
h
.
setRandomNumberSeed
=
function
(
t
){
a
=
new
i
(
t
)},
h
.
nextRandomNumber
=
function
(){
return
a
.
random
()},
h
.
randomBetween
=
function
(
t
,
n
){
return
h
.
nextRandomNumber
()
*
(
n
-
t
)
+
t
},
h
.
acosClamped
=
function
(
t
){
return
Math
.
acos
(
h
.
clamp
(
t
,
-
1
,
1
))},
h
.
asinClamped
=
function
(
t
){
return
Math
.
asin
(
h
.
clamp
(
t
,
-
1
,
1
))},
h
.
chordLength
=
function
(
t
,
n
){
return
2
*
n
*
Math
.
sin
(.
5
*
t
)},
h
.
logBase
=
function
(
t
,
n
){
return
Math
.
log
(
t
)
/
Math
.
log
(
n
)},
h
.
cbrt
=
r
.
defaultValue
(
Math
.
cbrt
,
function
(
t
){
var
n
=
Math
.
pow
(
Math
.
abs
(
t
),
1
/
3
);
return
t
<
0
?
-
n
:
n
}),
h
.
log2
=
r
.
defaultValue
(
Math
.
log2
,
function
(
t
){
return
Math
.
log
(
t
)
*
Math
.
LOG2E
}),
h
.
fog
=
function
(
t
,
n
){
var
i
=
t
*
n
;
return
1
-
Math
.
exp
(
-
i
*
i
)},
h
.
fastApproximateAtan
=
function
(
t
){
return
t
*
(
-
.
1784
*
Math
.
abs
(
t
)
-
.
0663
*
t
*
t
+
1.0301
)},
h
.
fastApproximateAtan2
=
function
(
t
,
n
){
var
i
,
a
,
e
=
Math
.
abs
(
t
);
i
=
Math
.
abs
(
n
),
a
=
Math
.
max
(
e
,
i
);
var
r
=
(
i
=
Math
.
min
(
e
,
i
))
/
a
;
return
e
=
h
.
fastApproximateAtan
(
r
),
e
=
Math
.
abs
(
n
)
>
Math
.
abs
(
t
)?
h
.
PI_OVER_TWO
-
e
:
e
,
e
=
t
<
0
?
h
.
PI
-
e
:
e
,
e
=
n
<
0
?
-
e
:
e
},
t
.
CesiumMath
=
h
});
vcm/lib/Cesium/Workers/OrientedBoundingBox-23288f54.js
0 → 100644
View file @
c53f4211
/**
* Cesium - https://github.com/CesiumGS/cesium
*
* Copyright 2011-2020 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/master/LICENSE.md for full licensing details.
*/
define
([
"
exports
"
,
"
./when-60b00257
"
,
"
./Check-4274a1fd
"
,
"
./Math-9d37f659
"
,
"
./Cartesian2-2951f601
"
,
"
./Transforms-53ff6d12
"
,
"
./Plane-df4a621e
"
,
"
./EllipsoidTangentPlane-f9b097b8
"
],
function
(
a
,
q
,
t
,
X
,
j
,
A
,
Z
,
G
){
"
use strict
"
;
function
T
(
a
,
t
){
this
.
center
=
j
.
Cartesian3
.
clone
(
q
.
defaultValue
(
a
,
j
.
Cartesian3
.
ZERO
)),
this
.
halfAxes
=
A
.
Matrix3
.
clone
(
q
.
defaultValue
(
t
,
A
.
Matrix3
.
ZERO
))}
T
.
packedLength
=
j
.
Cartesian3
.
packedLength
+
A
.
Matrix3
.
packedLength
,
T
.
pack
=
function
(
a
,
t
,
e
){
return
e
=
q
.
defaultValue
(
e
,
0
),
j
.
Cartesian3
.
pack
(
a
.
center
,
t
,
e
),
A
.
Matrix3
.
pack
(
a
.
halfAxes
,
t
,
e
+
j
.
Cartesian3
.
packedLength
),
t
},
T
.
unpack
=
function
(
a
,
t
,
e
){
return
t
=
q
.
defaultValue
(
t
,
0
),
q
.
defined
(
e
)
||
(
e
=
new
T
),
j
.
Cartesian3
.
unpack
(
a
,
t
,
e
.
center
),
A
.
Matrix3
.
unpack
(
a
,
t
+
j
.
Cartesian3
.
packedLength
,
e
.
halfAxes
),
e
};
var
R
=
new
j
.
Cartesian3
,
I
=
new
j
.
Cartesian3
,
E
=
new
j
.
Cartesian3
,
L
=
new
j
.
Cartesian3
,
z
=
new
j
.
Cartesian3
,
S
=
new
j
.
Cartesian3
,
U
=
new
A
.
Matrix3
,
V
=
{
unitary
:
new
A
.
Matrix3
,
diagonal
:
new
A
.
Matrix3
};
T
.
fromPoints
=
function
(
a
,
t
){
if
(
q
.
defined
(
t
)
||
(
t
=
new
T
),
!
q
.
defined
(
a
)
||
0
===
a
.
length
)
return
t
.
halfAxes
=
A
.
Matrix3
.
ZERO
,
t
.
center
=
j
.
Cartesian3
.
ZERO
,
t
;
var
e
,
n
=
a
.
length
,
r
=
j
.
Cartesian3
.
clone
(
a
[
0
],
R
);
for
(
e
=
1
;
e
<
n
;
e
++
)
j
.
Cartesian3
.
add
(
r
,
a
[
e
],
r
);
var
i
=
1
/
n
;
j
.
Cartesian3
.
multiplyByScalar
(
r
,
i
,
r
);
var
s
,
o
=
0
,
C
=
0
,
c
=
0
,
u
=
0
,
d
=
0
,
l
=
0
;
for
(
e
=
0
;
e
<
n
;
e
++
)
o
+=
(
s
=
j
.
Cartesian3
.
subtract
(
a
[
e
],
r
,
I
)).
x
*
s
.
x
,
C
+=
s
.
x
*
s
.
y
,
c
+=
s
.
x
*
s
.
z
,
u
+=
s
.
y
*
s
.
y
,
d
+=
s
.
y
*
s
.
z
,
l
+=
s
.
z
*
s
.
z
;
o
*=
i
,
C
*=
i
,
c
*=
i
,
u
*=
i
,
d
*=
i
,
l
*=
i
;
var
h
=
U
;
h
[
0
]
=
o
,
h
[
1
]
=
C
,
h
[
2
]
=
c
,
h
[
3
]
=
C
,
h
[
4
]
=
u
,
h
[
5
]
=
d
,
h
[
6
]
=
c
,
h
[
7
]
=
d
,
h
[
8
]
=
l
;
var
x
=
A
.
Matrix3
.
computeEigenDecomposition
(
h
,
V
),
M
=
A
.
Matrix3
.
clone
(
x
.
unitary
,
t
.
halfAxes
),
m
=
A
.
Matrix3
.
getColumn
(
M
,
0
,
L
),
f
=
A
.
Matrix3
.
getColumn
(
M
,
1
,
z
),
p
=
A
.
Matrix3
.
getColumn
(
M
,
2
,
S
),
g
=-
Number
.
MAX_VALUE
,
w
=-
Number
.
MAX_VALUE
,
y
=-
Number
.
MAX_VALUE
,
b
=
Number
.
MAX_VALUE
,
O
=
Number
.
MAX_VALUE
,
P
=
Number
.
MAX_VALUE
;
for
(
e
=
0
;
e
<
n
;
e
++
)
s
=
a
[
e
],
g
=
Math
.
max
(
j
.
Cartesian3
.
dot
(
m
,
s
),
g
),
w
=
Math
.
max
(
j
.
Cartesian3
.
dot
(
f
,
s
),
w
),
y
=
Math
.
max
(
j
.
Cartesian3
.
dot
(
p
,
s
),
y
),
b
=
Math
.
min
(
j
.
Cartesian3
.
dot
(
m
,
s
),
b
),
O
=
Math
.
min
(
j
.
Cartesian3
.
dot
(
f
,
s
),
O
),
P
=
Math
.
min
(
j
.
Cartesian3
.
dot
(
p
,
s
),
P
);
m
=
j
.
Cartesian3
.
multiplyByScalar
(
m
,.
5
*
(
b
+
g
),
m
),
f
=
j
.
Cartesian3
.
multiplyByScalar
(
f
,.
5
*
(
O
+
w
),
f
),
p
=
j
.
Cartesian3
.
multiplyByScalar
(
p
,.
5
*
(
P
+
y
),
p
);
var
N
=
j
.
Cartesian3
.
add
(
m
,
f
,
t
.
center
);
j
.
Cartesian3
.
add
(
N
,
p
,
N
);
var
v
=
E
;
return
v
.
x
=
g
-
b
,
v
.
y
=
w
-
O
,
v
.
z
=
y
-
P
,
j
.
Cartesian3
.
multiplyByScalar
(
v
,.
5
,
v
),
A
.
Matrix3
.
multiplyByScale
(
t
.
halfAxes
,
v
,
t
.
halfAxes
),
t
};
var
M
=
new
j
.
Cartesian3
,
m
=
new
j
.
Cartesian3
;
function
F
(
a
,
t
,
e
,
n
,
r
,
i
,
s
,
o
,
C
,
c
,
u
){
q
.
defined
(
u
)
||
(
u
=
new
T
);
var
d
=
u
.
halfAxes
;
A
.
Matrix3
.
setColumn
(
d
,
0
,
t
,
d
),
A
.
Matrix3
.
setColumn
(
d
,
1
,
e
,
d
),
A
.
Matrix3
.
setColumn
(
d
,
2
,
n
,
d
);
var
l
=
M
;
l
.
x
=
(
r
+
i
)
/
2
,
l
.
y
=
(
s
+
o
)
/
2
,
l
.
z
=
(
C
+
c
)
/
2
;
var
h
=
m
;
h
.
x
=
(
i
-
r
)
/
2
,
h
.
y
=
(
o
-
s
)
/
2
,
h
.
z
=
(
c
-
C
)
/
2
;
var
x
=
u
.
center
;
return
l
=
A
.
Matrix3
.
multiplyByVector
(
d
,
l
,
l
),
j
.
Cartesian3
.
add
(
a
,
l
,
x
),
A
.
Matrix3
.
multiplyByScale
(
d
,
h
,
d
),
u
}
var
Y
=
new
j
.
Cartographic
,
H
=
new
j
.
Cartesian3
,
J
=
new
j
.
Cartographic
,
K
=
new
j
.
Cartographic
,
Q
=
new
j
.
Cartographic
,
$
=
new
j
.
Cartographic
,
aa
=
new
j
.
Cartographic
,
ta
=
new
j
.
Cartesian3
,
ea
=
new
j
.
Cartesian3
,
na
=
new
j
.
Cartesian3
,
ra
=
new
j
.
Cartesian3
,
ia
=
new
j
.
Cartesian3
,
sa
=
new
j
.
Cartesian2
,
oa
=
new
j
.
Cartesian2
,
Ca
=
new
j
.
Cartesian2
,
ca
=
new
j
.
Cartesian2
,
ua
=
new
j
.
Cartesian2
,
da
=
new
j
.
Cartesian3
,
la
=
new
j
.
Cartesian3
,
ha
=
new
j
.
Cartesian3
,
xa
=
new
j
.
Cartesian3
,
Ma
=
new
j
.
Cartesian2
,
ma
=
new
j
.
Cartesian3
,
fa
=
new
j
.
Cartesian3
,
pa
=
new
j
.
Cartesian3
,
ga
=
new
Z
.
Plane
(
j
.
Cartesian3
.
UNIT_X
,
0
);
T
.
fromRectangle
=
function
(
a
,
t
,
e
,
n
,
r
){
var
i
,
s
,
o
,
C
,
c
,
u
,
d
;
if
(
t
=
q
.
defaultValue
(
t
,
0
),
e
=
q
.
defaultValue
(
e
,
0
),
n
=
q
.
defaultValue
(
n
,
j
.
Ellipsoid
.
WGS84
),
a
.
width
<=
X
.
CesiumMath
.
PI
){
var
l
=
j
.
Rectangle
.
center
(
a
,
Y
),
h
=
n
.
cartographicToCartesian
(
l
,
H
),
x
=
new
G
.
EllipsoidTangentPlane
(
h
,
n
);
d
=
x
.
plane
;
var
M
=
l
.
longitude
,
m
=
a
.
south
<
0
&&
0
<
a
.
north
?
0
:
l
.
latitude
,
f
=
j
.
Cartographic
.
fromRadians
(
M
,
a
.
north
,
e
,
J
),
p
=
j
.
Cartographic
.
fromRadians
(
a
.
west
,
a
.
north
,
e
,
K
),
g
=
j
.
Cartographic
.
fromRadians
(
a
.
west
,
m
,
e
,
Q
),
w
=
j
.
Cartographic
.
fromRadians
(
a
.
west
,
a
.
south
,
e
,
$
),
y
=
j
.
Cartographic
.
fromRadians
(
M
,
a
.
south
,
e
,
aa
),
b
=
n
.
cartographicToCartesian
(
f
,
ta
),
O
=
n
.
cartographicToCartesian
(
p
,
ea
),
P
=
n
.
cartographicToCartesian
(
g
,
na
),
N
=
n
.
cartographicToCartesian
(
w
,
ra
),
v
=
n
.
cartographicToCartesian
(
y
,
ia
),
A
=
x
.
projectPointToNearestOnPlane
(
b
,
sa
),
T
=
x
.
projectPointToNearestOnPlane
(
O
,
oa
),
R
=
x
.
projectPointToNearestOnPlane
(
P
,
Ca
),
I
=
x
.
projectPointToNearestOnPlane
(
N
,
ca
),
E
=
x
.
projectPointToNearestOnPlane
(
v
,
ua
);
return
s
=-
(
i
=
Math
.
min
(
T
.
x
,
R
.
x
,
I
.
x
)),
C
=
Math
.
max
(
T
.
y
,
A
.
y
),
o
=
Math
.
min
(
I
.
y
,
E
.
y
),
p
.
height
=
w
.
height
=
t
,
O
=
n
.
cartographicToCartesian
(
p
,
ea
),
N
=
n
.
cartographicToCartesian
(
w
,
ra
),
c
=
Math
.
min
(
Z
.
Plane
.
getPointDistance
(
d
,
O
),
Z
.
Plane
.
getPointDistance
(
d
,
N
)),
u
=
e
,
F
(
x
.
origin
,
x
.
xAxis
,
x
.
yAxis
,
x
.
zAxis
,
i
,
s
,
o
,
C
,
c
,
u
,
r
)}
var
L
=
0
<
a
.
south
,
z
=
a
.
north
<
0
,
S
=
L
?
a
.
south
:
z
?
a
.
north
:
0
,
U
=
j
.
Rectangle
.
center
(
a
,
Y
).
longitude
,
V
=
j
.
Cartesian3
.
fromRadians
(
U
,
S
,
e
,
n
,
da
);
V
.
z
=
0
;
var
B
=
Math
.
abs
(
V
.
x
)
<
X
.
CesiumMath
.
EPSILON10
&&
Math
.
abs
(
V
.
y
)
<
X
.
CesiumMath
.
EPSILON10
?
j
.
Cartesian3
.
UNIT_X
:
j
.
Cartesian3
.
normalize
(
V
,
la
),
_
=
j
.
Cartesian3
.
UNIT_Z
,
k
=
j
.
Cartesian3
.
cross
(
B
,
_
,
ha
);
d
=
Z
.
Plane
.
fromPointNormal
(
V
,
B
,
ga
);
var
W
=
j
.
Cartesian3
.
fromRadians
(
U
+
X
.
CesiumMath
.
PI_OVER_TWO
,
S
,
e
,
n
,
xa
);
i
=-
(
s
=
j
.
Cartesian3
.
dot
(
Z
.
Plane
.
projectPointOntoPlane
(
d
,
W
,
Ma
),
k
)),
C
=
j
.
Cartesian3
.
fromRadians
(
0
,
a
.
north
,
z
?
t
:
e
,
n
,
ma
).
z
,
o
=
j
.
Cartesian3
.
fromRadians
(
0
,
a
.
south
,
L
?
t
:
e
,
n
,
fa
).
z
;
var
D
=
j
.
Cartesian3
.
fromRadians
(
a
.
east
,
S
,
e
,
n
,
pa
);
return
F
(
V
,
k
,
_
,
B
,
i
,
s
,
o
,
C
,
c
=
Z
.
Plane
.
getPointDistance
(
d
,
D
),
u
=
0
,
r
)},
T
.
clone
=
function
(
a
,
t
){
if
(
q
.
defined
(
a
))
return
q
.
defined
(
t
)?(
j
.
Cartesian3
.
clone
(
a
.
center
,
t
.
center
),
A
.
Matrix3
.
clone
(
a
.
halfAxes
,
t
.
halfAxes
),
t
):
new
T
(
a
.
center
,
a
.
halfAxes
)},
T
.
intersectPlane
=
function
(
a
,
t
){
var
e
=
a
.
center
,
n
=
t
.
normal
,
r
=
a
.
halfAxes
,
i
=
n
.
x
,
s
=
n
.
y
,
o
=
n
.
z
,
C
=
Math
.
abs
(
i
*
r
[
A
.
Matrix3
.
COLUMN0ROW0
]
+
s
*
r
[
A
.
Matrix3
.
COLUMN0ROW1
]
+
o
*
r
[
A
.
Matrix3
.
COLUMN0ROW2
])
+
Math
.
abs
(
i
*
r
[
A
.
Matrix3
.
COLUMN1ROW0
]
+
s
*
r
[
A
.
Matrix3
.
COLUMN1ROW1
]
+
o
*
r
[
A
.
Matrix3
.
COLUMN1ROW2
])
+
Math
.
abs
(
i
*
r
[
A
.
Matrix3
.
COLUMN2ROW0
]
+
s
*
r
[
A
.
Matrix3
.
COLUMN2ROW1
]
+
o
*
r
[
A
.
Matrix3
.
COLUMN2ROW2
]),
c
=
j
.
Cartesian3
.
dot
(
n
,
e
)
+
t
.
distance
;
return
c
<=-
C
?
A
.
Intersect
.
OUTSIDE
:
C
<=
c
?
A
.
Intersect
.
INSIDE
:
A
.
Intersect
.
INTERSECTING
};
var
x
=
new
j
.
Cartesian3
,
f
=
new
j
.
Cartesian3
,
p
=
new
j
.
Cartesian3
,
h
=
new
j
.
Cartesian3
;
T
.
distanceSquaredTo
=
function
(
a
,
t
){
var
e
=
j
.
Cartesian3
.
subtract
(
t
,
a
.
center
,
M
),
n
=
a
.
halfAxes
,
r
=
A
.
Matrix3
.
getColumn
(
n
,
0
,
x
),
i
=
A
.
Matrix3
.
getColumn
(
n
,
1
,
f
),
s
=
A
.
Matrix3
.
getColumn
(
n
,
2
,
p
),
o
=
j
.
Cartesian3
.
magnitude
(
r
),
C
=
j
.
Cartesian3
.
magnitude
(
i
),
c
=
j
.
Cartesian3
.
magnitude
(
s
);
j
.
Cartesian3
.
normalize
(
r
,
r
),
j
.
Cartesian3
.
normalize
(
i
,
i
),
j
.
Cartesian3
.
normalize
(
s
,
s
);
var
u
=
h
;
u
.
x
=
j
.
Cartesian3
.
dot
(
e
,
r
),
u
.
y
=
j
.
Cartesian3
.
dot
(
e
,
i
),
u
.
z
=
j
.
Cartesian3
.
dot
(
e
,
s
);
var
d
,
l
=
0
;
return
u
.
x
<-
o
?
l
+=
(
d
=
u
.
x
+
o
)
*
d
:
u
.
x
>
o
&&
(
l
+=
(
d
=
u
.
x
-
o
)
*
d
),
u
.
y
<-
C
?
l
+=
(
d
=
u
.
y
+
C
)
*
d
:
u
.
y
>
C
&&
(
l
+=
(
d
=
u
.
y
-
C
)
*
d
),
u
.
z
<-
c
?
l
+=
(
d
=
u
.
z
+
c
)
*
d
:
u
.
z
>
c
&&
(
l
+=
(
d
=
u
.
z
-
c
)
*
d
),
l
};
var
g
=
new
j
.
Cartesian3
,
w
=
new
j
.
Cartesian3
;
T
.
computePlaneDistances
=
function
(
a
,
t
,
e
,
n
){
q
.
defined
(
n
)
||
(
n
=
new
A
.
Interval
);
var
r
=
Number
.
POSITIVE_INFINITY
,
i
=
Number
.
NEGATIVE_INFINITY
,
s
=
a
.
center
,
o
=
a
.
halfAxes
,
C
=
A
.
Matrix3
.
getColumn
(
o
,
0
,
x
),
c
=
A
.
Matrix3
.
getColumn
(
o
,
1
,
f
),
u
=
A
.
Matrix3
.
getColumn
(
o
,
2
,
p
),
d
=
j
.
Cartesian3
.
add
(
C
,
c
,
g
);
j
.
Cartesian3
.
add
(
d
,
u
,
d
),
j
.
Cartesian3
.
add
(
d
,
s
,
d
);
var
l
=
j
.
Cartesian3
.
subtract
(
d
,
t
,
w
),
h
=
j
.
Cartesian3
.
dot
(
e
,
l
);
return
r
=
Math
.
min
(
h
,
r
),
i
=
Math
.
max
(
h
,
i
),
j
.
Cartesian3
.
add
(
s
,
C
,
d
),
j
.
Cartesian3
.
add
(
d
,
c
,
d
),
j
.
Cartesian3
.
subtract
(
d
,
u
,
d
),
j
.
Cartesian3
.
subtract
(
d
,
t
,
l
),
h
=
j
.
Cartesian3
.
dot
(
e
,
l
),
r
=
Math
.
min
(
h
,
r
),
i
=
Math
.
max
(
h
,
i
),
j
.
Cartesian3
.
add
(
s
,
C
,
d
),
j
.
Cartesian3
.
subtract
(
d
,
c
,
d
),
j
.
Cartesian3
.
add
(
d
,
u
,
d
),
j
.
Cartesian3
.
subtract
(
d
,
t
,
l
),
h
=
j
.
Cartesian3
.
dot
(
e
,
l
),
r
=
Math
.
min
(
h
,
r
),
i
=
Math
.
max
(
h
,
i
),
j
.
Cartesian3
.
add
(
s
,
C
,
d
),
j
.
Cartesian3
.
subtract
(
d
,
c
,
d
),
j
.
Cartesian3
.
subtract
(
d
,
u
,
d
),
j
.
Cartesian3
.
subtract
(
d
,
t
,
l
),
h
=
j
.
Cartesian3
.
dot
(
e
,
l
),
r
=
Math
.
min
(
h
,
r
),
i
=
Math
.
max
(
h
,
i
),
j
.
Cartesian3
.
subtract
(
s
,
C
,
d
),
j
.
Cartesian3
.
add
(
d
,
c
,
d
),
j
.
Cartesian3
.
add
(
d
,
u
,
d
),
j
.
Cartesian3
.
subtract
(
d
,
t
,
l
),
h
=
j
.
Cartesian3
.
dot
(
e
,
l
),
r
=
Math
.
min
(
h
,
r
),
i
=
Math
.
max
(
h
,
i
),
j
.
Cartesian3
.
subtract
(
s
,
C
,
d
),
j
.
Cartesian3
.
add
(
d
,
c
,
d
),
j
.
Cartesian3
.
subtract
(
d
,
u
,
d
),
j
.
Cartesian3
.
subtract
(
d
,
t
,
l
),
h
=
j
.
Cartesian3
.
dot
(
e
,
l
),
r
=
Math
.
min
(
h
,
r
),
i
=
Math
.
max
(
h
,
i
),
j
.
Cartesian3
.
subtract
(
s
,
C
,
d
),
j
.
Cartesian3
.
subtract
(
d
,
c
,
d
),
j
.
Cartesian3
.
add
(
d
,
u
,
d
),
j
.
Cartesian3
.
subtract
(
d
,
t
,
l
),
h
=
j
.
Cartesian3
.
dot
(
e
,
l
),
r
=
Math
.
min
(
h
,
r
),
i
=
Math
.
max
(
h
,
i
),
j
.
Cartesian3
.
subtract
(
s
,
C
,
d
),
j
.
Cartesian3
.
subtract
(
d
,
c
,
d
),
j
.
Cartesian3
.
subtract
(
d
,
u
,
d
),
j
.
Cartesian3
.
subtract
(
d
,
t
,
l
),
h
=
j
.
Cartesian3
.
dot
(
e
,
l
),
r
=
Math
.
min
(
h
,
r
),
i
=
Math
.
max
(
h
,
i
),
n
.
start
=
r
,
n
.
stop
=
i
,
n
};
var
n
=
new
A
.
BoundingSphere
;
T
.
isOccluded
=
function
(
a
,
t
){
var
e
=
A
.
BoundingSphere
.
fromOrientedBoundingBox
(
a
,
n
);
return
!
t
.
isBoundingSphereVisible
(
e
)},
T
.
prototype
.
intersectPlane
=
function
(
a
){
return
T
.
intersectPlane
(
this
,
a
)},
T
.
prototype
.
distanceSquaredTo
=
function
(
a
){
return
T
.
distanceSquaredTo
(
this
,
a
)},
T
.
prototype
.
computePlaneDistances
=
function
(
a
,
t
,
e
){
return
T
.
computePlaneDistances
(
this
,
a
,
t
,
e
)},
T
.
prototype
.
isOccluded
=
function
(
a
){
return
T
.
isOccluded
(
this
,
a
)},
T
.
equals
=
function
(
a
,
t
){
return
a
===
t
||
q
.
defined
(
a
)
&&
q
.
defined
(
t
)
&&
j
.
Cartesian3
.
equals
(
a
.
center
,
t
.
center
)
&&
A
.
Matrix3
.
equals
(
a
.
halfAxes
,
t
.
halfAxes
)},
T
.
prototype
.
clone
=
function
(
a
){
return
T
.
clone
(
this
,
a
)},
T
.
prototype
.
equals
=
function
(
a
){
return
T
.
equals
(
this
,
a
)},
a
.
OrientedBoundingBox
=
T
});
vcm/lib/Cesium/Workers/Plane-df4a621e.js
0 → 100644
View file @
c53f4211
/**
* Cesium - https://github.com/CesiumGS/cesium
*
* Copyright 2011-2020 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/master/LICENSE.md for full licensing details.
*/
define
([
"
exports
"
,
"
./when-60b00257
"
,
"
./Check-4274a1fd
"
,
"
./Math-9d37f659
"
,
"
./Cartesian2-2951f601
"
,
"
./Transforms-53ff6d12
"
],
function
(
n
,
i
,
a
,
e
,
o
,
t
){
"
use strict
"
;
function
s
(
n
,
a
){
this
.
normal
=
o
.
Cartesian3
.
clone
(
n
),
this
.
distance
=
a
}
s
.
fromPointNormal
=
function
(
n
,
a
,
e
){
var
t
=-
o
.
Cartesian3
.
dot
(
a
,
n
);
return
i
.
defined
(
e
)?(
o
.
Cartesian3
.
clone
(
a
,
e
.
normal
),
e
.
distance
=
t
,
e
):
new
s
(
a
,
t
)};
var
r
=
new
o
.
Cartesian3
;
s
.
fromCartesian4
=
function
(
n
,
a
){
var
e
=
o
.
Cartesian3
.
fromCartesian4
(
n
,
r
),
t
=
n
.
w
;
return
i
.
defined
(
a
)?(
o
.
Cartesian3
.
clone
(
e
,
a
.
normal
),
a
.
distance
=
t
,
a
):
new
s
(
e
,
t
)},
s
.
getPointDistance
=
function
(
n
,
a
){
return
o
.
Cartesian3
.
dot
(
n
.
normal
,
a
)
+
n
.
distance
};
var
c
=
new
o
.
Cartesian3
;
s
.
projectPointOntoPlane
=
function
(
n
,
a
,
e
){
i
.
defined
(
e
)
||
(
e
=
new
o
.
Cartesian3
);
var
t
=
s
.
getPointDistance
(
n
,
a
),
r
=
o
.
Cartesian3
.
multiplyByScalar
(
n
.
normal
,
t
,
c
);
return
o
.
Cartesian3
.
subtract
(
a
,
r
,
e
)};
var
l
=
new
o
.
Cartesian3
;
s
.
transform
=
function
(
n
,
a
,
e
){
return
t
.
Matrix4
.
multiplyByPointAsVector
(
a
,
n
.
normal
,
r
),
o
.
Cartesian3
.
normalize
(
r
,
r
),
o
.
Cartesian3
.
multiplyByScalar
(
n
.
normal
,
-
n
.
distance
,
l
),
t
.
Matrix4
.
multiplyByPoint
(
a
,
l
,
l
),
s
.
fromPointNormal
(
l
,
r
,
e
)},
s
.
clone
=
function
(
n
,
a
){
return
i
.
defined
(
a
)?(
o
.
Cartesian3
.
clone
(
n
.
normal
,
a
.
normal
),
a
.
distance
=
n
.
distance
,
a
):
new
s
(
n
.
normal
,
n
.
distance
)},
s
.
equals
=
function
(
n
,
a
){
return
n
.
distance
===
a
.
distance
&&
o
.
Cartesian3
.
equals
(
n
.
normal
,
a
.
normal
)},
s
.
ORIGIN_XY_PLANE
=
Object
.
freeze
(
new
s
(
o
.
Cartesian3
.
UNIT_Z
,
0
)),
s
.
ORIGIN_YZ_PLANE
=
Object
.
freeze
(
new
s
(
o
.
Cartesian3
.
UNIT_X
,
0
)),
s
.
ORIGIN_ZX_PLANE
=
Object
.
freeze
(
new
s
(
o
.
Cartesian3
.
UNIT_Y
,
0
)),
n
.
Plane
=
s
});
vcm/lib/Cesium/Workers/PolygonGeometryLibrary-a2bb8196.js
0 → 100644
View file @
c53f4211
/**
* Cesium - https://github.com/CesiumGS/cesium
*
* Copyright 2011-2020 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/master/LICENSE.md for full licensing details.
*/
define
([
"
exports
"
,
"
./when-60b00257
"
,
"
./Math-9d37f659
"
,
"
./Cartesian2-2951f601
"
,
"
./Transforms-53ff6d12
"
,
"
./ComponentDatatype-a29c6075
"
,
"
./GeometryAttribute-2f728681
"
,
"
./GeometryAttributes-130e4d69
"
,
"
./GeometryPipeline-7b394c2b
"
,
"
./IndexDatatype-527cbd94
"
,
"
./arrayRemoveDuplicates-ac049603
"
,
"
./ArcType-a321d0d9
"
,
"
./EllipsoidRhumbLine-cbcd6a13
"
,
"
./PolygonPipeline-72c6abb2
"
],
function
(
e
,
I
,
x
,
E
,
y
,
A
,
P
,
_
,
d
,
G
,
L
,
M
,
v
,
D
){
"
use strict
"
;
function
S
(){
this
.
_array
=
[],
this
.
_offset
=
0
,
this
.
_length
=
0
}
Object
.
defineProperties
(
S
.
prototype
,{
length
:{
get
:
function
(){
return
this
.
_length
}}}),
S
.
prototype
.
enqueue
=
function
(
e
){
this
.
_array
.
push
(
e
),
this
.
_length
++
},
S
.
prototype
.
dequeue
=
function
(){
if
(
0
!==
this
.
_length
){
var
e
=
this
.
_array
,
t
=
this
.
_offset
,
r
=
e
[
t
];
return
e
[
t
]
=
void
0
,
10
<++
t
&&
2
*
t
>
e
.
length
&&
(
this
.
_array
=
e
.
slice
(
t
),
t
=
0
),
this
.
_offset
=
t
,
this
.
_length
--
,
r
}},
S
.
prototype
.
peek
=
function
(){
if
(
0
!==
this
.
_length
)
return
this
.
_array
[
this
.
_offset
]},
S
.
prototype
.
contains
=
function
(
e
){
return
-
1
!==
this
.
_array
.
indexOf
(
e
)},
S
.
prototype
.
clear
=
function
(){
this
.
_array
.
length
=
this
.
_offset
=
this
.
_length
=
0
},
S
.
prototype
.
sort
=
function
(
e
){
0
<
this
.
_offset
&&
(
this
.
_array
=
this
.
_array
.
slice
(
this
.
_offset
),
this
.
_offset
=
0
),
this
.
_array
.
sort
(
e
)};
var
R
=
{
computeHierarchyPackedLength
:
function
(
e
){
for
(
var
t
=
0
,
r
=
[
e
];
0
<
r
.
length
;){
var
i
=
r
.
pop
();
if
(
I
.
defined
(
i
)){
t
+=
2
;
var
n
=
i
.
positions
,
a
=
i
.
holes
;
if
(
I
.
defined
(
n
)
&&
(
t
+=
n
.
length
*
E
.
Cartesian3
.
packedLength
),
I
.
defined
(
a
))
for
(
var
o
=
a
.
length
,
s
=
0
;
s
<
o
;
++
s
)
r
.
push
(
a
[
s
])}}
return
t
},
packPolygonHierarchy
:
function
(
e
,
t
,
r
){
for
(
var
i
=
[
e
];
0
<
i
.
length
;){
var
n
=
i
.
pop
();
if
(
I
.
defined
(
n
)){
var
a
=
n
.
positions
,
o
=
n
.
holes
;
if
(
t
[
r
++
]
=
I
.
defined
(
a
)?
a
.
length
:
0
,
t
[
r
++
]
=
I
.
defined
(
o
)?
o
.
length
:
0
,
I
.
defined
(
a
))
for
(
var
s
=
a
.
length
,
u
=
0
;
u
<
s
;
++
u
,
r
+=
3
)
E
.
Cartesian3
.
pack
(
a
[
u
],
t
,
r
);
if
(
I
.
defined
(
o
))
for
(
var
l
=
o
.
length
,
h
=
0
;
h
<
l
;
++
h
)
i
.
push
(
o
[
h
])}}
return
r
},
unpackPolygonHierarchy
:
function
(
e
,
t
){
for
(
var
r
=
e
[
t
++
],
i
=
e
[
t
++
],
n
=
new
Array
(
r
),
a
=
0
<
i
?
new
Array
(
i
):
void
0
,
o
=
0
;
o
<
r
;
++
o
,
t
+=
E
.
Cartesian3
.
packedLength
)
n
[
o
]
=
E
.
Cartesian3
.
unpack
(
e
,
t
);
for
(
var
s
=
0
;
s
<
i
;
++
s
)
a
[
s
]
=
R
.
unpackPolygonHierarchy
(
e
,
t
),
t
=
a
[
s
].
startingIndex
,
delete
a
[
s
].
startingIndex
;
return
{
positions
:
n
,
holes
:
a
,
startingIndex
:
t
}}},
g
=
new
E
.
Cartesian3
;
R
.
subdivideLineCount
=
function
(
e
,
t
,
r
){
var
i
=
E
.
Cartesian3
.
distance
(
e
,
t
)
/
r
,
n
=
Math
.
max
(
0
,
Math
.
ceil
(
x
.
CesiumMath
.
log2
(
i
)));
return
Math
.
pow
(
2
,
n
)};
var
m
=
new
E
.
Cartographic
,
C
=
new
E
.
Cartographic
,
b
=
new
E
.
Cartographic
,
w
=
new
E
.
Cartesian3
;
R
.
subdivideRhumbLineCount
=
function
(
e
,
t
,
r
,
i
){
var
n
=
e
.
cartesianToCartographic
(
t
,
m
),
a
=
e
.
cartesianToCartographic
(
r
,
C
),
o
=
new
v
.
EllipsoidRhumbLine
(
n
,
a
,
e
).
surfaceDistance
/
i
,
s
=
Math
.
max
(
0
,
Math
.
ceil
(
x
.
CesiumMath
.
log2
(
o
)));
return
Math
.
pow
(
2
,
s
)},
R
.
subdivideLine
=
function
(
e
,
t
,
r
,
i
){
var
n
=
R
.
subdivideLineCount
(
e
,
t
,
r
),
a
=
E
.
Cartesian3
.
distance
(
e
,
t
),
o
=
a
/
n
;
I
.
defined
(
i
)
||
(
i
=
[]);
var
s
=
i
;
s
.
length
=
3
*
n
;
for
(
var
u
,
l
,
h
,
c
,
f
=
0
,
p
=
0
;
p
<
n
;
p
++
){
var
d
=
(
u
=
e
,
l
=
t
,
h
=
p
*
o
,
c
=
a
,
E
.
Cartesian3
.
subtract
(
l
,
u
,
g
),
E
.
Cartesian3
.
multiplyByScalar
(
g
,
h
/
c
,
g
),
E
.
Cartesian3
.
add
(
u
,
g
,
g
),[
g
.
x
,
g
.
y
,
g
.
z
]);
s
[
f
++
]
=
d
[
0
],
s
[
f
++
]
=
d
[
1
],
s
[
f
++
]
=
d
[
2
]}
return
s
},
R
.
subdivideRhumbLine
=
function
(
e
,
t
,
r
,
i
,
n
){
var
a
=
e
.
cartesianToCartographic
(
t
,
m
),
o
=
e
.
cartesianToCartographic
(
r
,
C
),
s
=
new
v
.
EllipsoidRhumbLine
(
a
,
o
,
e
),
u
=
s
.
surfaceDistance
/
i
,
l
=
Math
.
max
(
0
,
Math
.
ceil
(
x
.
CesiumMath
.
log2
(
u
))),
h
=
Math
.
pow
(
2
,
l
),
c
=
s
.
surfaceDistance
/
h
;
I
.
defined
(
n
)
||
(
n
=
[]);
var
f
=
n
;
f
.
length
=
3
*
h
;
for
(
var
p
=
0
,
d
=
0
;
d
<
h
;
d
++
){
var
y
=
s
.
interpolateUsingSurfaceDistance
(
d
*
c
,
b
),
g
=
e
.
cartographicToCartesian
(
y
,
w
);
f
[
p
++
]
=
g
.
x
,
f
[
p
++
]
=
g
.
y
,
f
[
p
++
]
=
g
.
z
}
return
f
};
var
f
=
new
E
.
Cartesian3
,
p
=
new
E
.
Cartesian3
,
T
=
new
E
.
Cartesian3
,
N
=
new
E
.
Cartesian3
;
R
.
scaleToGeodeticHeightExtruded
=
function
(
e
,
t
,
r
,
i
,
n
){
i
=
I
.
defaultValue
(
i
,
E
.
Ellipsoid
.
WGS84
);
var
a
=
f
,
o
=
p
,
s
=
T
,
u
=
N
;
if
(
I
.
defined
(
e
)
&&
I
.
defined
(
e
.
attributes
)
&&
I
.
defined
(
e
.
attributes
.
position
))
for
(
var
l
=
e
.
attributes
.
position
.
values
,
h
=
l
.
length
/
2
,
c
=
0
;
c
<
h
;
c
+=
3
)
E
.
Cartesian3
.
fromArray
(
l
,
c
,
s
),
i
.
geodeticSurfaceNormal
(
s
,
a
),
u
=
i
.
scaleToGeodeticSurface
(
s
,
u
),
o
=
E
.
Cartesian3
.
multiplyByScalar
(
a
,
r
,
o
),
o
=
E
.
Cartesian3
.
add
(
u
,
o
,
o
),
l
[
c
+
h
]
=
o
.
x
,
l
[
c
+
1
+
h
]
=
o
.
y
,
l
[
c
+
2
+
h
]
=
o
.
z
,
n
&&
(
u
=
E
.
Cartesian3
.
clone
(
s
,
u
)),
o
=
E
.
Cartesian3
.
multiplyByScalar
(
a
,
t
,
o
),
o
=
E
.
Cartesian3
.
add
(
u
,
o
,
o
),
l
[
c
]
=
o
.
x
,
l
[
c
+
1
]
=
o
.
y
,
l
[
c
+
2
]
=
o
.
z
;
return
e
},
R
.
polygonOutlinesFromHierarchy
=
function
(
e
,
t
,
r
){
var
i
,
n
,
a
,
o
=
[],
s
=
new
S
;
for
(
s
.
enqueue
(
e
);
0
!==
s
.
length
;){
var
u
=
s
.
dequeue
(),
l
=
u
.
positions
;
if
(
t
)
for
(
a
=
l
.
length
,
i
=
0
;
i
<
a
;
i
++
)
r
.
scaleToGeodeticSurface
(
l
[
i
],
l
[
i
]);
if
(
!
((
l
=
L
.
arrayRemoveDuplicates
(
l
,
E
.
Cartesian3
.
equalsEpsilon
,
!
0
)).
length
<
3
)){
var
h
=
u
.
holes
?
u
.
holes
.
length
:
0
;
for
(
i
=
0
;
i
<
h
;
i
++
){
var
c
=
u
.
holes
[
i
],
f
=
c
.
positions
;
if
(
t
)
for
(
a
=
f
.
length
,
n
=
0
;
n
<
a
;
++
n
)
r
.
scaleToGeodeticSurface
(
f
[
n
],
f
[
n
]);
if
(
!
((
f
=
L
.
arrayRemoveDuplicates
(
f
,
E
.
Cartesian3
.
equalsEpsilon
,
!
0
)).
length
<
3
)){
o
.
push
(
f
);
var
p
=
0
;
for
(
I
.
defined
(
c
.
holes
)
&&
(
p
=
c
.
holes
.
length
),
n
=
0
;
n
<
p
;
n
++
)
s
.
enqueue
(
c
.
holes
[
n
])}}
o
.
push
(
l
)}}
return
o
},
R
.
polygonsFromHierarchy
=
function
(
e
,
t
,
r
,
i
){
var
n
=
[],
a
=
[],
o
=
new
S
;
for
(
o
.
enqueue
(
e
);
0
!==
o
.
length
;){
var
s
,
u
,
l
=
o
.
dequeue
(),
h
=
l
.
positions
,
c
=
l
.
holes
;
if
(
r
)
for
(
u
=
h
.
length
,
s
=
0
;
s
<
u
;
s
++
)
i
.
scaleToGeodeticSurface
(
h
[
s
],
h
[
s
]);
if
(
!
((
h
=
L
.
arrayRemoveDuplicates
(
h
,
E
.
Cartesian3
.
equalsEpsilon
,
!
0
)).
length
<
3
)){
var
f
=
t
(
h
);
if
(
I
.
defined
(
f
)){
var
p
=
[],
d
=
D
.
PolygonPipeline
.
computeWindingOrder2D
(
f
);
d
===
D
.
WindingOrder
.
CLOCKWISE
&&
(
f
.
reverse
(),
h
=
h
.
slice
().
reverse
());
var
y
,
g
=
h
.
slice
(),
v
=
I
.
defined
(
c
)?
c
.
length
:
0
,
m
=
[];
for
(
s
=
0
;
s
<
v
;
s
++
){
var
C
=
c
[
s
],
b
=
C
.
positions
;
if
(
r
)
for
(
u
=
b
.
length
,
y
=
0
;
y
<
u
;
++
y
)
i
.
scaleToGeodeticSurface
(
b
[
y
],
b
[
y
]);
if
(
!
((
b
=
L
.
arrayRemoveDuplicates
(
b
,
E
.
Cartesian3
.
equalsEpsilon
,
!
0
)).
length
<
3
)){
var
w
=
t
(
b
);
if
(
I
.
defined
(
w
)){(
d
=
D
.
PolygonPipeline
.
computeWindingOrder2D
(
w
))
===
D
.
WindingOrder
.
CLOCKWISE
&&
(
w
.
reverse
(),
b
=
b
.
slice
().
reverse
()),
m
.
push
(
b
),
p
.
push
(
g
.
length
),
g
=
g
.
concat
(
b
),
f
=
f
.
concat
(
w
);
var
T
=
0
;
for
(
I
.
defined
(
C
.
holes
)
&&
(
T
=
C
.
holes
.
length
),
y
=
0
;
y
<
T
;
y
++
)
o
.
enqueue
(
C
.
holes
[
y
])}}}
n
.
push
({
outerRing
:
h
,
holes
:
m
}),
a
.
push
({
positions
:
g
,
positions2D
:
f
,
holes
:
p
})}}}
return
{
hierarchy
:
n
,
polygons
:
a
}};
var
O
=
new
E
.
Cartesian2
,
q
=
new
E
.
Cartesian3
,
B
=
new
y
.
Quaternion
,
H
=
new
y
.
Matrix3
;
R
.
computeBoundingRectangle
=
function
(
e
,
t
,
r
,
i
,
n
){
for
(
var
a
=
y
.
Quaternion
.
fromAxisAngle
(
e
,
i
,
B
),
o
=
y
.
Matrix3
.
fromQuaternion
(
a
,
H
),
s
=
Number
.
POSITIVE_INFINITY
,
u
=
Number
.
NEGATIVE_INFINITY
,
l
=
Number
.
POSITIVE_INFINITY
,
h
=
Number
.
NEGATIVE_INFINITY
,
c
=
r
.
length
,
f
=
0
;
f
<
c
;
++
f
){
var
p
=
E
.
Cartesian3
.
clone
(
r
[
f
],
q
);
y
.
Matrix3
.
multiplyByVector
(
o
,
p
,
p
);
var
d
=
t
(
p
,
O
);
I
.
defined
(
d
)
&&
(
s
=
Math
.
min
(
s
,
d
.
x
),
u
=
Math
.
max
(
u
,
d
.
x
),
l
=
Math
.
min
(
l
,
d
.
y
),
h
=
Math
.
max
(
h
,
d
.
y
))}
return
n
.
x
=
s
,
n
.
y
=
l
,
n
.
width
=
u
-
s
,
n
.
height
=
h
-
l
,
n
},
R
.
createGeometryFromPositions
=
function
(
e
,
t
,
r
,
i
,
n
,
a
){
var
o
=
D
.
PolygonPipeline
.
triangulate
(
t
.
positions2D
,
t
.
holes
);
o
.
length
<
3
&&
(
o
=
[
0
,
1
,
2
]);
var
s
=
t
.
positions
;
if
(
i
){
for
(
var
u
=
s
.
length
,
l
=
new
Array
(
3
*
u
),
h
=
0
,
c
=
0
;
c
<
u
;
c
++
){
var
f
=
s
[
c
];
l
[
h
++
]
=
f
.
x
,
l
[
h
++
]
=
f
.
y
,
l
[
h
++
]
=
f
.
z
}
var
p
=
new
P
.
Geometry
({
attributes
:{
position
:
new
P
.
GeometryAttribute
({
componentDatatype
:
A
.
ComponentDatatype
.
DOUBLE
,
componentsPerAttribute
:
3
,
values
:
l
})},
indices
:
o
,
primitiveType
:
P
.
PrimitiveType
.
TRIANGLES
});
return
n
.
normal
?
d
.
GeometryPipeline
.
computeNormal
(
p
):
p
}
return
a
===
M
.
ArcType
.
GEODESIC
?
D
.
PolygonPipeline
.
computeSubdivision
(
e
,
s
,
o
,
r
):
a
===
M
.
ArcType
.
RHUMB
?
D
.
PolygonPipeline
.
computeRhumbLineSubdivision
(
e
,
s
,
o
,
r
):
void
0
};
var
k
=
[],
z
=
new
E
.
Cartesian3
,
W
=
new
E
.
Cartesian3
;
R
.
computeWallGeometry
=
function
(
e
,
t
,
r
,
i
,
n
){
var
a
,
o
,
s
,
u
,
l
,
h
=
e
.
length
,
c
=
0
;
if
(
i
)
for
(
o
=
3
*
h
*
2
,
a
=
new
Array
(
2
*
o
),
s
=
0
;
s
<
h
;
s
++
)
u
=
e
[
s
],
l
=
e
[(
s
+
1
)
%
h
],
a
[
c
]
=
a
[
c
+
o
]
=
u
.
x
,
a
[
++
c
]
=
a
[
c
+
o
]
=
u
.
y
,
a
[
++
c
]
=
a
[
c
+
o
]
=
u
.
z
,
a
[
++
c
]
=
a
[
c
+
o
]
=
l
.
x
,
a
[
++
c
]
=
a
[
c
+
o
]
=
l
.
y
,
a
[
++
c
]
=
a
[
c
+
o
]
=
l
.
z
,
++
c
;
else
{
var
f
=
x
.
CesiumMath
.
chordLength
(
r
,
t
.
maximumRadius
),
p
=
0
;
if
(
n
===
M
.
ArcType
.
GEODESIC
)
for
(
s
=
0
;
s
<
h
;
s
++
)
p
+=
R
.
subdivideLineCount
(
e
[
s
],
e
[(
s
+
1
)
%
h
],
f
);
else
if
(
n
===
M
.
ArcType
.
RHUMB
)
for
(
s
=
0
;
s
<
h
;
s
++
)
p
+=
R
.
subdivideRhumbLineCount
(
t
,
e
[
s
],
e
[(
s
+
1
)
%
h
],
f
);
for
(
o
=
3
*
(
p
+
h
),
a
=
new
Array
(
2
*
o
),
s
=
0
;
s
<
h
;
s
++
){
var
d
;
u
=
e
[
s
],
l
=
e
[(
s
+
1
)
%
h
],
n
===
M
.
ArcType
.
GEODESIC
?
d
=
R
.
subdivideLine
(
u
,
l
,
f
,
k
):
n
===
M
.
ArcType
.
RHUMB
&&
(
d
=
R
.
subdivideRhumbLine
(
t
,
u
,
l
,
f
,
k
));
for
(
var
y
=
d
.
length
,
g
=
0
;
g
<
y
;
++
g
,
++
c
)
a
[
c
]
=
d
[
g
],
a
[
c
+
o
]
=
d
[
g
];
a
[
c
]
=
l
.
x
,
a
[
c
+
o
]
=
l
.
x
,
a
[
++
c
]
=
l
.
y
,
a
[
c
+
o
]
=
l
.
y
,
a
[
++
c
]
=
l
.
z
,
a
[
c
+
o
]
=
l
.
z
,
++
c
}}
h
=
a
.
length
;
var
v
=
G
.
IndexDatatype
.
createTypedArray
(
h
/
3
,
h
-
6
*
e
.
length
),
m
=
0
;
for
(
h
/=
6
,
s
=
0
;
s
<
h
;
s
++
){
var
C
=
s
,
b
=
C
+
1
,
w
=
C
+
h
,
T
=
w
+
1
;
u
=
E
.
Cartesian3
.
fromArray
(
a
,
3
*
C
,
z
),
l
=
E
.
Cartesian3
.
fromArray
(
a
,
3
*
b
,
W
),
E
.
Cartesian3
.
equalsEpsilon
(
u
,
l
,
x
.
CesiumMath
.
EPSILON10
,
x
.
CesiumMath
.
EPSILON10
)
||
(
v
[
m
++
]
=
C
,
v
[
m
++
]
=
w
,
v
[
m
++
]
=
b
,
v
[
m
++
]
=
b
,
v
[
m
++
]
=
w
,
v
[
m
++
]
=
T
)}
return
new
P
.
Geometry
({
attributes
:
new
_
.
GeometryAttributes
({
position
:
new
P
.
GeometryAttribute
({
componentDatatype
:
A
.
ComponentDatatype
.
DOUBLE
,
componentsPerAttribute
:
3
,
values
:
a
})}),
indices
:
v
,
primitiveType
:
P
.
PrimitiveType
.
TRIANGLES
})},
e
.
PolygonGeometryLibrary
=
R
});
vcm/lib/Cesium/Workers/PolygonPipeline-72c6abb2.js
0 → 100644
View file @
c53f4211
/**
* Cesium - https://github.com/CesiumGS/cesium
*
* Copyright 2011-2020 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/master/LICENSE.md for full licensing details.
*/
define
([
"
exports
"
,
"
./when-60b00257
"
,
"
./Check-4274a1fd
"
,
"
./Math-9d37f659
"
,
"
./Cartesian2-2951f601
"
,
"
./WebGLConstants-779bf0bc
"
,
"
./ComponentDatatype-a29c6075
"
,
"
./GeometryAttribute-2f728681
"
,
"
./EllipsoidRhumbLine-cbcd6a13
"
],
function
(
e
,
T
,
t
,
W
,
P
,
n
,
I
,
B
,
N
){
"
use strict
"
;
function
r
(
e
,
t
,
n
){
n
=
n
||
2
;
var
r
,
a
,
i
,
x
,
u
,
o
,
s
,
p
=
t
&&
t
.
length
,
h
=
p
?
t
[
0
]
*
n
:
e
.
length
,
f
=
l
(
e
,
0
,
h
,
n
,
!
0
),
y
=
[];
if
(
!
f
||
f
.
next
===
f
.
prev
)
return
y
;
if
(
p
&&
(
f
=
function
(
e
,
t
,
n
,
r
){
var
a
,
i
,
x
,
u
,
o
,
s
=
[];
for
(
a
=
0
,
i
=
t
.
length
;
a
<
i
;
a
++
)
x
=
t
[
a
]
*
r
,
u
=
a
<
i
-
1
?
t
[
a
+
1
]
*
r
:
e
.
length
,(
o
=
l
(
e
,
x
,
u
,
r
,
!
1
))
===
o
.
next
&&
(
o
.
steiner
=!
0
),
s
.
push
(
b
(
o
));
for
(
s
.
sort
(
m
),
a
=
0
;
a
<
s
.
length
;
a
++
)
C
(
s
[
a
],
n
),
n
=
c
(
n
,
n
.
next
);
return
n
}(
e
,
t
,
f
,
n
)),
e
.
length
>
80
*
n
){
r
=
i
=
e
[
0
],
a
=
x
=
e
[
1
];
for
(
var
v
=
n
;
v
<
h
;
v
+=
n
)(
u
=
e
[
v
])
<
r
&&
(
r
=
u
),(
o
=
e
[
v
+
1
])
<
a
&&
(
a
=
o
),
i
<
u
&&
(
i
=
u
),
x
<
o
&&
(
x
=
o
);
s
=
0
!==
(
s
=
Math
.
max
(
i
-
r
,
x
-
a
))?
1
/
s
:
0
}
return
d
(
f
,
y
,
n
,
r
,
a
,
s
),
y
}
function
l
(
e
,
t
,
n
,
r
,
a
){
var
i
,
x
;
if
(
a
===
0
<
z
(
e
,
t
,
n
,
r
))
for
(
i
=
t
;
i
<
n
;
i
+=
r
)
x
=
u
(
i
,
e
[
i
],
e
[
i
+
1
],
x
);
else
for
(
i
=
n
-
r
;
t
<=
i
;
i
-=
r
)
x
=
u
(
i
,
e
[
i
],
e
[
i
+
1
],
x
);
return
x
&&
v
(
x
,
x
.
next
)
&&
(
A
(
x
),
x
=
x
.
next
),
x
}
function
c
(
e
,
t
){
if
(
!
e
)
return
e
;
t
=
t
||
e
;
var
n
,
r
=
e
;
do
{
if
(
n
=!
1
,
r
.
steiner
||!
v
(
r
,
r
.
next
)
&&
0
!==
E
(
r
.
prev
,
r
,
r
.
next
))
r
=
r
.
next
;
else
{
if
(
A
(
r
),(
r
=
t
=
r
.
prev
)
===
r
.
next
)
break
;
n
=!
0
}}
while
(
n
||
r
!==
t
);
return
t
}
function
d
(
e
,
t
,
n
,
r
,
a
,
i
,
x
){
if
(
e
){
!
x
&&
i
&&
function
(
e
,
t
,
n
,
r
){
var
a
=
e
;
for
(;
null
===
a
.
z
&&
(
a
.
z
=
g
(
a
.
x
,
a
.
y
,
t
,
n
,
r
)),
a
.
prevZ
=
a
.
prev
,
a
.
nextZ
=
a
.
next
,
a
=
a
.
next
,
a
!==
e
;);
a
.
prevZ
.
nextZ
=
null
,
a
.
prevZ
=
null
,
function
(
e
){
var
t
,
n
,
r
,
a
,
i
,
x
,
u
,
o
,
s
=
1
;
do
{
for
(
n
=
e
,
i
=
e
=
null
,
x
=
0
;
n
;){
for
(
x
++
,
r
=
n
,
t
=
u
=
0
;
t
<
s
&&
(
u
++
,
r
=
r
.
nextZ
);
t
++
);
for
(
o
=
s
;
0
<
u
||
0
<
o
&&
r
;)
0
!==
u
&&
(
0
===
o
||!
r
||
n
.
z
<=
r
.
z
)?(
n
=
(
a
=
n
).
nextZ
,
u
--
):(
r
=
(
a
=
r
).
nextZ
,
o
--
),
i
?
i
.
nextZ
=
a
:
e
=
a
,
a
.
prevZ
=
i
,
i
=
a
;
n
=
r
}
i
.
nextZ
=
null
,
s
*=
2
}
while
(
1
<
x
)}(
a
)}(
e
,
r
,
a
,
i
);
for
(
var
u
,
o
,
s
=
e
;
e
.
prev
!==
e
.
next
;)
if
(
u
=
e
.
prev
,
o
=
e
.
next
,
i
?
h
(
e
,
r
,
a
,
i
):
p
(
e
))
t
.
push
(
u
.
i
/
n
),
t
.
push
(
e
.
i
/
n
),
t
.
push
(
o
.
i
/
n
),
A
(
e
),
e
=
o
.
next
,
s
=
o
.
next
;
else
if
((
e
=
o
)
===
s
){
x
?
1
===
x
?
d
(
e
=
f
(
c
(
e
),
t
,
n
),
t
,
n
,
r
,
a
,
i
,
2
):
2
===
x
&&
y
(
e
,
t
,
n
,
r
,
a
,
i
):
d
(
c
(
e
),
t
,
n
,
r
,
a
,
i
,
1
);
break
}}}
function
p
(
e
){
var
t
=
e
.
prev
,
n
=
e
,
r
=
e
.
next
;
if
(
!
(
0
<=
E
(
t
,
n
,
r
))){
for
(
var
a
=
e
.
next
.
next
;
a
!==
e
.
prev
;){
if
(
w
(
t
.
x
,
t
.
y
,
n
.
x
,
n
.
y
,
r
.
x
,
r
.
y
,
a
.
x
,
a
.
y
)
&&
0
<=
E
(
a
.
prev
,
a
,
a
.
next
))
return
;
a
=
a
.
next
}
return
1
}}
function
h
(
e
,
t
,
n
,
r
){
var
a
=
e
.
prev
,
i
=
e
,
x
=
e
.
next
;
if
(
!
(
0
<=
E
(
a
,
i
,
x
))){
for
(
var
u
=
a
.
x
<
i
.
x
?
a
.
x
<
x
.
x
?
a
.
x
:
x
.
x
:
i
.
x
<
x
.
x
?
i
.
x
:
x
.
x
,
o
=
a
.
y
<
i
.
y
?
a
.
y
<
x
.
y
?
a
.
y
:
x
.
y
:
i
.
y
<
x
.
y
?
i
.
y
:
x
.
y
,
s
=
a
.
x
>
i
.
x
?
a
.
x
>
x
.
x
?
a
.
x
:
x
.
x
:
i
.
x
>
x
.
x
?
i
.
x
:
x
.
x
,
p
=
a
.
y
>
i
.
y
?
a
.
y
>
x
.
y
?
a
.
y
:
x
.
y
:
i
.
y
>
x
.
y
?
i
.
y
:
x
.
y
,
h
=
g
(
u
,
o
,
t
,
n
,
r
),
f
=
g
(
s
,
p
,
t
,
n
,
r
),
y
=
e
.
prevZ
,
v
=
e
.
nextZ
;
y
&&
y
.
z
>=
h
&&
v
&&
v
.
z
<=
f
;){
if
(
y
!==
e
.
prev
&&
y
!==
e
.
next
&&
w
(
a
.
x
,
a
.
y
,
i
.
x
,
i
.
y
,
x
.
x
,
x
.
y
,
y
.
x
,
y
.
y
)
&&
0
<=
E
(
y
.
prev
,
y
,
y
.
next
))
return
;
if
(
y
=
y
.
prevZ
,
v
!==
e
.
prev
&&
v
!==
e
.
next
&&
w
(
a
.
x
,
a
.
y
,
i
.
x
,
i
.
y
,
x
.
x
,
x
.
y
,
v
.
x
,
v
.
y
)
&&
0
<=
E
(
v
.
prev
,
v
,
v
.
next
))
return
;
v
=
v
.
nextZ
}
for
(;
y
&&
y
.
z
>=
h
;){
if
(
y
!==
e
.
prev
&&
y
!==
e
.
next
&&
w
(
a
.
x
,
a
.
y
,
i
.
x
,
i
.
y
,
x
.
x
,
x
.
y
,
y
.
x
,
y
.
y
)
&&
0
<=
E
(
y
.
prev
,
y
,
y
.
next
))
return
;
y
=
y
.
prevZ
}
for
(;
v
&&
v
.
z
<=
f
;){
if
(
v
!==
e
.
prev
&&
v
!==
e
.
next
&&
w
(
a
.
x
,
a
.
y
,
i
.
x
,
i
.
y
,
x
.
x
,
x
.
y
,
v
.
x
,
v
.
y
)
&&
0
<=
E
(
v
.
prev
,
v
,
v
.
next
))
return
;
v
=
v
.
nextZ
}
return
1
}}
function
f
(
e
,
t
,
n
){
var
r
=
e
;
do
{
var
a
=
r
.
prev
,
i
=
r
.
next
.
next
;
!
v
(
a
,
i
)
&&
M
(
a
,
r
,
r
.
next
,
i
)
&&
Z
(
a
,
i
)
&&
Z
(
i
,
a
)
&&
(
t
.
push
(
a
.
i
/
n
),
t
.
push
(
r
.
i
/
n
),
t
.
push
(
i
.
i
/
n
),
A
(
r
),
A
(
r
.
next
),
r
=
e
=
i
),
r
=
r
.
next
}
while
(
r
!==
e
);
return
c
(
r
)}
function
y
(
e
,
t
,
n
,
r
,
a
,
i
){
var
x
,
u
,
o
=
e
;
do
{
for
(
var
s
=
o
.
next
.
next
;
s
!==
o
.
prev
;){
if
(
o
.
i
!==
s
.
i
&&
(
u
=
s
,(
x
=
o
).
next
.
i
!==
u
.
i
&&
x
.
prev
.
i
!==
u
.
i
&&!
function
(
e
,
t
){
var
n
=
e
;
do
{
if
(
n
.
i
!==
e
.
i
&&
n
.
next
.
i
!==
e
.
i
&&
n
.
i
!==
t
.
i
&&
n
.
next
.
i
!==
t
.
i
&&
M
(
n
,
n
.
next
,
e
,
t
))
return
1
;
n
=
n
.
next
}
while
(
n
!==
e
);
return
}(
x
,
u
)
&&
(
Z
(
x
,
u
)
&&
Z
(
u
,
x
)
&&
function
(
e
,
t
){
var
n
=
e
,
r
=!
1
,
a
=
(
e
.
x
+
t
.
x
)
/
2
,
i
=
(
e
.
y
+
t
.
y
)
/
2
;
for
(;
n
.
y
>
i
!=
n
.
next
.
y
>
i
&&
n
.
next
.
y
!==
n
.
y
&&
a
<
(
n
.
next
.
x
-
n
.
x
)
*
(
i
-
n
.
y
)
/
(
n
.
next
.
y
-
n
.
y
)
+
n
.
x
&&
(
r
=!
r
),
n
=
n
.
next
,
n
!==
e
;);
return
r
}(
x
,
u
)
&&
(
E
(
x
.
prev
,
x
,
u
.
prev
)
||
E
(
x
,
u
.
prev
,
u
))
||
v
(
x
,
u
)
&&
0
<
E
(
x
.
prev
,
x
,
x
.
next
)
&&
0
<
E
(
u
.
prev
,
u
,
u
.
next
)))){
var
p
=
S
(
o
,
s
);
return
o
=
c
(
o
,
o
.
next
),
p
=
c
(
p
,
p
.
next
),
d
(
o
,
t
,
n
,
r
,
a
,
i
),
void
d
(
p
,
t
,
n
,
r
,
a
,
i
)}
s
=
s
.
next
}
o
=
o
.
next
}
while
(
o
!==
e
)}
function
m
(
e
,
t
){
return
e
.
x
-
t
.
x
}
function
C
(
e
,
t
){
if
(
t
=
function
(
e
,
t
){
var
n
,
r
=
t
,
a
=
e
.
x
,
i
=
e
.
y
,
x
=-
1
/
0
;
do
{
if
(
i
<=
r
.
y
&&
i
>=
r
.
next
.
y
&&
r
.
next
.
y
!==
r
.
y
){
var
u
=
r
.
x
+
(
i
-
r
.
y
)
*
(
r
.
next
.
x
-
r
.
x
)
/
(
r
.
next
.
y
-
r
.
y
);
if
(
u
<=
a
&&
x
<
u
){
if
((
x
=
u
)
===
a
){
if
(
i
===
r
.
y
)
return
r
;
if
(
i
===
r
.
next
.
y
)
return
r
.
next
}
n
=
r
.
x
<
r
.
next
.
x
?
r
:
r
.
next
}}
r
=
r
.
next
}
while
(
r
!==
t
);
if
(
!
n
)
return
null
;
if
(
a
===
x
)
return
n
;
var
o
,
s
=
n
,
p
=
n
.
x
,
h
=
n
.
y
,
f
=
1
/
0
;
r
=
n
;
for
(;
a
>=
r
.
x
&&
r
.
x
>=
p
&&
a
!==
r
.
x
&&
w
(
i
<
h
?
a
:
x
,
i
,
p
,
h
,
i
<
h
?
x
:
a
,
i
,
r
.
x
,
r
.
y
)
&&
(
o
=
Math
.
abs
(
i
-
r
.
y
)
/
(
a
-
r
.
x
),
Z
(
r
,
e
)
&&
(
o
<
f
||
o
===
f
&&
(
r
.
x
>
n
.
x
||
r
.
x
===
n
.
x
&&
(
v
=
r
,
E
((
y
=
n
).
prev
,
y
,
v
.
prev
)
<
0
&&
E
(
v
.
next
,
y
,
y
.
next
)
<
0
)))
&&
(
n
=
r
,
f
=
o
)),
r
=
r
.
next
,
r
!==
s
;);
var
y
,
v
;
return
n
}(
e
,
t
)){
var
n
=
S
(
t
,
e
);
c
(
n
,
n
.
next
)}}
function
g
(
e
,
t
,
n
,
r
,
a
){
return
(
e
=
1431655765
&
((
e
=
858993459
&
((
e
=
252645135
&
((
e
=
16711935
&
((
e
=
32767
*
(
e
-
n
)
*
a
)
|
e
<<
8
))
|
e
<<
4
))
|
e
<<
2
))
|
e
<<
1
))
|
(
t
=
1431655765
&
((
t
=
858993459
&
((
t
=
252645135
&
((
t
=
16711935
&
((
t
=
32767
*
(
t
-
r
)
*
a
)
|
t
<<
8
))
|
t
<<
4
))
|
t
<<
2
))
|
t
<<
1
))
<<
1
}
function
b
(
e
){
for
(
var
t
=
e
,
n
=
e
;(
t
.
x
<
n
.
x
||
t
.
x
===
n
.
x
&&
t
.
y
<
n
.
y
)
&&
(
n
=
t
),(
t
=
t
.
next
)
!==
e
;);
return
n
}
function
w
(
e
,
t
,
n
,
r
,
a
,
i
,
x
,
u
){
return
0
<=
(
a
-
x
)
*
(
t
-
u
)
-
(
e
-
x
)
*
(
i
-
u
)
&&
0
<=
(
e
-
x
)
*
(
r
-
u
)
-
(
n
-
x
)
*
(
t
-
u
)
&&
0
<=
(
n
-
x
)
*
(
i
-
u
)
-
(
a
-
x
)
*
(
r
-
u
)}
function
E
(
e
,
t
,
n
){
return
(
t
.
y
-
e
.
y
)
*
(
n
.
x
-
t
.
x
)
-
(
t
.
x
-
e
.
x
)
*
(
n
.
y
-
t
.
y
)}
function
v
(
e
,
t
){
return
e
.
x
===
t
.
x
&&
e
.
y
===
t
.
y
}
function
M
(
e
,
t
,
n
,
r
){
var
a
=
s
(
E
(
e
,
t
,
n
)),
i
=
s
(
E
(
e
,
t
,
r
)),
x
=
s
(
E
(
n
,
r
,
e
)),
u
=
s
(
E
(
n
,
r
,
t
));
return
a
!==
i
&&
x
!==
u
||
(
0
===
a
&&
o
(
e
,
n
,
t
)
||
(
0
===
i
&&
o
(
e
,
r
,
t
)
||
(
0
===
x
&&
o
(
n
,
e
,
r
)
||!
(
0
!==
u
||!
o
(
n
,
t
,
r
)))))}
function
o
(
e
,
t
,
n
){
return
t
.
x
<=
Math
.
max
(
e
.
x
,
n
.
x
)
&&
t
.
x
>=
Math
.
min
(
e
.
x
,
n
.
x
)
&&
t
.
y
<=
Math
.
max
(
e
.
y
,
n
.
y
)
&&
t
.
y
>=
Math
.
min
(
e
.
y
,
n
.
y
)}
function
s
(
e
){
return
0
<
e
?
1
:
e
<
0
?
-
1
:
0
}
function
Z
(
e
,
t
){
return
E
(
e
.
prev
,
e
,
e
.
next
)
<
0
?
0
<=
E
(
e
,
t
,
e
.
next
)
&&
0
<=
E
(
e
,
e
.
prev
,
t
):
E
(
e
,
t
,
e
.
prev
)
<
0
||
E
(
e
,
e
.
next
,
t
)
<
0
}
function
S
(
e
,
t
){
var
n
=
new
x
(
e
.
i
,
e
.
x
,
e
.
y
),
r
=
new
x
(
t
.
i
,
t
.
x
,
t
.
y
),
a
=
e
.
next
,
i
=
t
.
prev
;
return
(
e
.
next
=
t
).
prev
=
e
,(
n
.
next
=
a
).
prev
=
n
,(
r
.
next
=
n
).
prev
=
r
,(
i
.
next
=
r
).
prev
=
i
,
r
}
function
u
(
e
,
t
,
n
,
r
){
var
a
=
new
x
(
e
,
t
,
n
);
return
r
?(
a
.
next
=
r
.
next
,(
a
.
prev
=
r
).
next
.
prev
=
a
,
r
.
next
=
a
):(
a
.
prev
=
a
).
next
=
a
,
a
}
function
A
(
e
){
e
.
next
.
prev
=
e
.
prev
,
e
.
prev
.
next
=
e
.
next
,
e
.
prevZ
&&
(
e
.
prevZ
.
nextZ
=
e
.
nextZ
),
e
.
nextZ
&&
(
e
.
nextZ
.
prevZ
=
e
.
prevZ
)}
function
x
(
e
,
t
,
n
){
this
.
i
=
e
,
this
.
x
=
t
,
this
.
y
=
n
,
this
.
prev
=
null
,
this
.
next
=
null
,
this
.
z
=
null
,
this
.
prevZ
=
null
,
this
.
nextZ
=
null
,
this
.
steiner
=!
1
}
function
z
(
e
,
t
,
n
,
r
){
for
(
var
a
=
0
,
i
=
t
,
x
=
n
-
r
;
i
<
n
;
i
+=
r
)
a
+=
(
e
[
x
]
-
e
[
i
])
*
(
e
[
i
+
1
]
+
e
[
x
+
1
]),
x
=
i
;
return
a
}
r
.
deviation
=
function
(
e
,
t
,
n
,
r
){
var
a
=
t
&&
t
.
length
,
i
=
a
?
t
[
0
]
*
n
:
e
.
length
,
x
=
Math
.
abs
(
z
(
e
,
0
,
i
,
n
));
if
(
a
)
for
(
var
u
=
0
,
o
=
t
.
length
;
u
<
o
;
u
++
){
var
s
=
t
[
u
]
*
n
,
p
=
u
<
o
-
1
?
t
[
u
+
1
]
*
n
:
e
.
length
;
x
-=
Math
.
abs
(
z
(
e
,
s
,
p
,
n
))}
var
h
=
0
;
for
(
u
=
0
;
u
<
r
.
length
;
u
+=
3
){
var
f
=
r
[
u
]
*
n
,
y
=
r
[
u
+
1
]
*
n
,
v
=
r
[
u
+
2
]
*
n
;
h
+=
Math
.
abs
((
e
[
f
]
-
e
[
v
])
*
(
e
[
1
+
y
]
-
e
[
1
+
f
])
-
(
e
[
f
]
-
e
[
y
])
*
(
e
[
1
+
v
]
-
e
[
1
+
f
]))}
return
0
===
x
&&
0
===
h
?
0
:
Math
.
abs
((
h
-
x
)
/
x
)},
r
.
flatten
=
function
(
e
){
for
(
var
t
=
e
[
0
][
0
].
length
,
n
=
{
vertices
:[],
holes
:[],
dimensions
:
t
},
r
=
0
,
a
=
0
;
a
<
e
.
length
;
a
++
){
for
(
var
i
=
0
;
i
<
e
[
a
].
length
;
i
++
)
for
(
var
x
=
0
;
x
<
t
;
x
++
)
n
.
vertices
.
push
(
e
[
a
][
i
][
x
]);
0
<
a
&&
(
r
+=
e
[
a
-
1
].
length
,
n
.
holes
.
push
(
r
))}
return
n
};
var
a
=
{
CLOCKWISE
:
n
.
WebGLConstants
.
CW
,
COUNTER_CLOCKWISE
:
n
.
WebGLConstants
.
CCW
,
validate
:
function
(
e
){
return
e
===
a
.
CLOCKWISE
||
e
===
a
.
COUNTER_CLOCKWISE
}},
i
=
Object
.
freeze
(
a
),
R
=
new
P
.
Cartesian3
,
L
=
new
P
.
Cartesian3
,
D
=
{
computeArea2D
:
function
(
e
){
for
(
var
t
=
e
.
length
,
n
=
0
,
r
=
t
-
1
,
a
=
0
;
a
<
t
;
r
=
a
++
){
var
i
=
e
[
r
],
x
=
e
[
a
];
n
+=
i
.
x
*
x
.
y
-
x
.
x
*
i
.
y
}
return
.
5
*
n
},
computeWindingOrder2D
:
function
(
e
){
return
0
<
D
.
computeArea2D
(
e
)?
i
.
COUNTER_CLOCKWISE
:
i
.
CLOCKWISE
},
triangulate
:
function
(
e
,
t
){
return
r
(
P
.
Cartesian2
.
packArray
(
e
),
t
,
2
)}},
U
=
new
P
.
Cartesian3
,
_
=
new
P
.
Cartesian3
,
K
=
new
P
.
Cartesian3
,
G
=
new
P
.
Cartesian3
,
O
=
new
P
.
Cartesian3
,
V
=
new
P
.
Cartesian3
,
k
=
new
P
.
Cartesian3
;
D
.
computeSubdivision
=
function
(
e
,
t
,
n
,
r
){
r
=
T
.
defaultValue
(
r
,
W
.
CesiumMath
.
RADIANS_PER_DEGREE
);
var
a
,
i
=
n
.
slice
(
0
),
x
=
t
.
length
,
u
=
new
Array
(
3
*
x
),
o
=
0
;
for
(
a
=
0
;
a
<
x
;
a
++
){
var
s
=
t
[
a
];
u
[
o
++
]
=
s
.
x
,
u
[
o
++
]
=
s
.
y
,
u
[
o
++
]
=
s
.
z
}
for
(
var
p
=
[],
h
=
{},
f
=
e
.
maximumRadius
,
y
=
W
.
CesiumMath
.
chordLength
(
r
,
f
),
v
=
y
*
y
;
0
<
i
.
length
;){
var
l
,
c
,
d
=
i
.
pop
(),
m
=
i
.
pop
(),
C
=
i
.
pop
(),
g
=
P
.
Cartesian3
.
fromArray
(
u
,
3
*
C
,
U
),
b
=
P
.
Cartesian3
.
fromArray
(
u
,
3
*
m
,
_
),
w
=
P
.
Cartesian3
.
fromArray
(
u
,
3
*
d
,
K
),
E
=
P
.
Cartesian3
.
multiplyByScalar
(
P
.
Cartesian3
.
normalize
(
g
,
G
),
f
,
G
),
M
=
P
.
Cartesian3
.
multiplyByScalar
(
P
.
Cartesian3
.
normalize
(
b
,
O
),
f
,
O
),
Z
=
P
.
Cartesian3
.
multiplyByScalar
(
P
.
Cartesian3
.
normalize
(
w
,
V
),
f
,
V
),
S
=
P
.
Cartesian3
.
magnitudeSquared
(
P
.
Cartesian3
.
subtract
(
E
,
M
,
k
)),
A
=
P
.
Cartesian3
.
magnitudeSquared
(
P
.
Cartesian3
.
subtract
(
M
,
Z
,
k
)),
z
=
P
.
Cartesian3
.
magnitudeSquared
(
P
.
Cartesian3
.
subtract
(
Z
,
E
,
k
)),
R
=
Math
.
max
(
S
,
A
,
z
);
v
<
R
?
S
===
R
?(
a
=
h
[
l
=
Math
.
min
(
C
,
m
)
+
"
"
+
Math
.
max
(
C
,
m
)],
T
.
defined
(
a
)
||
(
c
=
P
.
Cartesian3
.
add
(
g
,
b
,
k
),
P
.
Cartesian3
.
multiplyByScalar
(
c
,.
5
,
c
),
u
.
push
(
c
.
x
,
c
.
y
,
c
.
z
),
a
=
u
.
length
/
3
-
1
,
h
[
l
]
=
a
),
i
.
push
(
C
,
a
,
d
),
i
.
push
(
a
,
m
,
d
)):
A
===
R
?(
a
=
h
[
l
=
Math
.
min
(
m
,
d
)
+
"
"
+
Math
.
max
(
m
,
d
)],
T
.
defined
(
a
)
||
(
c
=
P
.
Cartesian3
.
add
(
b
,
w
,
k
),
P
.
Cartesian3
.
multiplyByScalar
(
c
,.
5
,
c
),
u
.
push
(
c
.
x
,
c
.
y
,
c
.
z
),
a
=
u
.
length
/
3
-
1
,
h
[
l
]
=
a
),
i
.
push
(
m
,
a
,
C
),
i
.
push
(
a
,
d
,
C
)):
z
===
R
&&
(
a
=
h
[
l
=
Math
.
min
(
d
,
C
)
+
"
"
+
Math
.
max
(
d
,
C
)],
T
.
defined
(
a
)
||
(
c
=
P
.
Cartesian3
.
add
(
w
,
g
,
k
),
P
.
Cartesian3
.
multiplyByScalar
(
c
,.
5
,
c
),
u
.
push
(
c
.
x
,
c
.
y
,
c
.
z
),
a
=
u
.
length
/
3
-
1
,
h
[
l
]
=
a
),
i
.
push
(
d
,
a
,
m
),
i
.
push
(
a
,
C
,
m
)):(
p
.
push
(
C
),
p
.
push
(
m
),
p
.
push
(
d
))}
return
new
B
.
Geometry
({
attributes
:{
position
:
new
B
.
GeometryAttribute
({
componentDatatype
:
I
.
ComponentDatatype
.
DOUBLE
,
componentsPerAttribute
:
3
,
values
:
u
})},
indices
:
p
,
primitiveType
:
B
.
PrimitiveType
.
TRIANGLES
})};
var
q
=
new
P
.
Cartographic
,
F
=
new
P
.
Cartographic
,
j
=
new
P
.
Cartographic
,
H
=
new
P
.
Cartographic
;
D
.
computeRhumbLineSubdivision
=
function
(
e
,
t
,
n
,
r
){
r
=
T
.
defaultValue
(
r
,
W
.
CesiumMath
.
RADIANS_PER_DEGREE
);
var
a
,
i
=
n
.
slice
(
0
),
x
=
t
.
length
,
u
=
new
Array
(
3
*
x
),
o
=
0
;
for
(
a
=
0
;
a
<
x
;
a
++
){
var
s
=
t
[
a
];
u
[
o
++
]
=
s
.
x
,
u
[
o
++
]
=
s
.
y
,
u
[
o
++
]
=
s
.
z
}
for
(
var
p
=
[],
h
=
{},
f
=
e
.
maximumRadius
,
y
=
W
.
CesiumMath
.
chordLength
(
r
,
f
),
v
=
new
N
.
EllipsoidRhumbLine
(
void
0
,
void
0
,
e
),
l
=
new
N
.
EllipsoidRhumbLine
(
void
0
,
void
0
,
e
),
c
=
new
N
.
EllipsoidRhumbLine
(
void
0
,
void
0
,
e
);
0
<
i
.
length
;){
var
d
=
i
.
pop
(),
m
=
i
.
pop
(),
C
=
i
.
pop
(),
g
=
P
.
Cartesian3
.
fromArray
(
u
,
3
*
C
,
U
),
b
=
P
.
Cartesian3
.
fromArray
(
u
,
3
*
m
,
_
),
w
=
P
.
Cartesian3
.
fromArray
(
u
,
3
*
d
,
K
),
E
=
e
.
cartesianToCartographic
(
g
,
q
),
M
=
e
.
cartesianToCartographic
(
b
,
F
),
Z
=
e
.
cartesianToCartographic
(
w
,
j
);
v
.
setEndPoints
(
E
,
M
);
var
S
=
v
.
surfaceDistance
;
l
.
setEndPoints
(
M
,
Z
);
var
A
=
l
.
surfaceDistance
;
c
.
setEndPoints
(
Z
,
E
);
var
z
,
R
,
L
,
D
,
G
=
c
.
surfaceDistance
,
O
=
Math
.
max
(
S
,
A
,
G
);
y
<
O
?
S
===
O
?(
a
=
h
[
z
=
Math
.
min
(
C
,
m
)
+
"
"
+
Math
.
max
(
C
,
m
)],
T
.
defined
(
a
)
||
(
R
=
v
.
interpolateUsingFraction
(.
5
,
H
),
L
=
.
5
*
(
E
.
height
+
M
.
height
),
D
=
P
.
Cartesian3
.
fromRadians
(
R
.
longitude
,
R
.
latitude
,
L
,
e
,
k
),
u
.
push
(
D
.
x
,
D
.
y
,
D
.
z
),
a
=
u
.
length
/
3
-
1
,
h
[
z
]
=
a
),
i
.
push
(
C
,
a
,
d
),
i
.
push
(
a
,
m
,
d
)):
A
===
O
?(
a
=
h
[
z
=
Math
.
min
(
m
,
d
)
+
"
"
+
Math
.
max
(
m
,
d
)],
T
.
defined
(
a
)
||
(
R
=
l
.
interpolateUsingFraction
(.
5
,
H
),
L
=
.
5
*
(
M
.
height
+
Z
.
height
),
D
=
P
.
Cartesian3
.
fromRadians
(
R
.
longitude
,
R
.
latitude
,
L
,
e
,
k
),
u
.
push
(
D
.
x
,
D
.
y
,
D
.
z
),
a
=
u
.
length
/
3
-
1
,
h
[
z
]
=
a
),
i
.
push
(
m
,
a
,
C
),
i
.
push
(
a
,
d
,
C
)):
G
===
O
&&
(
a
=
h
[
z
=
Math
.
min
(
d
,
C
)
+
"
"
+
Math
.
max
(
d
,
C
)],
T
.
defined
(
a
)
||
(
R
=
c
.
interpolateUsingFraction
(.
5
,
H
),
L
=
.
5
*
(
Z
.
height
+
E
.
height
),
D
=
P
.
Cartesian3
.
fromRadians
(
R
.
longitude
,
R
.
latitude
,
L
,
e
,
k
),
u
.
push
(
D
.
x
,
D
.
y
,
D
.
z
),
a
=
u
.
length
/
3
-
1
,
h
[
z
]
=
a
),
i
.
push
(
d
,
a
,
m
),
i
.
push
(
a
,
C
,
m
)):(
p
.
push
(
C
),
p
.
push
(
m
),
p
.
push
(
d
))}
return
new
B
.
Geometry
({
attributes
:{
position
:
new
B
.
GeometryAttribute
({
componentDatatype
:
I
.
ComponentDatatype
.
DOUBLE
,
componentsPerAttribute
:
3
,
values
:
u
})},
indices
:
p
,
primitiveType
:
B
.
PrimitiveType
.
TRIANGLES
})},
D
.
scaleToGeodeticHeight
=
function
(
e
,
t
,
n
,
r
){
n
=
T
.
defaultValue
(
n
,
P
.
Ellipsoid
.
WGS84
);
var
a
=
R
,
i
=
L
;
if
(
t
=
T
.
defaultValue
(
t
,
0
),
r
=
T
.
defaultValue
(
r
,
!
0
),
T
.
defined
(
e
))
for
(
var
x
=
e
.
length
,
u
=
0
;
u
<
x
;
u
+=
3
)
P
.
Cartesian3
.
fromArray
(
e
,
u
,
i
),
r
&&
(
i
=
n
.
scaleToGeodeticSurface
(
i
,
i
)),
0
!==
t
&&
(
a
=
n
.
geodeticSurfaceNormal
(
i
,
a
),
P
.
Cartesian3
.
multiplyByScalar
(
a
,
t
,
a
),
P
.
Cartesian3
.
add
(
i
,
a
,
i
)),
e
[
u
]
=
i
.
x
,
e
[
u
+
1
]
=
i
.
y
,
e
[
u
+
2
]
=
i
.
z
;
return
e
},
e
.
PolygonPipeline
=
D
,
e
.
WindingOrder
=
i
});
vcm/lib/Cesium/Workers/PolylinePipeline-30fab084.js
0 → 100644
View file @
c53f4211
/**
* Cesium - https://github.com/CesiumGS/cesium
*
* Copyright 2011-2020 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/master/LICENSE.md for full licensing details.
*/
define
([
"
exports
"
,
"
./when-60b00257
"
,
"
./Check-4274a1fd
"
,
"
./Math-9d37f659
"
,
"
./Cartesian2-2951f601
"
,
"
./Transforms-53ff6d12
"
,
"
./IntersectionTests-57fe18b2
"
,
"
./Plane-df4a621e
"
,
"
./EllipsoidRhumbLine-cbcd6a13
"
,
"
./EllipsoidGeodesic-0d3740b4
"
],
function
(
a
,
T
,
e
,
w
,
P
,
v
,
m
,
y
,
A
,
r
){
"
use strict
"
;
var
b
=
{
numberOfPoints
:
function
(
a
,
e
,
r
){
var
t
=
P
.
Cartesian3
.
distance
(
a
,
e
);
return
Math
.
ceil
(
t
/
r
)},
numberOfPointsRhumbLine
:
function
(
a
,
e
,
r
){
var
t
=
Math
.
pow
(
a
.
longitude
-
e
.
longitude
,
2
)
+
Math
.
pow
(
a
.
latitude
-
e
.
latitude
,
2
);
return
Math
.
ceil
(
Math
.
sqrt
(
t
/
(
r
*
r
)))}},
o
=
new
P
.
Cartographic
;
b
.
extractHeights
=
function
(
a
,
e
){
for
(
var
r
=
a
.
length
,
t
=
new
Array
(
r
),
i
=
0
;
i
<
r
;
i
++
){
var
n
=
a
[
i
];
t
[
i
]
=
e
.
cartesianToCartographic
(
n
,
o
).
height
}
return
t
};
var
E
=
new
v
.
Matrix4
,
S
=
new
P
.
Cartesian3
,
R
=
new
P
.
Cartesian3
,
M
=
new
y
.
Plane
(
P
.
Cartesian3
.
UNIT_X
,
0
),
D
=
new
P
.
Cartesian3
,
G
=
new
y
.
Plane
(
P
.
Cartesian3
.
UNIT_X
,
0
),
x
=
new
P
.
Cartesian3
,
N
=
new
P
.
Cartesian3
,
I
=
[];
function
k
(
a
,
e
,
r
){
var
t
,
i
=
I
;
if
(
i
.
length
=
a
,
e
===
r
){
for
(
t
=
0
;
t
<
a
;
t
++
)
i
[
t
]
=
e
;
return
i
}
var
n
=
(
r
-
e
)
/
a
;
for
(
t
=
0
;
t
<
a
;
t
++
){
var
o
=
e
+
t
*
n
;
i
[
t
]
=
o
}
return
i
}
var
V
=
new
P
.
Cartographic
,
L
=
new
P
.
Cartographic
,
_
=
new
P
.
Cartesian3
,
O
=
new
P
.
Cartesian3
,
B
=
new
P
.
Cartesian3
,
U
=
new
r
.
EllipsoidGeodesic
,
z
=
new
A
.
EllipsoidRhumbLine
;
function
X
(
a
,
e
,
r
,
t
,
i
,
n
,
o
,
s
){
var
c
=
t
.
scaleToGeodeticSurface
(
a
,
O
),
l
=
t
.
scaleToGeodeticSurface
(
e
,
B
),
u
=
b
.
numberOfPoints
(
a
,
e
,
r
),
h
=
t
.
cartesianToCartographic
(
c
,
V
),
f
=
t
.
cartesianToCartographic
(
l
,
L
),
C
=
k
(
u
,
i
,
n
);
U
.
setEndPoints
(
h
,
f
);
var
d
=
U
.
surfaceDistance
/
u
,
g
=
s
;
h
.
height
=
i
;
var
p
=
t
.
cartographicToCartesian
(
h
,
_
);
P
.
Cartesian3
.
pack
(
p
,
o
,
g
),
g
+=
3
;
for
(
var
v
=
1
;
v
<
u
;
v
++
){
var
m
=
U
.
interpolateUsingSurfaceDistance
(
v
*
d
,
L
);
m
.
height
=
C
[
v
],
p
=
t
.
cartographicToCartesian
(
m
,
_
),
P
.
Cartesian3
.
pack
(
p
,
o
,
g
),
g
+=
3
}
return
g
}
function
q
(
a
,
e
,
r
,
t
,
i
,
n
,
o
,
s
){
var
c
=
t
.
scaleToGeodeticSurface
(
a
,
O
),
l
=
t
.
scaleToGeodeticSurface
(
e
,
B
),
u
=
t
.
cartesianToCartographic
(
c
,
V
),
h
=
t
.
cartesianToCartographic
(
l
,
L
),
f
=
b
.
numberOfPointsRhumbLine
(
u
,
h
,
r
),
C
=
k
(
f
,
i
,
n
);
z
.
ellipsoid
.
equals
(
t
)
||
(
z
=
new
A
.
EllipsoidRhumbLine
(
void
0
,
void
0
,
t
)),
z
.
setEndPoints
(
u
,
h
);
var
d
=
z
.
surfaceDistance
/
f
,
g
=
s
;
u
.
height
=
i
;
var
p
=
t
.
cartographicToCartesian
(
u
,
_
);
P
.
Cartesian3
.
pack
(
p
,
o
,
g
),
g
+=
3
;
for
(
var
v
=
1
;
v
<
f
;
v
++
){
var
m
=
z
.
interpolateUsingSurfaceDistance
(
v
*
d
,
L
);
m
.
height
=
C
[
v
],
p
=
t
.
cartographicToCartesian
(
m
,
_
),
P
.
Cartesian3
.
pack
(
p
,
o
,
g
),
g
+=
3
}
return
g
}
b
.
wrapLongitude
=
function
(
a
,
e
){
var
r
=
[],
t
=
[];
if
(
T
.
defined
(
a
)
&&
0
<
a
.
length
){
e
=
T
.
defaultValue
(
e
,
v
.
Matrix4
.
IDENTITY
);
var
i
=
v
.
Matrix4
.
inverseTransformation
(
e
,
E
),
n
=
v
.
Matrix4
.
multiplyByPoint
(
i
,
P
.
Cartesian3
.
ZERO
,
S
),
o
=
P
.
Cartesian3
.
normalize
(
v
.
Matrix4
.
multiplyByPointAsVector
(
i
,
P
.
Cartesian3
.
UNIT_Y
,
R
),
R
),
s
=
y
.
Plane
.
fromPointNormal
(
n
,
o
,
M
),
c
=
P
.
Cartesian3
.
normalize
(
v
.
Matrix4
.
multiplyByPointAsVector
(
i
,
P
.
Cartesian3
.
UNIT_X
,
D
),
D
),
l
=
y
.
Plane
.
fromPointNormal
(
n
,
c
,
G
),
u
=
1
;
r
.
push
(
P
.
Cartesian3
.
clone
(
a
[
0
]));
for
(
var
h
=
r
[
0
],
f
=
a
.
length
,
C
=
1
;
C
<
f
;
++
C
){
var
d
=
a
[
C
];
if
(
y
.
Plane
.
getPointDistance
(
l
,
h
)
<
0
||
y
.
Plane
.
getPointDistance
(
l
,
d
)
<
0
){
var
g
=
m
.
IntersectionTests
.
lineSegmentPlane
(
h
,
d
,
s
,
x
);
if
(
T
.
defined
(
g
)){
var
p
=
P
.
Cartesian3
.
multiplyByScalar
(
o
,
5
e
-
9
,
N
);
y
.
Plane
.
getPointDistance
(
s
,
h
)
<
0
&&
P
.
Cartesian3
.
negate
(
p
,
p
),
r
.
push
(
P
.
Cartesian3
.
add
(
g
,
p
,
new
P
.
Cartesian3
)),
t
.
push
(
u
+
1
),
P
.
Cartesian3
.
negate
(
p
,
p
),
r
.
push
(
P
.
Cartesian3
.
add
(
g
,
p
,
new
P
.
Cartesian3
)),
u
=
1
}}
r
.
push
(
P
.
Cartesian3
.
clone
(
a
[
C
])),
u
++
,
h
=
d
}
t
.
push
(
u
)}
return
{
positions
:
r
,
lengths
:
t
}},
b
.
generateArc
=
function
(
a
){
T
.
defined
(
a
)
||
(
a
=
{});
var
e
=
a
.
positions
,
r
=
e
.
length
,
t
=
T
.
defaultValue
(
a
.
ellipsoid
,
P
.
Ellipsoid
.
WGS84
),
i
=
T
.
defaultValue
(
a
.
height
,
0
),
n
=
Array
.
isArray
(
i
);
if
(
r
<
1
)
return
[];
if
(
1
===
r
){
var
o
=
t
.
scaleToGeodeticSurface
(
e
[
0
],
O
);
if
(
0
!==
(
i
=
n
?
i
[
0
]:
i
)){
var
s
=
t
.
geodeticSurfaceNormal
(
o
,
_
);
P
.
Cartesian3
.
multiplyByScalar
(
s
,
i
,
s
),
P
.
Cartesian3
.
add
(
o
,
s
,
o
)}
return
[
o
.
x
,
o
.
y
,
o
.
z
]}
var
c
=
a
.
minDistance
;
if
(
!
T
.
defined
(
c
)){
var
l
=
T
.
defaultValue
(
a
.
granularity
,
w
.
CesiumMath
.
RADIANS_PER_DEGREE
);
c
=
w
.
CesiumMath
.
chordLength
(
l
,
t
.
maximumRadius
)}
var
u
,
h
=
0
;
for
(
u
=
0
;
u
<
r
-
1
;
u
++
)
h
+=
b
.
numberOfPoints
(
e
[
u
],
e
[
u
+
1
],
c
);
var
f
=
3
*
(
h
+
1
),
C
=
new
Array
(
f
),
d
=
0
;
for
(
u
=
0
;
u
<
r
-
1
;
u
++
){
d
=
X
(
e
[
u
],
e
[
u
+
1
],
c
,
t
,
n
?
i
[
u
]:
i
,
n
?
i
[
u
+
1
]:
i
,
C
,
d
)}
I
.
length
=
0
;
var
g
=
e
[
r
-
1
],
p
=
t
.
cartesianToCartographic
(
g
,
V
);
p
.
height
=
n
?
i
[
r
-
1
]:
i
;
var
v
=
t
.
cartographicToCartesian
(
p
,
_
);
return
P
.
Cartesian3
.
pack
(
v
,
C
,
f
-
3
),
C
};
var
W
=
new
P
.
Cartographic
,
Y
=
new
P
.
Cartographic
;
b
.
generateRhumbArc
=
function
(
a
){
T
.
defined
(
a
)
||
(
a
=
{});
var
e
=
a
.
positions
,
r
=
e
.
length
,
t
=
T
.
defaultValue
(
a
.
ellipsoid
,
P
.
Ellipsoid
.
WGS84
),
i
=
T
.
defaultValue
(
a
.
height
,
0
),
n
=
Array
.
isArray
(
i
);
if
(
r
<
1
)
return
[];
if
(
1
===
r
){
var
o
=
t
.
scaleToGeodeticSurface
(
e
[
0
],
O
);
if
(
0
!==
(
i
=
n
?
i
[
0
]:
i
)){
var
s
=
t
.
geodeticSurfaceNormal
(
o
,
_
);
P
.
Cartesian3
.
multiplyByScalar
(
s
,
i
,
s
),
P
.
Cartesian3
.
add
(
o
,
s
,
o
)}
return
[
o
.
x
,
o
.
y
,
o
.
z
]}
var
c
,
l
,
u
=
T
.
defaultValue
(
a
.
granularity
,
w
.
CesiumMath
.
RADIANS_PER_DEGREE
),
h
=
0
,
f
=
t
.
cartesianToCartographic
(
e
[
0
],
W
);
for
(
c
=
0
;
c
<
r
-
1
;
c
++
)
l
=
t
.
cartesianToCartographic
(
e
[
c
+
1
],
Y
),
h
+=
b
.
numberOfPointsRhumbLine
(
f
,
l
,
u
),
f
=
P
.
Cartographic
.
clone
(
l
,
W
);
var
C
=
3
*
(
h
+
1
),
d
=
new
Array
(
C
),
g
=
0
;
for
(
c
=
0
;
c
<
r
-
1
;
c
++
){
g
=
q
(
e
[
c
],
e
[
c
+
1
],
u
,
t
,
n
?
i
[
c
]:
i
,
n
?
i
[
c
+
1
]:
i
,
d
,
g
)}
I
.
length
=
0
;
var
p
=
e
[
r
-
1
],
v
=
t
.
cartesianToCartographic
(
p
,
V
);
v
.
height
=
n
?
i
[
r
-
1
]:
i
;
var
m
=
t
.
cartographicToCartesian
(
v
,
_
);
return
P
.
Cartesian3
.
pack
(
m
,
d
,
C
-
3
),
d
},
b
.
generateCartesianArc
=
function
(
a
){
for
(
var
e
=
b
.
generateArc
(
a
),
r
=
e
.
length
/
3
,
t
=
new
Array
(
r
),
i
=
0
;
i
<
r
;
i
++
)
t
[
i
]
=
P
.
Cartesian3
.
unpack
(
e
,
3
*
i
);
return
t
},
b
.
generateCartesianRhumbArc
=
function
(
a
){
for
(
var
e
=
b
.
generateRhumbArc
(
a
),
r
=
e
.
length
/
3
,
t
=
new
Array
(
r
),
i
=
0
;
i
<
r
;
i
++
)
t
[
i
]
=
P
.
Cartesian3
.
unpack
(
e
,
3
*
i
);
return
t
},
a
.
PolylinePipeline
=
b
});
vcm/lib/Cesium/Workers/PolylineVolumeGeometryLibrary-a55f99d5.js
0 → 100644
View file @
c53f4211
/**
* Cesium - https://github.com/CesiumGS/cesium
*
* Copyright 2011-2020 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/master/LICENSE.md for full licensing details.
*/
define
([
"
exports
"
,
"
./Math-9d37f659
"
,
"
./Cartesian2-2951f601
"
,
"
./Transforms-53ff6d12
"
,
"
./EllipsoidTangentPlane-f9b097b8
"
,
"
./PolylinePipeline-30fab084
"
],
function
(
a
,
L
,
j
,
P
,
E
,
Q
){
"
use strict
"
;
var
F
=
Object
.
freeze
({
ROUNDED
:
0
,
MITERED
:
1
,
BEVELED
:
2
}),
U
=
[
new
j
.
Cartesian3
,
new
j
.
Cartesian3
],
_
=
new
j
.
Cartesian3
,
q
=
new
j
.
Cartesian3
,
Y
=
new
j
.
Cartesian3
,
Z
=
new
j
.
Cartesian3
,
k
=
new
j
.
Cartesian3
,
H
=
new
j
.
Cartesian3
,
J
=
new
j
.
Cartesian3
,
K
=
new
j
.
Cartesian3
,
W
=
new
j
.
Cartesian3
,
X
=
new
j
.
Cartesian3
,
p
=
new
j
.
Cartesian3
,
$
=
{},
aa
=
new
j
.
Cartographic
;
function
ea
(
a
,
e
,
r
,
n
){
var
t
,
i
=
a
[
0
],
s
=
a
[
1
],
o
=
j
.
Cartesian3
.
angleBetween
(
i
,
s
),
l
=
Math
.
ceil
(
o
/
n
),
C
=
new
Array
(
l
);
if
(
e
===
r
){
for
(
t
=
0
;
t
<
l
;
t
++
)
C
[
t
]
=
e
;
return
C
.
push
(
r
),
C
}
var
c
=
(
r
-
e
)
/
l
;
for
(
t
=
1
;
t
<
l
;
t
++
){
var
u
=
e
+
t
*
c
;
C
[
t
]
=
u
}
return
C
[
0
]
=
e
,
C
.
push
(
r
),
C
}
var
M
=
new
j
.
Cartesian3
,
T
=
new
j
.
Cartesian3
;
var
B
=
new
j
.
Cartesian3
(
-
1
,
0
,
0
),
z
=
new
P
.
Matrix4
,
S
=
new
P
.
Matrix4
,
b
=
new
P
.
Matrix3
,
A
=
P
.
Matrix3
.
IDENTITY
.
clone
(),
D
=
new
j
.
Cartesian3
,
O
=
new
P
.
Cartesian4
,
N
=
new
j
.
Cartesian3
;
function
ra
(
a
,
e
,
r
,
n
,
t
,
i
,
s
,
o
){
var
l
=
D
,
C
=
O
;
z
=
P
.
Transforms
.
eastNorthUpToFixedFrame
(
a
,
t
,
z
),
l
=
P
.
Matrix4
.
multiplyByPointAsVector
(
z
,
B
,
l
),
l
=
j
.
Cartesian3
.
normalize
(
l
,
l
);
var
c
,
u
,
y
,
f
,
m
,
d
,
p
,
g
,
w
=
(
c
=
l
,
u
=
e
,
y
=
a
,
f
=
t
,
m
=
new
E
.
EllipsoidTangentPlane
(
y
,
f
),
d
=
m
.
projectPointOntoPlane
(
j
.
Cartesian3
.
add
(
y
,
c
,
M
),
M
),
p
=
m
.
projectPointOntoPlane
(
j
.
Cartesian3
.
add
(
y
,
u
,
T
),
T
),
g
=
j
.
Cartesian2
.
angleBetween
(
d
,
p
),
0
<=
p
.
x
*
d
.
y
-
p
.
y
*
d
.
x
?
-
g
:
g
);
b
=
P
.
Matrix3
.
fromRotationZ
(
w
,
b
),
N
.
z
=
i
,
z
=
P
.
Matrix4
.
multiplyTransformation
(
z
,
P
.
Matrix4
.
fromRotationTranslation
(
b
,
N
,
S
),
z
);
var
h
=
A
;
h
[
0
]
=
s
;
for
(
var
v
=
0
;
v
<
o
;
v
++
)
for
(
var
x
=
0
;
x
<
r
.
length
;
x
+=
3
)
C
=
j
.
Cartesian3
.
fromArray
(
r
,
x
,
C
),
C
=
P
.
Matrix3
.
multiplyByVector
(
h
,
C
,
C
),
C
=
P
.
Matrix4
.
multiplyByPoint
(
z
,
C
,
C
),
n
.
push
(
C
.
x
,
C
.
y
,
C
.
z
);
return
n
}
var
l
=
new
j
.
Cartesian3
;
function
na
(
a
,
e
,
r
,
n
,
t
,
i
,
s
){
for
(
var
o
=
0
;
o
<
a
.
length
;
o
+=
3
){
n
=
ra
(
j
.
Cartesian3
.
fromArray
(
a
,
o
,
l
),
e
,
r
,
n
,
t
,
i
[
o
/
3
],
s
,
1
)}
return
n
}
function
ta
(
a
,
e
){
for
(
var
r
=
a
.
length
,
n
=
new
Array
(
3
*
r
),
t
=
0
,
i
=
e
.
x
+
e
.
width
/
2
,
s
=
e
.
y
+
e
.
height
/
2
,
o
=
0
;
o
<
r
;
o
++
)
n
[
t
++
]
=
a
[
o
].
x
-
i
,
n
[
t
++
]
=
0
,
n
[
t
++
]
=
a
[
o
].
y
-
s
;
return
n
}
var
g
=
new
P
.
Quaternion
,
w
=
new
j
.
Cartesian3
,
h
=
new
P
.
Matrix3
;
function
ia
(
a
,
e
,
r
,
n
,
t
,
i
,
s
,
o
,
l
,
C
){
var
c
,
u
,
y
=
j
.
Cartesian3
.
angleBetween
(
j
.
Cartesian3
.
subtract
(
e
,
a
,
X
),
j
.
Cartesian3
.
subtract
(
r
,
a
,
p
)),
f
=
n
===
F
.
BEVELED
?
0
:
Math
.
ceil
(
y
/
L
.
CesiumMath
.
toRadians
(
5
));
if
(
c
=
t
?
P
.
Matrix3
.
fromQuaternion
(
P
.
Quaternion
.
fromAxisAngle
(
j
.
Cartesian3
.
negate
(
a
,
X
),
y
/
(
f
+
1
),
g
),
h
):
P
.
Matrix3
.
fromQuaternion
(
P
.
Quaternion
.
fromAxisAngle
(
a
,
y
/
(
f
+
1
),
g
),
h
),
e
=
j
.
Cartesian3
.
clone
(
e
,
w
),
0
<
f
)
for
(
var
m
=
C
?
2
:
1
,
d
=
0
;
d
<
f
;
d
++
)
e
=
P
.
Matrix3
.
multiplyByVector
(
c
,
e
,
e
),
u
=
j
.
Cartesian3
.
subtract
(
e
,
a
,
X
),
u
=
j
.
Cartesian3
.
normalize
(
u
,
u
),
t
||
(
u
=
j
.
Cartesian3
.
negate
(
u
,
u
)),
s
=
ra
(
i
.
scaleToGeodeticSurface
(
e
,
p
),
u
,
o
,
s
,
i
,
l
,
1
,
m
);
else
u
=
j
.
Cartesian3
.
subtract
(
e
,
a
,
X
),
u
=
j
.
Cartesian3
.
normalize
(
u
,
u
),
t
||
(
u
=
j
.
Cartesian3
.
negate
(
u
,
u
)),
s
=
ra
(
i
.
scaleToGeodeticSurface
(
e
,
p
),
u
,
o
,
s
,
i
,
l
,
1
,
1
),
r
=
j
.
Cartesian3
.
clone
(
r
,
w
),
u
=
j
.
Cartesian3
.
subtract
(
r
,
a
,
X
),
u
=
j
.
Cartesian3
.
normalize
(
u
,
u
),
t
||
(
u
=
j
.
Cartesian3
.
negate
(
u
,
u
)),
s
=
ra
(
i
.
scaleToGeodeticSurface
(
r
,
p
),
u
,
o
,
s
,
i
,
l
,
1
,
1
);
return
s
}
$
.
removeDuplicatesFromShape
=
function
(
a
){
for
(
var
e
=
a
.
length
,
r
=
[],
n
=
e
-
1
,
t
=
0
;
t
<
e
;
n
=
t
++
){
var
i
=
a
[
n
],
s
=
a
[
t
];
j
.
Cartesian2
.
equals
(
i
,
s
)
||
r
.
push
(
s
)}
return
r
},
$
.
angleIsGreaterThanPi
=
function
(
a
,
e
,
r
,
n
){
var
t
=
new
E
.
EllipsoidTangentPlane
(
r
,
n
),
i
=
t
.
projectPointOntoPlane
(
j
.
Cartesian3
.
add
(
r
,
a
,
M
),
M
),
s
=
t
.
projectPointOntoPlane
(
j
.
Cartesian3
.
add
(
r
,
e
,
T
),
T
);
return
0
<=
s
.
x
*
i
.
y
-
s
.
y
*
i
.
x
};
var
sa
=
new
j
.
Cartesian3
,
oa
=
new
j
.
Cartesian3
;
$
.
computePositions
=
function
(
a
,
e
,
r
,
n
,
t
){
var
i
=
n
.
_ellipsoid
,
s
=
function
(
a
,
e
){
for
(
var
r
=
new
Array
(
a
.
length
),
n
=
0
;
n
<
a
.
length
;
n
++
){
var
t
=
a
[
n
];
aa
=
e
.
cartesianToCartographic
(
t
,
aa
),
r
[
n
]
=
aa
.
height
,
a
[
n
]
=
e
.
scaleToGeodeticSurface
(
t
,
t
)}
return
r
}(
a
,
i
),
o
=
n
.
_granularity
,
l
=
n
.
_cornerType
,
C
=
(
t
?
function
(
a
,
e
){
var
r
=
a
.
length
,
n
=
new
Array
(
6
*
r
),
t
=
0
,
i
=
e
.
x
+
e
.
width
/
2
,
s
=
e
.
y
+
e
.
height
/
2
,
o
=
a
[
0
];
n
[
t
++
]
=
o
.
x
-
i
,
n
[
t
++
]
=
0
,
n
[
t
++
]
=
o
.
y
-
s
;
for
(
var
l
=
1
;
l
<
r
;
l
++
){
var
C
=
(
o
=
a
[
l
]).
x
-
i
,
c
=
o
.
y
-
s
;
n
[
t
++
]
=
C
,
n
[
t
++
]
=
0
,
n
[
t
++
]
=
c
,
n
[
t
++
]
=
C
,
n
[
t
++
]
=
0
,
n
[
t
++
]
=
c
}
return
o
=
a
[
0
],
n
[
t
++
]
=
o
.
x
-
i
,
n
[
t
++
]
=
0
,
n
[
t
++
]
=
o
.
y
-
s
,
n
}:
ta
)(
e
,
r
),
c
=
t
?
ta
(
e
,
r
):
void
0
,
u
=
r
.
height
/
2
,
y
=
r
.
width
/
2
,
f
=
a
.
length
,
m
=
[],
d
=
t
?[]:
void
0
,
p
=
_
,
g
=
q
,
w
=
Y
,
h
=
Z
,
v
=
k
,
x
=
H
,
P
=
J
,
E
=
K
,
M
=
W
,
T
=
a
[
0
],
B
=
a
[
1
];
h
=
i
.
geodeticSurfaceNormal
(
T
,
h
),
p
=
j
.
Cartesian3
.
subtract
(
B
,
T
,
p
),
p
=
j
.
Cartesian3
.
normalize
(
p
,
p
),
E
=
j
.
Cartesian3
.
cross
(
h
,
p
,
E
),
E
=
j
.
Cartesian3
.
normalize
(
E
,
E
);
var
z
,
S
=
s
[
0
],
b
=
s
[
1
];
t
&&
(
d
=
ra
(
T
,
E
,
c
,
d
,
i
,
S
+
u
,
1
,
1
)),
M
=
j
.
Cartesian3
.
clone
(
T
,
M
),
T
=
B
,
g
=
j
.
Cartesian3
.
negate
(
p
,
g
);
for
(
var
A
=
1
;
A
<
f
-
1
;
A
++
){
var
D
=
t
?
2
:
1
;
B
=
a
[
A
+
1
],
p
=
j
.
Cartesian3
.
subtract
(
B
,
T
,
p
),
p
=
j
.
Cartesian3
.
normalize
(
p
,
p
),
w
=
j
.
Cartesian3
.
add
(
p
,
g
,
w
),
w
=
j
.
Cartesian3
.
normalize
(
w
,
w
),
h
=
i
.
geodeticSurfaceNormal
(
T
,
h
);
var
O
=
j
.
Cartesian3
.
multiplyByScalar
(
h
,
j
.
Cartesian3
.
dot
(
p
,
h
),
sa
);
j
.
Cartesian3
.
subtract
(
p
,
O
,
O
),
j
.
Cartesian3
.
normalize
(
O
,
O
);
var
N
=
j
.
Cartesian3
.
multiplyByScalar
(
h
,
j
.
Cartesian3
.
dot
(
g
,
h
),
oa
);
if
(
j
.
Cartesian3
.
subtract
(
g
,
N
,
N
),
j
.
Cartesian3
.
normalize
(
N
,
N
),
!
L
.
CesiumMath
.
equalsEpsilon
(
Math
.
abs
(
j
.
Cartesian3
.
dot
(
O
,
N
)),
1
,
L
.
CesiumMath
.
EPSILON7
)){
w
=
j
.
Cartesian3
.
cross
(
w
,
h
,
w
),
w
=
j
.
Cartesian3
.
cross
(
h
,
w
,
w
),
w
=
j
.
Cartesian3
.
normalize
(
w
,
w
);
var
V
=
1
/
Math
.
max
(.
25
,
j
.
Cartesian3
.
magnitude
(
j
.
Cartesian3
.
cross
(
w
,
g
,
X
))),
G
=
$
.
angleIsGreaterThanPi
(
p
,
g
,
T
,
i
);
M
=
(
G
?(
v
=
j
.
Cartesian3
.
add
(
T
,
j
.
Cartesian3
.
multiplyByScalar
(
w
,
V
*
y
,
w
),
v
),
x
=
j
.
Cartesian3
.
add
(
v
,
j
.
Cartesian3
.
multiplyByScalar
(
E
,
y
,
x
),
x
),
U
[
0
]
=
j
.
Cartesian3
.
clone
(
M
,
U
[
0
]),
U
[
1
]
=
j
.
Cartesian3
.
clone
(
x
,
U
[
1
]),
z
=
ea
(
U
,
S
+
u
,
b
+
u
,
o
),
m
=
na
(
Q
.
PolylinePipeline
.
generateArc
({
positions
:
U
,
granularity
:
o
,
ellipsoid
:
i
}),
E
,
C
,
m
,
i
,
z
,
1
),
E
=
j
.
Cartesian3
.
cross
(
h
,
p
,
E
),
E
=
j
.
Cartesian3
.
normalize
(
E
,
E
),
P
=
j
.
Cartesian3
.
add
(
v
,
j
.
Cartesian3
.
multiplyByScalar
(
E
,
y
,
P
),
P
),
l
===
F
.
ROUNDED
||
l
===
F
.
BEVELED
?
ia
(
v
,
x
,
P
,
l
,
G
,
i
,
m
,
C
,
b
+
u
,
t
):
m
=
ra
(
T
,
w
=
j
.
Cartesian3
.
negate
(
w
,
w
),
C
,
m
,
i
,
b
+
u
,
V
,
D
)):(
v
=
j
.
Cartesian3
.
add
(
T
,
j
.
Cartesian3
.
multiplyByScalar
(
w
,
V
*
y
,
w
),
v
),
x
=
j
.
Cartesian3
.
add
(
v
,
j
.
Cartesian3
.
multiplyByScalar
(
E
,
-
y
,
x
),
x
),
U
[
0
]
=
j
.
Cartesian3
.
clone
(
M
,
U
[
0
]),
U
[
1
]
=
j
.
Cartesian3
.
clone
(
x
,
U
[
1
]),
z
=
ea
(
U
,
S
+
u
,
b
+
u
,
o
),
m
=
na
(
Q
.
PolylinePipeline
.
generateArc
({
positions
:
U
,
granularity
:
o
,
ellipsoid
:
i
}),
E
,
C
,
m
,
i
,
z
,
1
),
E
=
j
.
Cartesian3
.
cross
(
h
,
p
,
E
),
E
=
j
.
Cartesian3
.
normalize
(
E
,
E
),
P
=
j
.
Cartesian3
.
add
(
v
,
j
.
Cartesian3
.
multiplyByScalar
(
E
,
-
y
,
P
),
P
),
l
===
F
.
ROUNDED
||
l
===
F
.
BEVELED
?
ia
(
v
,
x
,
P
,
l
,
G
,
i
,
m
,
C
,
b
+
u
,
t
):
m
=
ra
(
T
,
w
,
C
,
m
,
i
,
b
+
u
,
V
,
D
)),
j
.
Cartesian3
.
clone
(
P
,
M
)),
g
=
j
.
Cartesian3
.
negate
(
p
,
g
)}
else
m
=
ra
(
M
,
E
,
C
,
m
,
i
,
S
+
u
,
1
,
1
),
M
=
T
;
S
=
b
,
b
=
s
[
A
+
1
],
T
=
B
}
U
[
0
]
=
j
.
Cartesian3
.
clone
(
M
,
U
[
0
]),
U
[
1
]
=
j
.
Cartesian3
.
clone
(
T
,
U
[
1
]),
z
=
ea
(
U
,
S
+
u
,
b
+
u
,
o
),
m
=
na
(
Q
.
PolylinePipeline
.
generateArc
({
positions
:
U
,
granularity
:
o
,
ellipsoid
:
i
}),
E
,
C
,
m
,
i
,
z
,
1
),
t
&&
(
d
=
ra
(
T
,
E
,
c
,
d
,
i
,
b
+
u
,
1
,
1
)),
f
=
m
.
length
;
var
R
=
t
?
f
+
d
.
length
:
f
,
I
=
new
Float64Array
(
R
);
return
I
.
set
(
m
),
t
&&
I
.
set
(
d
,
f
),
I
},
a
.
CornerType
=
F
,
a
.
PolylineVolumeGeometryLibrary
=
$
});
vcm/lib/Cesium/Workers/PrimitivePipeline-2056e022.js
0 → 100644
View file @
c53f4211
/**
* Cesium - https://github.com/CesiumGS/cesium
*
* Copyright 2011-2020 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/master/LICENSE.md for full licensing details.
*/
define
([
"
exports
"
,
"
./when-60b00257
"
,
"
./Check-4274a1fd
"
,
"
./Cartesian2-2951f601
"
,
"
./Transforms-53ff6d12
"
,
"
./ComponentDatatype-a29c6075
"
,
"
./GeometryAttribute-2f728681
"
,
"
./GeometryAttributes-130e4d69
"
,
"
./GeometryPipeline-7b394c2b
"
,
"
./IndexDatatype-527cbd94
"
,
"
./WebMercatorProjection-a1ea4f18
"
],
function
(
e
,
v
,
t
,
u
,
P
,
k
,
C
,
w
,
b
,
A
,
c
){
"
use strict
"
;
function
m
(
e
,
t
,
r
){
e
=
v
.
defaultValue
(
e
,
0
),
t
=
v
.
defaultValue
(
t
,
0
),
r
=
v
.
defaultValue
(
r
,
0
),
this
.
value
=
new
Float32Array
([
e
,
t
,
r
])}
function
G
(
e
,
t
){
var
r
=
e
.
attributes
,
n
=
r
.
position
,
i
=
n
.
values
.
length
/
n
.
componentsPerAttribute
;
r
.
batchId
=
new
C
.
GeometryAttribute
({
componentDatatype
:
k
.
ComponentDatatype
.
FLOAT
,
componentsPerAttribute
:
1
,
values
:
new
Float32Array
(
i
)});
for
(
var
o
=
r
.
batchId
.
values
,
a
=
0
;
a
<
i
;
++
a
)
o
[
a
]
=
t
}
function
x
(
e
){
var
t
,
r
,
n
=
e
.
instances
,
i
=
e
.
projection
,
o
=
e
.
elementIndexUintSupported
,
a
=
e
.
scene3DOnly
,
s
=
e
.
vertexCacheOptimize
,
d
=
e
.
compressVertices
,
p
=
e
.
modelMatrix
,
f
=
n
.
length
;
for
(
t
=
0
;
t
<
f
;
++
t
)
if
(
v
.
defined
(
n
[
t
].
geometry
)){
n
[
t
].
geometry
.
primitiveType
;
break
}
if
(
!
function
(
e
,
t
,
r
){
var
n
,
i
=!
r
,
o
=
e
.
length
;
if
(
!
i
&&
1
<
o
){
var
a
=
e
[
0
].
modelMatrix
;
for
(
n
=
1
;
n
<
o
;
++
n
)
if
(
!
P
.
Matrix4
.
equals
(
a
,
e
[
n
].
modelMatrix
)){
i
=!
0
;
break
}}
if
(
i
)
for
(
n
=
0
;
n
<
o
;
++
n
)
v
.
defined
(
e
[
n
].
geometry
)
&&
b
.
GeometryPipeline
.
transformToWorldCoordinates
(
e
[
n
]);
else
P
.
Matrix4
.
multiplyTransformation
(
t
,
e
[
0
].
modelMatrix
,
t
)}(
n
,
p
,
a
),
!
a
)
for
(
t
=
0
;
t
<
f
;
++
t
)
v
.
defined
(
n
[
t
].
geometry
)
&&
b
.
GeometryPipeline
.
splitLongitude
(
n
[
t
]);
if
(
!
function
(
e
){
for
(
var
t
=
e
.
length
,
r
=
0
;
r
<
t
;
++
r
){
var
n
=
e
[
r
];
v
.
defined
(
n
.
geometry
)?
G
(
n
.
geometry
,
r
):
v
.
defined
(
n
.
westHemisphereGeometry
)
&&
v
.
defined
(
n
.
eastHemisphereGeometry
)
&&
(
G
(
n
.
westHemisphereGeometry
,
r
),
G
(
n
.
eastHemisphereGeometry
,
r
))}}(
n
),
s
)
for
(
t
=
0
;
t
<
f
;
++
t
){
var
u
=
n
[
t
];
v
.
defined
(
u
.
geometry
)?(
b
.
GeometryPipeline
.
reorderForPostVertexCache
(
u
.
geometry
),
b
.
GeometryPipeline
.
reorderForPreVertexCache
(
u
.
geometry
)):
v
.
defined
(
u
.
westHemisphereGeometry
)
&&
v
.
defined
(
u
.
eastHemisphereGeometry
)
&&
(
b
.
GeometryPipeline
.
reorderForPostVertexCache
(
u
.
westHemisphereGeometry
),
b
.
GeometryPipeline
.
reorderForPreVertexCache
(
u
.
westHemisphereGeometry
),
b
.
GeometryPipeline
.
reorderForPostVertexCache
(
u
.
eastHemisphereGeometry
),
b
.
GeometryPipeline
.
reorderForPreVertexCache
(
u
.
eastHemisphereGeometry
))}
var
c
=
b
.
GeometryPipeline
.
combineInstances
(
n
);
for
(
f
=
c
.
length
,
t
=
0
;
t
<
f
;
++
t
){
var
m
,
h
=
(
r
=
c
[
t
]).
attributes
;
if
(
a
)
for
(
m
in
h
)
h
.
hasOwnProperty
(
m
)
&&
h
[
m
].
componentDatatype
===
k
.
ComponentDatatype
.
DOUBLE
&&
b
.
GeometryPipeline
.
encodeAttribute
(
r
,
m
,
m
+
"
3DHigh
"
,
m
+
"
3DLow
"
);
else
for
(
m
in
h
)
if
(
h
.
hasOwnProperty
(
m
)
&&
h
[
m
].
componentDatatype
===
k
.
ComponentDatatype
.
DOUBLE
){
var
l
=
m
+
"
3D
"
,
g
=
m
+
"
2D
"
;
b
.
GeometryPipeline
.
projectTo2D
(
r
,
m
,
l
,
g
,
i
),
v
.
defined
(
r
.
boundingSphere
)
&&
"
position
"
===
m
&&
(
r
.
boundingSphereCV
=
P
.
BoundingSphere
.
fromVertices
(
r
.
attributes
.
position2D
.
values
)),
b
.
GeometryPipeline
.
encodeAttribute
(
r
,
l
,
l
+
"
High
"
,
l
+
"
Low
"
),
b
.
GeometryPipeline
.
encodeAttribute
(
r
,
g
,
g
+
"
High
"
,
g
+
"
Low
"
)}
d
&&
b
.
GeometryPipeline
.
compressVertices
(
r
)}
if
(
!
o
){
var
y
=
[];
for
(
f
=
c
.
length
,
t
=
0
;
t
<
f
;
++
t
)
r
=
c
[
t
],
y
=
y
.
concat
(
b
.
GeometryPipeline
.
fitToUnsignedShortIndices
(
r
));
c
=
y
}
return
c
}
function
S
(
e
,
t
,
r
,
n
){
var
i
,
o
,
a
,
s
=
n
.
length
-
1
;
if
(
0
<=
s
){
var
d
=
n
[
s
];
i
=
d
.
offset
+
d
.
count
,
o
=
r
[
a
=
d
.
index
].
indices
.
length
}
else
o
=
r
[
a
=
i
=
0
].
indices
.
length
;
for
(
var
p
=
e
.
length
,
f
=
0
;
f
<
p
;
++
f
){
var
u
=
e
[
f
][
t
];
if
(
v
.
defined
(
u
)){
var
c
=
u
.
indices
.
length
;
o
<
i
+
c
&&
(
i
=
0
,
o
=
r
[
++
a
].
indices
.
length
),
n
.
push
({
index
:
a
,
offset
:
i
,
count
:
c
}),
i
+=
c
}}}
Object
.
defineProperties
(
m
.
prototype
,{
componentDatatype
:{
get
:
function
(){
return
k
.
ComponentDatatype
.
FLOAT
}},
componentsPerAttribute
:{
get
:
function
(){
return
3
}},
normalize
:{
get
:
function
(){
return
!
1
}}}),
m
.
fromCartesian3
=
function
(
e
){
return
new
m
(
e
.
x
,
e
.
y
,
e
.
z
)},
m
.
toValue
=
function
(
e
,
t
){
return
v
.
defined
(
t
)
||
(
t
=
new
Float32Array
([
e
.
x
,
e
.
y
,
e
.
z
])),
t
[
0
]
=
e
.
x
,
t
[
1
]
=
e
.
y
,
t
[
2
]
=
e
.
z
,
t
};
var
h
=
{};
function
i
(
e
,
t
){
var
r
=
e
.
attributes
;
for
(
var
n
in
r
)
if
(
r
.
hasOwnProperty
(
n
)){
var
i
=
r
[
n
];
v
.
defined
(
i
)
&&
v
.
defined
(
i
.
values
)
&&
t
.
push
(
i
.
values
.
buffer
)}
v
.
defined
(
e
.
indices
)
&&
t
.
push
(
e
.
indices
.
buffer
)}
function
o
(
e
){
var
t
=
e
.
length
,
r
=
1
+
(
P
.
BoundingSphere
.
packedLength
+
1
)
*
t
,
n
=
new
Float32Array
(
r
),
i
=
0
;
n
[
i
++
]
=
t
;
for
(
var
o
=
0
;
o
<
t
;
++
o
){
var
a
=
e
[
o
];
v
.
defined
(
a
)?(
n
[
i
++
]
=
1
,
P
.
BoundingSphere
.
pack
(
e
[
o
],
n
,
i
)):
n
[
i
++
]
=
0
,
i
+=
P
.
BoundingSphere
.
packedLength
}
return
n
}
function
r
(
e
){
for
(
var
t
=
new
Array
(
e
[
0
]),
r
=
0
,
n
=
1
;
n
<
e
.
length
;)
1
===
e
[
n
++
]
&&
(
t
[
r
]
=
P
.
BoundingSphere
.
unpack
(
e
,
n
)),
++
r
,
n
+=
P
.
BoundingSphere
.
packedLength
;
return
t
}
h
.
combineGeometry
=
function
(
e
){
var
t
,
r
,
n
,
i
,
o
,
a
,
s
,
d
=
e
.
instances
,
p
=
d
.
length
,
f
=!
1
;
0
<
p
&&
(
0
<
(
t
=
x
(
e
)).
length
&&
(
r
=
b
.
GeometryPipeline
.
createAttributeLocations
(
t
[
0
]),
e
.
createPickOffsets
&&
(
S
(
o
=
d
,
"
geometry
"
,
a
=
t
,
s
=
[]),
S
(
o
,
"
westHemisphereGeometry
"
,
a
,
s
),
S
(
o
,
"
eastHemisphereGeometry
"
,
a
,
s
),
n
=
s
)),
v
.
defined
(
d
[
0
].
attributes
)
&&
v
.
defined
(
d
[
0
].
attributes
.
offset
)
&&
(
i
=
new
Array
(
p
),
f
=!
0
));
for
(
var
u
=
new
Array
(
p
),
c
=
new
Array
(
p
),
m
=
0
;
m
<
p
;
++
m
){
var
h
=
d
[
m
],
l
=
h
.
geometry
;
v
.
defined
(
l
)
&&
(
u
[
m
]
=
l
.
boundingSphere
,
c
[
m
]
=
l
.
boundingSphereCV
,
f
&&
(
i
[
m
]
=
h
.
geometry
.
offsetAttribute
));
var
g
=
h
.
eastHemisphereGeometry
,
y
=
h
.
westHemisphereGeometry
;
v
.
defined
(
g
)
&&
v
.
defined
(
y
)
&&
(
v
.
defined
(
g
.
boundingSphere
)
&&
v
.
defined
(
y
.
boundingSphere
)
&&
(
u
[
m
]
=
P
.
BoundingSphere
.
union
(
g
.
boundingSphere
,
y
.
boundingSphere
)),
v
.
defined
(
g
.
boundingSphereCV
)
&&
v
.
defined
(
y
.
boundingSphereCV
)
&&
(
c
[
m
]
=
P
.
BoundingSphere
.
union
(
g
.
boundingSphereCV
,
y
.
boundingSphereCV
)))}
return
{
geometries
:
t
,
modelMatrix
:
e
.
modelMatrix
,
attributeLocations
:
r
,
pickOffsets
:
n
,
offsetInstanceExtend
:
i
,
boundingSpheres
:
u
,
boundingSpheresCV
:
c
}},
h
.
packCreateGeometryResults
=
function
(
e
,
t
){
var
r
=
new
Float64Array
(
function
(
e
){
for
(
var
t
=
1
,
r
=
e
.
length
,
n
=
0
;
n
<
r
;
n
++
){
var
i
=
e
[
n
];
if
(
++
t
,
v
.
defined
(
i
)){
var
o
=
i
.
attributes
;
for
(
var
a
in
t
+=
7
+
2
*
P
.
BoundingSphere
.
packedLength
+
(
v
.
defined
(
i
.
indices
)?
i
.
indices
.
length
:
0
),
o
){
if
(
o
.
hasOwnProperty
(
a
)
&&
v
.
defined
(
o
[
a
]))
t
+=
5
+
o
[
a
].
values
.
length
}}}
return
t
}(
e
)),
n
=
[],
i
=
{},
o
=
e
.
length
,
a
=
0
;
r
[
a
++
]
=
o
;
for
(
var
s
=
0
;
s
<
o
;
s
++
){
var
d
=
e
[
s
],
p
=
v
.
defined
(
d
);
if
(
r
[
a
++
]
=
p
?
1
:
0
,
p
){
r
[
a
++
]
=
d
.
primitiveType
,
r
[
a
++
]
=
d
.
geometryType
,
r
[
a
++
]
=
v
.
defaultValue
(
d
.
offsetAttribute
,
-
1
);
var
f
=
v
.
defined
(
d
.
boundingSphere
)?
1
:
0
;(
r
[
a
++
]
=
f
)
&&
P
.
BoundingSphere
.
pack
(
d
.
boundingSphere
,
r
,
a
),
a
+=
P
.
BoundingSphere
.
packedLength
;
var
u
=
v
.
defined
(
d
.
boundingSphereCV
)?
1
:
0
;(
r
[
a
++
]
=
u
)
&&
P
.
BoundingSphere
.
pack
(
d
.
boundingSphereCV
,
r
,
a
),
a
+=
P
.
BoundingSphere
.
packedLength
;
var
c
=
d
.
attributes
,
m
=
[];
for
(
var
h
in
c
)
c
.
hasOwnProperty
(
h
)
&&
v
.
defined
(
c
[
h
])
&&
(
m
.
push
(
h
),
v
.
defined
(
i
[
h
])
||
(
i
[
h
]
=
n
.
length
,
n
.
push
(
h
)));
r
[
a
++
]
=
m
.
length
;
for
(
var
l
=
0
;
l
<
m
.
length
;
l
++
){
var
g
=
m
[
l
],
y
=
c
[
g
];
r
[
a
++
]
=
i
[
g
],
r
[
a
++
]
=
y
.
componentDatatype
,
r
[
a
++
]
=
y
.
componentsPerAttribute
,
r
[
a
++
]
=
y
.
normalize
?
1
:
0
,
r
[
a
++
]
=
y
.
values
.
length
,
r
.
set
(
y
.
values
,
a
),
a
+=
y
.
values
.
length
}
var
b
=
v
.
defined
(
d
.
indices
)?
d
.
indices
.
length
:
0
;
0
<
(
r
[
a
++
]
=
b
)
&&
(
r
.
set
(
d
.
indices
,
a
),
a
+=
b
)}}
return
t
.
push
(
r
.
buffer
),{
stringTable
:
n
,
packedData
:
r
}},
h
.
unpackCreateGeometryResults
=
function
(
e
){
for
(
var
t
,
r
=
e
.
stringTable
,
n
=
e
.
packedData
,
i
=
new
Array
(
n
[
0
]),
o
=
0
,
a
=
1
;
a
<
n
.
length
;){
if
(
1
===
n
[
a
++
]){
var
s
,
d
,
p
,
f
,
u
,
c
=
n
[
a
++
],
m
=
n
[
a
++
],
h
=
n
[
a
++
];
-
1
===
h
&&
(
h
=
void
0
),
1
===
n
[
a
++
]
&&
(
s
=
P
.
BoundingSphere
.
unpack
(
n
,
a
)),
a
+=
P
.
BoundingSphere
.
packedLength
,
1
===
n
[
a
++
]
&&
(
d
=
P
.
BoundingSphere
.
unpack
(
n
,
a
)),
a
+=
P
.
BoundingSphere
.
packedLength
;
var
l
,
g
=
new
w
.
GeometryAttributes
,
y
=
n
[
a
++
];
for
(
t
=
0
;
t
<
y
;
t
++
){
var
b
=
r
[
n
[
a
++
]],
v
=
n
[
a
++
];
u
=
n
[
a
++
];
var
G
=
0
!==
n
[
a
++
];
p
=
n
[
a
++
],
f
=
k
.
ComponentDatatype
.
createTypedArray
(
v
,
p
);
for
(
var
x
=
0
;
x
<
p
;
x
++
)
f
[
x
]
=
n
[
a
++
];
g
[
b
]
=
new
C
.
GeometryAttribute
({
componentDatatype
:
v
,
componentsPerAttribute
:
u
,
normalize
:
G
,
values
:
f
})}
if
(
0
<
(
p
=
n
[
a
++
])){
var
S
=
f
.
length
/
u
;
for
(
l
=
A
.
IndexDatatype
.
createTypedArray
(
S
,
p
),
t
=
0
;
t
<
p
;
t
++
)
l
[
t
]
=
n
[
a
++
]}
i
[
o
++
]
=
new
C
.
Geometry
({
primitiveType
:
c
,
geometryType
:
m
,
boundingSphere
:
s
,
boundingSphereCV
:
d
,
indices
:
l
,
attributes
:
g
,
offsetAttribute
:
h
})}
else
i
[
o
++
]
=
void
0
}
return
i
},
h
.
packCombineGeometryParameters
=
function
(
e
,
t
){
for
(
var
r
=
e
.
createGeometryResults
,
n
=
r
.
length
,
i
=
0
;
i
<
n
;
i
++
)
t
.
push
(
r
[
i
].
packedData
.
buffer
);
return
{
createGeometryResults
:
e
.
createGeometryResults
,
packedInstances
:
function
(
e
,
t
){
var
r
=
e
.
length
,
n
=
new
Float64Array
(
1
+
19
*
r
),
i
=
0
;
n
[
i
++
]
=
r
;
for
(
var
o
=
0
;
o
<
r
;
o
++
){
var
a
=
e
[
o
];
if
(
P
.
Matrix4
.
pack
(
a
.
modelMatrix
,
n
,
i
),
i
+=
P
.
Matrix4
.
packedLength
,
v
.
defined
(
a
.
attributes
)
&&
v
.
defined
(
a
.
attributes
.
offset
)){
var
s
=
a
.
attributes
.
offset
.
value
;
n
[
i
]
=
s
[
0
],
n
[
i
+
1
]
=
s
[
1
],
n
[
i
+
2
]
=
s
[
2
]}
i
+=
3
}
return
t
.
push
(
n
.
buffer
),
n
}(
e
.
instances
,
t
),
ellipsoid
:
e
.
ellipsoid
,
isGeographic
:
e
.
projection
instanceof
P
.
GeographicProjection
,
elementIndexUintSupported
:
e
.
elementIndexUintSupported
,
scene3DOnly
:
e
.
scene3DOnly
,
vertexCacheOptimize
:
e
.
vertexCacheOptimize
,
compressVertices
:
e
.
compressVertices
,
modelMatrix
:
e
.
modelMatrix
,
createPickOffsets
:
e
.
createPickOffsets
}},
h
.
unpackCombineGeometryParameters
=
function
(
e
){
for
(
var
t
=
function
(
e
){
for
(
var
t
=
e
,
r
=
new
Array
(
t
[
0
]),
n
=
0
,
i
=
1
;
i
<
t
.
length
;){
var
o
,
a
=
P
.
Matrix4
.
unpack
(
t
,
i
);
i
+=
P
.
Matrix4
.
packedLength
,
v
.
defined
(
t
[
i
])
&&
(
o
=
{
offset
:
new
m
(
t
[
i
],
t
[
i
+
1
],
t
[
i
+
2
])}),
i
+=
3
,
r
[
n
++
]
=
{
modelMatrix
:
a
,
attributes
:
o
}}
return
r
}(
e
.
packedInstances
),
r
=
e
.
createGeometryResults
,
n
=
r
.
length
,
i
=
0
,
o
=
0
;
o
<
n
;
o
++
)
for
(
var
a
=
h
.
unpackCreateGeometryResults
(
r
[
o
]),
s
=
a
.
length
,
d
=
0
;
d
<
s
;
d
++
){
var
p
=
a
[
d
];
t
[
i
].
geometry
=
p
,
++
i
}
var
f
=
u
.
Ellipsoid
.
clone
(
e
.
ellipsoid
);
return
{
instances
:
t
,
ellipsoid
:
f
,
projection
:
e
.
isGeographic
?
new
P
.
GeographicProjection
(
f
):
new
c
.
WebMercatorProjection
(
f
),
elementIndexUintSupported
:
e
.
elementIndexUintSupported
,
scene3DOnly
:
e
.
scene3DOnly
,
vertexCacheOptimize
:
e
.
vertexCacheOptimize
,
compressVertices
:
e
.
compressVertices
,
modelMatrix
:
P
.
Matrix4
.
clone
(
e
.
modelMatrix
),
createPickOffsets
:
e
.
createPickOffsets
}},
h
.
packCombineGeometryResults
=
function
(
e
,
t
){
v
.
defined
(
e
.
geometries
)
&&
function
(
e
,
t
){
for
(
var
r
=
e
.
length
,
n
=
0
;
n
<
r
;
++
n
)
i
(
e
[
n
],
t
)}(
e
.
geometries
,
t
);
var
r
=
o
(
e
.
boundingSpheres
),
n
=
o
(
e
.
boundingSpheresCV
);
return
t
.
push
(
r
.
buffer
,
n
.
buffer
),{
geometries
:
e
.
geometries
,
attributeLocations
:
e
.
attributeLocations
,
modelMatrix
:
e
.
modelMatrix
,
pickOffsets
:
e
.
pickOffsets
,
offsetInstanceExtend
:
e
.
offsetInstanceExtend
,
boundingSpheres
:
r
,
boundingSpheresCV
:
n
}},
h
.
unpackCombineGeometryResults
=
function
(
e
){
return
{
geometries
:
e
.
geometries
,
attributeLocations
:
e
.
attributeLocations
,
modelMatrix
:
e
.
modelMatrix
,
pickOffsets
:
e
.
pickOffsets
,
offsetInstanceExtend
:
e
.
offsetInstanceExtend
,
boundingSpheres
:
r
(
e
.
boundingSpheres
),
boundingSpheresCV
:
r
(
e
.
boundingSpheresCV
)}},
e
.
PrimitivePipeline
=
h
});
vcm/lib/Cesium/Workers/RectangleGeometryLibrary-2ab576f5.js
0 → 100644
View file @
c53f4211
/**
* Cesium - https://github.com/CesiumGS/cesium
*
* Copyright 2011-2020 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/master/LICENSE.md for full licensing details.
*/
define
([
"
exports
"
,
"
./when-60b00257
"
,
"
./Check-4274a1fd
"
,
"
./Math-9d37f659
"
,
"
./Cartesian2-2951f601
"
,
"
./Transforms-53ff6d12
"
,
"
./GeometryAttribute-2f728681
"
],
function
(
t
,
m
,
n
,
O
,
b
,
a
,
G
){
"
use strict
"
;
var
p
=
Math
.
cos
,
v
=
Math
.
sin
,
x
=
Math
.
sqrt
,
r
=
{
computePosition
:
function
(
t
,
n
,
a
,
r
,
e
,
o
,
s
){
var
i
=
n
.
radiiSquared
,
g
=
t
.
nwCorner
,
h
=
t
.
boundingRectangle
,
u
=
g
.
latitude
-
t
.
granYCos
*
r
+
e
*
t
.
granXSin
,
C
=
p
(
u
),
c
=
v
(
u
),
l
=
i
.
z
*
c
,
S
=
g
.
longitude
+
r
*
t
.
granYSin
+
e
*
t
.
granXCos
,
d
=
C
*
p
(
S
),
w
=
C
*
v
(
S
),
M
=
i
.
x
*
d
,
f
=
i
.
y
*
w
,
X
=
x
(
M
*
d
+
f
*
w
+
l
*
c
);
if
(
o
.
x
=
M
/
X
,
o
.
y
=
f
/
X
,
o
.
z
=
l
/
X
,
a
){
var
Y
=
t
.
stNwCorner
;
m
.
defined
(
Y
)?(
u
=
Y
.
latitude
-
t
.
stGranYCos
*
r
+
e
*
t
.
stGranXSin
,
S
=
Y
.
longitude
+
r
*
t
.
stGranYSin
+
e
*
t
.
stGranXCos
,
s
.
x
=
(
S
-
t
.
stWest
)
*
t
.
lonScalar
,
s
.
y
=
(
u
-
t
.
stSouth
)
*
t
.
latScalar
):(
s
.
x
=
(
S
-
h
.
west
)
*
t
.
lonScalar
,
s
.
y
=
(
u
-
h
.
south
)
*
t
.
latScalar
)}}},
R
=
new
G
.
Matrix2
,
y
=
new
b
.
Cartesian3
,
P
=
new
b
.
Cartographic
,
W
=
new
b
.
Cartesian3
,
_
=
new
a
.
GeographicProjection
;
function
T
(
t
,
n
,
a
,
r
,
e
,
o
,
s
){
var
i
=
Math
.
cos
(
n
),
g
=
r
*
i
,
h
=
a
*
i
,
u
=
Math
.
sin
(
n
),
C
=
r
*
u
,
c
=
a
*
u
;
y
=
_
.
project
(
t
,
y
),
y
=
b
.
Cartesian3
.
subtract
(
y
,
W
,
y
);
var
l
=
G
.
Matrix2
.
fromRotation
(
n
,
R
);
y
=
G
.
Matrix2
.
multiplyByVector
(
l
,
y
,
y
),
y
=
b
.
Cartesian3
.
add
(
y
,
W
,
y
),
--
o
,
--
s
;
var
S
=
(
t
=
_
.
unproject
(
y
,
t
)).
latitude
,
d
=
S
+
o
*
c
,
w
=
S
-
g
*
s
,
M
=
S
-
g
*
s
+
o
*
c
,
f
=
Math
.
max
(
S
,
d
,
w
,
M
),
X
=
Math
.
min
(
S
,
d
,
w
,
M
),
Y
=
t
.
longitude
,
m
=
Y
+
o
*
h
,
p
=
Y
+
s
*
C
,
v
=
Y
+
s
*
C
+
o
*
h
;
return
{
north
:
f
,
south
:
X
,
east
:
Math
.
max
(
Y
,
m
,
p
,
v
),
west
:
Math
.
min
(
Y
,
m
,
p
,
v
),
granYCos
:
g
,
granYSin
:
C
,
granXCos
:
h
,
granXSin
:
c
,
nwCorner
:
t
}}
r
.
computeOptions
=
function
(
t
,
n
,
a
,
r
,
e
,
o
,
s
){
var
i
,
g
,
h
,
u
,
C
,
c
=
t
.
east
,
l
=
t
.
west
,
S
=
t
.
north
,
d
=
t
.
south
,
w
=!
1
,
M
=!
1
;
S
===
O
.
CesiumMath
.
PI_OVER_TWO
&&
(
w
=!
0
),
d
===-
O
.
CesiumMath
.
PI_OVER_TWO
&&
(
M
=!
0
);
var
f
=
S
-
d
;
h
=
(
C
=
c
<
l
?
O
.
CesiumMath
.
TWO_PI
-
l
+
c
:
c
-
l
)
/
((
i
=
Math
.
ceil
(
C
/
n
)
+
1
)
-
1
),
u
=
f
/
((
g
=
Math
.
ceil
(
f
/
n
)
+
1
)
-
1
);
var
X
=
b
.
Rectangle
.
northwest
(
t
,
o
),
Y
=
b
.
Rectangle
.
center
(
t
,
P
);
0
===
a
&&
0
===
r
||
(
Y
.
longitude
<
X
.
longitude
&&
(
Y
.
longitude
+=
O
.
CesiumMath
.
TWO_PI
),
W
=
_
.
project
(
Y
,
W
));
var
m
=
u
,
p
=
h
,
v
=
b
.
Rectangle
.
clone
(
t
,
e
),
G
=
{
granYCos
:
m
,
granYSin
:
0
,
granXCos
:
p
,
granXSin
:
0
,
nwCorner
:
X
,
boundingRectangle
:
v
,
width
:
i
,
height
:
g
,
northCap
:
w
,
southCap
:
M
};
if
(
0
!==
a
){
var
x
=
T
(
X
,
a
,
h
,
u
,
0
,
i
,
g
);
S
=
x
.
north
,
d
=
x
.
south
,
c
=
x
.
east
,
l
=
x
.
west
,
G
.
granYCos
=
x
.
granYCos
,
G
.
granYSin
=
x
.
granYSin
,
G
.
granXCos
=
x
.
granXCos
,
G
.
granXSin
=
x
.
granXSin
,
v
.
north
=
S
,
v
.
south
=
d
,
v
.
east
=
c
,
v
.
west
=
l
}
if
(
0
!==
r
){
a
-=
r
;
var
R
=
b
.
Rectangle
.
northwest
(
v
,
s
),
y
=
T
(
R
,
a
,
h
,
u
,
0
,
i
,
g
);
G
.
stGranYCos
=
y
.
granYCos
,
G
.
stGranXCos
=
y
.
granXCos
,
G
.
stGranYSin
=
y
.
granYSin
,
G
.
stGranXSin
=
y
.
granXSin
,
G
.
stNwCorner
=
R
,
G
.
stWest
=
y
.
west
,
G
.
stSouth
=
y
.
south
}
return
G
},
t
.
RectangleGeometryLibrary
=
r
});
vcm/lib/Cesium/Workers/RuntimeError-027c380a.js
0 → 100644
View file @
c53f4211
/**
* Cesium - https://github.com/CesiumGS/cesium
*
* Copyright 2011-2020 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/master/LICENSE.md for full licensing details.
*/
define
([
"
exports
"
,
"
./when-60b00257
"
],
function
(
t
,
r
){
"
use strict
"
;
function
e
(
t
){
var
r
;
this
.
name
=
"
RuntimeError
"
,
this
.
message
=
t
;
try
{
throw
new
Error
}
catch
(
t
){
r
=
t
.
stack
}
this
.
stack
=
r
}
r
.
defined
(
Object
.
create
)
&&
((
e
.
prototype
=
Object
.
create
(
Error
.
prototype
)).
constructor
=
e
),
e
.
prototype
.
toString
=
function
(){
var
t
=
this
.
name
+
"
:
"
+
this
.
message
;
return
r
.
defined
(
this
.
stack
)
&&
(
t
+=
"
\n
"
+
this
.
stack
.
toString
()),
t
},
t
.
RuntimeError
=
e
});
vcm/lib/Cesium/Workers/TerrainEncoding-f08a848c.js
0 → 100644
View file @
c53f4211
/**
* Cesium - https://github.com/CesiumGS/cesium
*
* Copyright 2011-2020 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/master/LICENSE.md for full licensing details.
*/
define
([
"
exports
"
,
"
./when-60b00257
"
,
"
./Check-4274a1fd
"
,
"
./Math-9d37f659
"
,
"
./Cartesian2-2951f601
"
,
"
./Transforms-53ff6d12
"
,
"
./ComponentDatatype-a29c6075
"
,
"
./AttributeCompression-a0720a96
"
],
function
(
t
,
y
,
e
,
f
,
b
,
v
,
s
,
x
){
"
use strict
"
;
function
i
(
t
,
e
){
this
.
_ellipsoid
=
t
,
this
.
_cameraPosition
=
new
b
.
Cartesian3
,
this
.
_cameraPositionInScaledSpace
=
new
b
.
Cartesian3
,
this
.
_distanceToLimbInScaledSpaceSquared
=
0
,
y
.
defined
(
e
)
&&
(
this
.
cameraPosition
=
e
)}
Object
.
defineProperties
(
i
.
prototype
,{
ellipsoid
:{
get
:
function
(){
return
this
.
_ellipsoid
}},
cameraPosition
:{
get
:
function
(){
return
this
.
_cameraPosition
},
set
:
function
(
t
){
var
e
=
this
.
_ellipsoid
.
transformPositionToScaledSpace
(
t
,
this
.
_cameraPositionInScaledSpace
),
i
=
b
.
Cartesian3
.
magnitudeSquared
(
e
)
-
1
;
b
.
Cartesian3
.
clone
(
t
,
this
.
_cameraPosition
),
this
.
_cameraPositionInScaledSpace
=
e
,
this
.
_distanceToLimbInScaledSpaceSquared
=
i
}}});
var
m
=
new
b
.
Cartesian3
;
i
.
prototype
.
isPointVisible
=
function
(
t
){
return
h
(
this
.
_ellipsoid
.
transformPositionToScaledSpace
(
t
,
m
),
this
.
_cameraPositionInScaledSpace
,
this
.
_distanceToLimbInScaledSpaceSquared
)},
i
.
prototype
.
isScaledSpacePointVisible
=
function
(
t
){
return
h
(
t
,
this
.
_cameraPositionInScaledSpace
,
this
.
_distanceToLimbInScaledSpaceSquared
)};
var
n
=
new
b
.
Cartesian3
;
i
.
prototype
.
isScaledSpacePointVisiblePossiblyUnderEllipsoid
=
function
(
t
,
e
){
var
i
,
r
,
a
=
this
.
_ellipsoid
;
return
i
=
y
.
defined
(
e
)
&&
e
<
0
&&
a
.
minimumRadius
>-
e
?((
r
=
n
).
x
=
this
.
_cameraPosition
.
x
/
(
a
.
radii
.
x
+
e
),
r
.
y
=
this
.
_cameraPosition
.
y
/
(
a
.
radii
.
y
+
e
),
r
.
z
=
this
.
_cameraPosition
.
z
/
(
a
.
radii
.
z
+
e
),
r
.
x
*
r
.
x
+
r
.
y
*
r
.
y
+
r
.
z
*
r
.
z
-
1
):(
r
=
this
.
_cameraPositionInScaledSpace
,
this
.
_distanceToLimbInScaledSpaceSquared
),
h
(
t
,
r
,
i
)},
i
.
prototype
.
computeHorizonCullingPoint
=
function
(
t
,
e
,
i
){
return
d
(
this
.
_ellipsoid
,
t
,
e
,
i
)};
var
o
=
b
.
Ellipsoid
.
clone
(
b
.
Ellipsoid
.
UNIT_SPHERE
);
i
.
prototype
.
computeHorizonCullingPointPossiblyUnderEllipsoid
=
function
(
t
,
e
,
i
,
r
){
return
d
(
u
(
this
.
_ellipsoid
,
i
,
o
),
t
,
e
,
r
)},
i
.
prototype
.
computeHorizonCullingPointFromVertices
=
function
(
t
,
e
,
i
,
r
,
a
){
return
p
(
this
.
_ellipsoid
,
t
,
e
,
i
,
r
,
a
)},
i
.
prototype
.
computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid
=
function
(
t
,
e
,
i
,
r
,
a
,
n
){
return
p
(
u
(
this
.
_ellipsoid
,
a
,
o
),
t
,
e
,
i
,
r
,
n
)};
var
c
=
[];
i
.
prototype
.
computeHorizonCullingPointFromRectangle
=
function
(
t
,
e
,
i
){
var
r
=
b
.
Rectangle
.
subsample
(
t
,
e
,
0
,
c
),
a
=
v
.
BoundingSphere
.
fromPoints
(
r
);
if
(
!
(
b
.
Cartesian3
.
magnitude
(
a
.
center
)
<
.
1
*
e
.
minimumRadius
))
return
this
.
computeHorizonCullingPoint
(
a
.
center
,
r
,
i
)};
var
a
=
new
b
.
Cartesian3
;
function
u
(
t
,
e
,
i
){
if
(
y
.
defined
(
e
)
&&
e
<
0
&&
t
.
minimumRadius
>-
e
){
var
r
=
b
.
Cartesian3
.
fromElements
(
t
.
radii
.
x
+
e
,
t
.
radii
.
y
+
e
,
t
.
radii
.
z
+
e
,
a
);
t
=
b
.
Ellipsoid
.
fromCartesian3
(
r
,
i
)}
return
t
}
function
d
(
t
,
e
,
i
,
r
){
y
.
defined
(
r
)
||
(
r
=
new
b
.
Cartesian3
);
for
(
var
a
=
T
(
t
,
e
),
n
=
0
,
o
=
0
,
s
=
i
.
length
;
o
<
s
;
++
o
){
var
m
=
M
(
t
,
i
[
o
],
a
);
if
(
m
<
0
)
return
;
n
=
Math
.
max
(
n
,
m
)}
return
g
(
a
,
n
,
r
)}
var
l
=
new
b
.
Cartesian3
;
function
p
(
t
,
e
,
i
,
r
,
a
,
n
){
y
.
defined
(
n
)
||
(
n
=
new
b
.
Cartesian3
),
r
=
y
.
defaultValue
(
r
,
3
),
a
=
y
.
defaultValue
(
a
,
b
.
Cartesian3
.
ZERO
);
for
(
var
o
=
T
(
t
,
e
),
s
=
0
,
m
=
0
,
c
=
i
.
length
;
m
<
c
;
m
+=
r
){
l
.
x
=
i
[
m
]
+
a
.
x
,
l
.
y
=
i
[
m
+
1
]
+
a
.
y
,
l
.
z
=
i
[
m
+
2
]
+
a
.
z
;
var
u
=
M
(
t
,
l
,
o
);
if
(
u
<
0
)
return
;
s
=
Math
.
max
(
s
,
u
)}
return
g
(
o
,
s
,
n
)}
function
h
(
t
,
e
,
i
){
var
r
=
e
,
a
=
i
,
n
=
b
.
Cartesian3
.
subtract
(
t
,
r
,
m
),
o
=-
b
.
Cartesian3
.
dot
(
n
,
r
);
return
!
(
a
<
0
?
0
<
o
:
a
<
o
&&
o
*
o
/
b
.
Cartesian3
.
magnitudeSquared
(
n
)
>
a
)}
var
C
=
new
b
.
Cartesian3
,
S
=
new
b
.
Cartesian3
;
function
M
(
t
,
e
,
i
){
var
r
=
t
.
transformPositionToScaledSpace
(
e
,
C
),
a
=
b
.
Cartesian3
.
magnitudeSquared
(
r
),
n
=
Math
.
sqrt
(
a
),
o
=
b
.
Cartesian3
.
divideByScalar
(
r
,
n
,
S
);
a
=
Math
.
max
(
1
,
a
);
var
s
=
1
/
(
n
=
Math
.
max
(
1
,
n
));
return
1
/
(
b
.
Cartesian3
.
dot
(
o
,
i
)
*
s
-
b
.
Cartesian3
.
magnitude
(
b
.
Cartesian3
.
cross
(
o
,
i
,
o
))
*
(
Math
.
sqrt
(
a
-
1
)
*
s
))}
function
g
(
t
,
e
,
i
){
if
(
!
(
e
<=
0
||
e
===
1
/
0
||
e
!=
e
))
return
b
.
Cartesian3
.
multiplyByScalar
(
t
,
e
,
i
)}
var
r
=
new
b
.
Cartesian3
;
function
T
(
t
,
e
){
return
b
.
Cartesian3
.
equals
(
e
,
b
.
Cartesian3
.
ZERO
)?
e
:(
t
.
transformPositionToScaledSpace
(
e
,
r
),
b
.
Cartesian3
.
normalize
(
r
,
r
))}
var
P
=
Object
.
freeze
({
NONE
:
0
,
BITS12
:
1
}),
z
=
new
b
.
Cartesian3
,
E
=
new
b
.
Cartesian3
,
N
=
new
b
.
Cartesian2
,
I
=
new
v
.
Matrix4
,
B
=
new
v
.
Matrix4
,
_
=
Math
.
pow
(
2
,
12
);
function
w
(
t
,
e
,
i
,
r
,
a
,
n
){
var
o
,
s
,
m
,
c
=
P
.
NONE
;
if
(
y
.
defined
(
t
)
&&
y
.
defined
(
e
)
&&
y
.
defined
(
i
)
&&
y
.
defined
(
r
)){
var
u
=
t
.
minimum
,
d
=
t
.
maximum
,
l
=
b
.
Cartesian3
.
subtract
(
d
,
u
,
E
),
p
=
i
-
e
;
c
=
Math
.
max
(
b
.
Cartesian3
.
maximumComponent
(
l
),
p
)
<
_
-
1
?
P
.
BITS12
:
P
.
NONE
,
o
=
t
.
center
,
s
=
v
.
Matrix4
.
inverseTransformation
(
r
,
new
v
.
Matrix4
);
var
h
=
b
.
Cartesian3
.
negate
(
u
,
z
);
v
.
Matrix4
.
multiply
(
v
.
Matrix4
.
fromTranslation
(
h
,
I
),
s
,
s
);
var
f
=
z
;
f
.
x
=
1
/
l
.
x
,
f
.
y
=
1
/
l
.
y
,
f
.
z
=
1
/
l
.
z
,
v
.
Matrix4
.
multiply
(
v
.
Matrix4
.
fromScale
(
f
,
I
),
s
,
s
),
m
=
v
.
Matrix4
.
clone
(
r
),
v
.
Matrix4
.
setTranslation
(
m
,
b
.
Cartesian3
.
ZERO
,
m
),
r
=
v
.
Matrix4
.
clone
(
r
,
new
v
.
Matrix4
);
var
x
=
v
.
Matrix4
.
fromTranslation
(
u
,
I
),
C
=
v
.
Matrix4
.
fromScale
(
l
,
B
),
S
=
v
.
Matrix4
.
multiply
(
x
,
C
,
I
);
v
.
Matrix4
.
multiply
(
r
,
S
,
r
),
v
.
Matrix4
.
multiply
(
m
,
S
,
m
)}
this
.
quantization
=
c
,
this
.
minimumHeight
=
e
,
this
.
maximumHeight
=
i
,
this
.
center
=
o
,
this
.
toScaledENU
=
s
,
this
.
fromScaledENU
=
r
,
this
.
matrix
=
m
,
this
.
hasVertexNormals
=
a
,
this
.
hasWebMercatorT
=
y
.
defaultValue
(
n
,
!
1
)}
w
.
prototype
.
encode
=
function
(
t
,
e
,
i
,
r
,
a
,
n
,
o
){
var
s
=
r
.
x
,
m
=
r
.
y
;
if
(
this
.
quantization
===
P
.
BITS12
){(
i
=
v
.
Matrix4
.
multiplyByPoint
(
this
.
toScaledENU
,
i
,
z
)).
x
=
f
.
CesiumMath
.
clamp
(
i
.
x
,
0
,
1
),
i
.
y
=
f
.
CesiumMath
.
clamp
(
i
.
y
,
0
,
1
),
i
.
z
=
f
.
CesiumMath
.
clamp
(
i
.
z
,
0
,
1
);
var
c
=
this
.
maximumHeight
-
this
.
minimumHeight
,
u
=
f
.
CesiumMath
.
clamp
((
a
-
this
.
minimumHeight
)
/
c
,
0
,
1
);
b
.
Cartesian2
.
fromElements
(
i
.
x
,
i
.
y
,
N
);
var
d
=
x
.
AttributeCompression
.
compressTextureCoordinates
(
N
);
b
.
Cartesian2
.
fromElements
(
i
.
z
,
u
,
N
);
var
l
=
x
.
AttributeCompression
.
compressTextureCoordinates
(
N
);
b
.
Cartesian2
.
fromElements
(
s
,
m
,
N
);
var
p
=
x
.
AttributeCompression
.
compressTextureCoordinates
(
N
);
if
(
t
[
e
++
]
=
d
,
t
[
e
++
]
=
l
,
t
[
e
++
]
=
p
,
this
.
hasWebMercatorT
){
b
.
Cartesian2
.
fromElements
(
o
,
0
,
N
);
var
h
=
x
.
AttributeCompression
.
compressTextureCoordinates
(
N
);
t
[
e
++
]
=
h
}}
else
b
.
Cartesian3
.
subtract
(
i
,
this
.
center
,
z
),
t
[
e
++
]
=
z
.
x
,
t
[
e
++
]
=
z
.
y
,
t
[
e
++
]
=
z
.
z
,
t
[
e
++
]
=
a
,
t
[
e
++
]
=
s
,
t
[
e
++
]
=
m
,
this
.
hasWebMercatorT
&&
(
t
[
e
++
]
=
o
);
return
this
.
hasVertexNormals
&&
(
t
[
e
++
]
=
x
.
AttributeCompression
.
octPackFloat
(
n
)),
e
},
w
.
prototype
.
decodePosition
=
function
(
t
,
e
,
i
){
if
(
y
.
defined
(
i
)
||
(
i
=
new
b
.
Cartesian3
),
e
*=
this
.
getStride
(),
this
.
quantization
!==
P
.
BITS12
)
return
i
.
x
=
t
[
e
],
i
.
y
=
t
[
e
+
1
],
i
.
z
=
t
[
e
+
2
],
b
.
Cartesian3
.
add
(
i
,
this
.
center
,
i
);
var
r
=
x
.
AttributeCompression
.
decompressTextureCoordinates
(
t
[
e
],
N
);
i
.
x
=
r
.
x
,
i
.
y
=
r
.
y
;
var
a
=
x
.
AttributeCompression
.
decompressTextureCoordinates
(
t
[
e
+
1
],
N
);
return
i
.
z
=
a
.
x
,
v
.
Matrix4
.
multiplyByPoint
(
this
.
fromScaledENU
,
i
,
i
)},
w
.
prototype
.
decodeTextureCoordinates
=
function
(
t
,
e
,
i
){
return
y
.
defined
(
i
)
||
(
i
=
new
b
.
Cartesian2
),
e
*=
this
.
getStride
(),
this
.
quantization
===
P
.
BITS12
?
x
.
AttributeCompression
.
decompressTextureCoordinates
(
t
[
e
+
2
],
i
):
b
.
Cartesian2
.
fromElements
(
t
[
e
+
4
],
t
[
e
+
5
],
i
)},
w
.
prototype
.
decodeHeight
=
function
(
t
,
e
){
return
e
*=
this
.
getStride
(),
this
.
quantization
!==
P
.
BITS12
?
t
[
e
+
3
]:
x
.
AttributeCompression
.
decompressTextureCoordinates
(
t
[
e
+
1
],
N
).
y
*
(
this
.
maximumHeight
-
this
.
minimumHeight
)
+
this
.
minimumHeight
},
w
.
prototype
.
decodeWebMercatorT
=
function
(
t
,
e
){
return
e
*=
this
.
getStride
(),
this
.
quantization
===
P
.
BITS12
?
x
.
AttributeCompression
.
decompressTextureCoordinates
(
t
[
e
+
3
],
N
).
x
:
t
[
e
+
6
]},
w
.
prototype
.
getOctEncodedNormal
=
function
(
t
,
e
,
i
){
var
r
=
t
[
e
=
(
e
+
1
)
*
this
.
getStride
()
-
1
]
/
256
,
a
=
Math
.
floor
(
r
),
n
=
256
*
(
r
-
a
);
return
b
.
Cartesian2
.
fromElements
(
a
,
n
,
i
)},
w
.
prototype
.
getStride
=
function
(){
var
t
;
switch
(
this
.
quantization
){
case
P
.
BITS12
:
t
=
3
;
break
;
default
:
t
=
6
}
return
this
.
hasWebMercatorT
&&++
t
,
this
.
hasVertexNormals
&&++
t
,
t
};
var
A
=
{
position3DAndHeight
:
0
,
textureCoordAndEncodedNormals
:
1
},
q
=
{
compressed0
:
0
,
compressed1
:
1
};
w
.
prototype
.
getAttributes
=
function
(
t
){
var
e
,
i
=
s
.
ComponentDatatype
.
FLOAT
,
r
=
s
.
ComponentDatatype
.
getSizeInBytes
(
i
);
if
(
this
.
quantization
===
P
.
NONE
){
var
a
=
2
;
return
this
.
hasWebMercatorT
&&++
a
,
this
.
hasVertexNormals
&&++
a
,[{
index
:
A
.
position3DAndHeight
,
vertexBuffer
:
t
,
componentDatatype
:
i
,
componentsPerAttribute
:
4
,
offsetInBytes
:
0
,
strideInBytes
:
e
=
(
4
+
a
)
*
r
},{
index
:
A
.
textureCoordAndEncodedNormals
,
vertexBuffer
:
t
,
componentDatatype
:
i
,
componentsPerAttribute
:
a
,
offsetInBytes
:
4
*
r
,
strideInBytes
:
e
}]}
var
n
=
3
,
o
=
0
;
return
(
this
.
hasWebMercatorT
||
this
.
hasVertexNormals
)
&&++
n
,
this
.
hasWebMercatorT
&&
this
.
hasVertexNormals
?[{
index
:
q
.
compressed0
,
vertexBuffer
:
t
,
componentDatatype
:
i
,
componentsPerAttribute
:
n
,
offsetInBytes
:
0
,
strideInBytes
:
e
=
(
n
+
++
o
)
*
r
},{
index
:
q
.
compressed1
,
vertexBuffer
:
t
,
componentDatatype
:
i
,
componentsPerAttribute
:
o
,
offsetInBytes
:
n
*
r
,
strideInBytes
:
e
}]:[{
index
:
q
.
compressed0
,
vertexBuffer
:
t
,
componentDatatype
:
i
,
componentsPerAttribute
:
n
}]},
w
.
prototype
.
getAttributeLocations
=
function
(){
return
this
.
quantization
===
P
.
NONE
?
A
:
q
},
w
.
clone
=
function
(
t
,
e
){
return
y
.
defined
(
e
)
||
(
e
=
new
w
),
e
.
quantization
=
t
.
quantization
,
e
.
minimumHeight
=
t
.
minimumHeight
,
e
.
maximumHeight
=
t
.
maximumHeight
,
e
.
center
=
b
.
Cartesian3
.
clone
(
t
.
center
),
e
.
toScaledENU
=
v
.
Matrix4
.
clone
(
t
.
toScaledENU
),
e
.
fromScaledENU
=
v
.
Matrix4
.
clone
(
t
.
fromScaledENU
),
e
.
matrix
=
v
.
Matrix4
.
clone
(
t
.
matrix
),
e
.
hasVertexNormals
=
t
.
hasVertexNormals
,
e
.
hasWebMercatorT
=
t
.
hasWebMercatorT
,
e
},
t
.
EllipsoidalOccluder
=
i
,
t
.
TerrainEncoding
=
w
});
vcm/lib/Cesium/Workers/Transforms-53ff6d12.js
0 → 100644
View file @
c53f4211
This diff is collapsed.
Click to expand it.
vcm/lib/Cesium/Workers/VertexFormat-6af5bab1.js
0 → 100644
View file @
c53f4211
/**
* Cesium - https://github.com/CesiumGS/cesium
*
* Copyright 2011-2020 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/master/LICENSE.md for full licensing details.
*/
define
([
"
exports
"
,
"
./when-60b00257
"
,
"
./Check-4274a1fd
"
],
function
(
e
,
o
,
t
){
"
use strict
"
;
function
a
(
e
){
e
=
o
.
defaultValue
(
e
,
o
.
defaultValue
.
EMPTY_OBJECT
),
this
.
position
=
o
.
defaultValue
(
e
.
position
,
!
1
),
this
.
normal
=
o
.
defaultValue
(
e
.
normal
,
!
1
),
this
.
st
=
o
.
defaultValue
(
e
.
st
,
!
1
),
this
.
bitangent
=
o
.
defaultValue
(
e
.
bitangent
,
!
1
),
this
.
tangent
=
o
.
defaultValue
(
e
.
tangent
,
!
1
),
this
.
color
=
o
.
defaultValue
(
e
.
color
,
!
1
)}
a
.
POSITION_ONLY
=
Object
.
freeze
(
new
a
({
position
:
!
0
})),
a
.
POSITION_AND_NORMAL
=
Object
.
freeze
(
new
a
({
position
:
!
0
,
normal
:
!
0
})),
a
.
POSITION_NORMAL_AND_ST
=
Object
.
freeze
(
new
a
({
position
:
!
0
,
normal
:
!
0
,
st
:
!
0
})),
a
.
POSITION_AND_ST
=
Object
.
freeze
(
new
a
({
position
:
!
0
,
st
:
!
0
})),
a
.
POSITION_AND_COLOR
=
Object
.
freeze
(
new
a
({
position
:
!
0
,
color
:
!
0
})),
a
.
ALL
=
Object
.
freeze
(
new
a
({
position
:
!
0
,
normal
:
!
0
,
st
:
!
0
,
tangent
:
!
0
,
bitangent
:
!
0
})),
a
.
DEFAULT
=
a
.
POSITION_NORMAL_AND_ST
,
a
.
packedLength
=
6
,
a
.
pack
=
function
(
e
,
t
,
n
){
return
n
=
o
.
defaultValue
(
n
,
0
),
t
[
n
++
]
=
e
.
position
?
1
:
0
,
t
[
n
++
]
=
e
.
normal
?
1
:
0
,
t
[
n
++
]
=
e
.
st
?
1
:
0
,
t
[
n
++
]
=
e
.
tangent
?
1
:
0
,
t
[
n
++
]
=
e
.
bitangent
?
1
:
0
,
t
[
n
]
=
e
.
color
?
1
:
0
,
t
},
a
.
unpack
=
function
(
e
,
t
,
n
){
return
t
=
o
.
defaultValue
(
t
,
0
),
o
.
defined
(
n
)
||
(
n
=
new
a
),
n
.
position
=
1
===
e
[
t
++
],
n
.
normal
=
1
===
e
[
t
++
],
n
.
st
=
1
===
e
[
t
++
],
n
.
tangent
=
1
===
e
[
t
++
],
n
.
bitangent
=
1
===
e
[
t
++
],
n
.
color
=
1
===
e
[
t
],
n
},
a
.
clone
=
function
(
e
,
t
){
if
(
o
.
defined
(
e
))
return
o
.
defined
(
t
)
||
(
t
=
new
a
),
t
.
position
=
e
.
position
,
t
.
normal
=
e
.
normal
,
t
.
st
=
e
.
st
,
t
.
tangent
=
e
.
tangent
,
t
.
bitangent
=
e
.
bitangent
,
t
.
color
=
e
.
color
,
t
},
e
.
VertexFormat
=
a
});
vcm/lib/Cesium/Workers/WallGeometryLibrary-e01bc2d2.js
0 → 100644
View file @
c53f4211
/**
* Cesium - https://github.com/CesiumGS/cesium
*
* Copyright 2011-2020 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/master/LICENSE.md for full licensing details.
*/
define
([
"
exports
"
,
"
./when-60b00257
"
,
"
./Math-9d37f659
"
,
"
./Cartesian2-2951f601
"
,
"
./EllipsoidTangentPlane-f9b097b8
"
,
"
./PolygonPipeline-72c6abb2
"
,
"
./PolylinePipeline-30fab084
"
],
function
(
e
,
C
,
A
,
w
,
b
,
E
,
O
){
"
use strict
"
;
var
i
=
{};
var
M
=
new
w
.
Cartographic
,
L
=
new
w
.
Cartographic
;
var
F
=
new
Array
(
2
),
H
=
new
Array
(
2
),
T
=
{
positions
:
void
0
,
height
:
void
0
,
granularity
:
void
0
,
ellipsoid
:
void
0
};
i
.
computePositions
=
function
(
e
,
i
,
t
,
n
,
r
,
o
){
var
a
=
function
(
e
,
i
,
t
,
n
){
var
r
=
i
.
length
;
if
(
!
(
r
<
2
)){
var
o
=
C
.
defined
(
n
),
a
=
C
.
defined
(
t
),
l
=!
0
,
h
=
new
Array
(
r
),
s
=
new
Array
(
r
),
g
=
new
Array
(
r
),
p
=
i
[
0
];
h
[
0
]
=
p
;
var
P
=
e
.
cartesianToCartographic
(
p
,
M
);
a
&&
(
P
.
height
=
t
[
0
]),
l
=
l
&&
P
.
height
<=
0
,
s
[
0
]
=
P
.
height
,
g
[
0
]
=
o
?
n
[
0
]:
0
;
for
(
var
d
,
u
,
c
=
1
,
v
=
1
;
v
<
r
;
++
v
){
var
f
=
i
[
v
],
y
=
e
.
cartesianToCartographic
(
f
,
L
);
a
&&
(
y
.
height
=
t
[
v
]),
l
=
l
&&
y
.
height
<=
0
,
d
=
P
,
u
=
y
,
A
.
CesiumMath
.
equalsEpsilon
(
d
.
latitude
,
u
.
latitude
,
A
.
CesiumMath
.
EPSILON14
)
&&
A
.
CesiumMath
.
equalsEpsilon
(
d
.
longitude
,
u
.
longitude
,
A
.
CesiumMath
.
EPSILON14
)?
P
.
height
<
y
.
height
&&
(
s
[
c
-
1
]
=
y
.
height
):(
h
[
c
]
=
f
,
s
[
c
]
=
y
.
height
,
g
[
c
]
=
o
?
n
[
v
]:
0
,
w
.
Cartographic
.
clone
(
y
,
P
),
++
c
)}
if
(
!
(
l
||
c
<
2
))
return
h
.
length
=
c
,
s
.
length
=
c
,
g
.
length
=
c
,{
positions
:
h
,
topHeights
:
s
,
bottomHeights
:
g
}}}(
e
,
i
,
t
,
n
);
if
(
C
.
defined
(
a
)){
if
(
i
=
a
.
positions
,
t
=
a
.
topHeights
,
n
=
a
.
bottomHeights
,
3
<=
i
.
length
){
var
l
=
b
.
EllipsoidTangentPlane
.
fromPoints
(
i
,
e
).
projectPointsOntoPlane
(
i
);
E
.
PolygonPipeline
.
computeWindingOrder2D
(
l
)
===
E
.
WindingOrder
.
CLOCKWISE
&&
(
i
.
reverse
(),
t
.
reverse
(),
n
.
reverse
())}
var
h
,
s
,
g
=
i
.
length
,
p
=
g
-
2
,
P
=
A
.
CesiumMath
.
chordLength
(
r
,
e
.
maximumRadius
),
d
=
T
;
if
(
d
.
minDistance
=
P
,
d
.
ellipsoid
=
e
,
o
){
var
u
,
c
=
0
;
for
(
u
=
0
;
u
<
g
-
1
;
u
++
)
c
+=
O
.
PolylinePipeline
.
numberOfPoints
(
i
[
u
],
i
[
u
+
1
],
P
)
+
1
;
h
=
new
Float64Array
(
3
*
c
),
s
=
new
Float64Array
(
3
*
c
);
var
v
=
F
,
f
=
H
;
d
.
positions
=
v
,
d
.
height
=
f
;
var
y
=
0
;
for
(
u
=
0
;
u
<
g
-
1
;
u
++
){
v
[
0
]
=
i
[
u
],
v
[
1
]
=
i
[
u
+
1
],
f
[
0
]
=
t
[
u
],
f
[
1
]
=
t
[
u
+
1
];
var
m
=
O
.
PolylinePipeline
.
generateArc
(
d
);
h
.
set
(
m
,
y
),
f
[
0
]
=
n
[
u
],
f
[
1
]
=
n
[
u
+
1
],
s
.
set
(
O
.
PolylinePipeline
.
generateArc
(
d
),
y
),
y
+=
m
.
length
}}
else
d
.
positions
=
i
,
d
.
height
=
t
,
h
=
new
Float64Array
(
O
.
PolylinePipeline
.
generateArc
(
d
)),
d
.
height
=
n
,
s
=
new
Float64Array
(
O
.
PolylinePipeline
.
generateArc
(
d
));
return
{
bottomPositions
:
s
,
topPositions
:
h
,
numCorners
:
p
}}},
e
.
WallGeometryLibrary
=
i
});
vcm/lib/Cesium/Workers/WebGLConstants-779bf0bc.js
0 → 100644
View file @
c53f4211
/**
* Cesium - https://github.com/CesiumGS/cesium
*
* Copyright 2011-2020 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/master/LICENSE.md for full licensing details.
*/
define
([
"
exports
"
],
function
(
E
){
"
use strict
"
;
var
_
=
Object
.
freeze
({
DEPTH_BUFFER_BIT
:
256
,
STENCIL_BUFFER_BIT
:
1024
,
COLOR_BUFFER_BIT
:
16384
,
POINTS
:
0
,
LINES
:
1
,
LINE_LOOP
:
2
,
LINE_STRIP
:
3
,
TRIANGLES
:
4
,
TRIANGLE_STRIP
:
5
,
TRIANGLE_FAN
:
6
,
ZERO
:
0
,
ONE
:
1
,
SRC_COLOR
:
768
,
ONE_MINUS_SRC_COLOR
:
769
,
SRC_ALPHA
:
770
,
ONE_MINUS_SRC_ALPHA
:
771
,
DST_ALPHA
:
772
,
ONE_MINUS_DST_ALPHA
:
773
,
DST_COLOR
:
774
,
ONE_MINUS_DST_COLOR
:
775
,
SRC_ALPHA_SATURATE
:
776
,
FUNC_ADD
:
32774
,
BLEND_EQUATION
:
32777
,
BLEND_EQUATION_RGB
:
32777
,
BLEND_EQUATION_ALPHA
:
34877
,
FUNC_SUBTRACT
:
32778
,
FUNC_REVERSE_SUBTRACT
:
32779
,
BLEND_DST_RGB
:
32968
,
BLEND_SRC_RGB
:
32969
,
BLEND_DST_ALPHA
:
32970
,
BLEND_SRC_ALPHA
:
32971
,
CONSTANT_COLOR
:
32769
,
ONE_MINUS_CONSTANT_COLOR
:
32770
,
CONSTANT_ALPHA
:
32771
,
ONE_MINUS_CONSTANT_ALPHA
:
32772
,
BLEND_COLOR
:
32773
,
ARRAY_BUFFER
:
34962
,
ELEMENT_ARRAY_BUFFER
:
34963
,
ARRAY_BUFFER_BINDING
:
34964
,
ELEMENT_ARRAY_BUFFER_BINDING
:
34965
,
STREAM_DRAW
:
35040
,
STATIC_DRAW
:
35044
,
DYNAMIC_DRAW
:
35048
,
BUFFER_SIZE
:
34660
,
BUFFER_USAGE
:
34661
,
CURRENT_VERTEX_ATTRIB
:
34342
,
FRONT
:
1028
,
BACK
:
1029
,
FRONT_AND_BACK
:
1032
,
CULL_FACE
:
2884
,
BLEND
:
3042
,
DITHER
:
3024
,
STENCIL_TEST
:
2960
,
DEPTH_TEST
:
2929
,
SCISSOR_TEST
:
3089
,
POLYGON_OFFSET_FILL
:
32823
,
SAMPLE_ALPHA_TO_COVERAGE
:
32926
,
SAMPLE_COVERAGE
:
32928
,
NO_ERROR
:
0
,
INVALID_ENUM
:
1280
,
INVALID_VALUE
:
1281
,
INVALID_OPERATION
:
1282
,
OUT_OF_MEMORY
:
1285
,
CW
:
2304
,
CCW
:
2305
,
LINE_WIDTH
:
2849
,
ALIASED_POINT_SIZE_RANGE
:
33901
,
ALIASED_LINE_WIDTH_RANGE
:
33902
,
CULL_FACE_MODE
:
2885
,
FRONT_FACE
:
2886
,
DEPTH_RANGE
:
2928
,
DEPTH_WRITEMASK
:
2930
,
DEPTH_CLEAR_VALUE
:
2931
,
DEPTH_FUNC
:
2932
,
STENCIL_CLEAR_VALUE
:
2961
,
STENCIL_FUNC
:
2962
,
STENCIL_FAIL
:
2964
,
STENCIL_PASS_DEPTH_FAIL
:
2965
,
STENCIL_PASS_DEPTH_PASS
:
2966
,
STENCIL_REF
:
2967
,
STENCIL_VALUE_MASK
:
2963
,
STENCIL_WRITEMASK
:
2968
,
STENCIL_BACK_FUNC
:
34816
,
STENCIL_BACK_FAIL
:
34817
,
STENCIL_BACK_PASS_DEPTH_FAIL
:
34818
,
STENCIL_BACK_PASS_DEPTH_PASS
:
34819
,
STENCIL_BACK_REF
:
36003
,
STENCIL_BACK_VALUE_MASK
:
36004
,
STENCIL_BACK_WRITEMASK
:
36005
,
VIEWPORT
:
2978
,
SCISSOR_BOX
:
3088
,
COLOR_CLEAR_VALUE
:
3106
,
COLOR_WRITEMASK
:
3107
,
UNPACK_ALIGNMENT
:
3317
,
PACK_ALIGNMENT
:
3333
,
MAX_TEXTURE_SIZE
:
3379
,
MAX_VIEWPORT_DIMS
:
3386
,
SUBPIXEL_BITS
:
3408
,
RED_BITS
:
3410
,
GREEN_BITS
:
3411
,
BLUE_BITS
:
3412
,
ALPHA_BITS
:
3413
,
DEPTH_BITS
:
3414
,
STENCIL_BITS
:
3415
,
POLYGON_OFFSET_UNITS
:
10752
,
POLYGON_OFFSET_FACTOR
:
32824
,
TEXTURE_BINDING_2D
:
32873
,
SAMPLE_BUFFERS
:
32936
,
SAMPLES
:
32937
,
SAMPLE_COVERAGE_VALUE
:
32938
,
SAMPLE_COVERAGE_INVERT
:
32939
,
COMPRESSED_TEXTURE_FORMATS
:
34467
,
DONT_CARE
:
4352
,
FASTEST
:
4353
,
NICEST
:
4354
,
GENERATE_MIPMAP_HINT
:
33170
,
BYTE
:
5120
,
UNSIGNED_BYTE
:
5121
,
SHORT
:
5122
,
UNSIGNED_SHORT
:
5123
,
INT
:
5124
,
UNSIGNED_INT
:
5125
,
FLOAT
:
5126
,
DEPTH_COMPONENT
:
6402
,
ALPHA
:
6406
,
RGB
:
6407
,
RGBA
:
6408
,
LUMINANCE
:
6409
,
LUMINANCE_ALPHA
:
6410
,
UNSIGNED_SHORT_4_4_4_4
:
32819
,
UNSIGNED_SHORT_5_5_5_1
:
32820
,
UNSIGNED_SHORT_5_6_5
:
33635
,
FRAGMENT_SHADER
:
35632
,
VERTEX_SHADER
:
35633
,
MAX_VERTEX_ATTRIBS
:
34921
,
MAX_VERTEX_UNIFORM_VECTORS
:
36347
,
MAX_VARYING_VECTORS
:
36348
,
MAX_COMBINED_TEXTURE_IMAGE_UNITS
:
35661
,
MAX_VERTEX_TEXTURE_IMAGE_UNITS
:
35660
,
MAX_TEXTURE_IMAGE_UNITS
:
34930
,
MAX_FRAGMENT_UNIFORM_VECTORS
:
36349
,
SHADER_TYPE
:
35663
,
DELETE_STATUS
:
35712
,
LINK_STATUS
:
35714
,
VALIDATE_STATUS
:
35715
,
ATTACHED_SHADERS
:
35717
,
ACTIVE_UNIFORMS
:
35718
,
ACTIVE_ATTRIBUTES
:
35721
,
SHADING_LANGUAGE_VERSION
:
35724
,
CURRENT_PROGRAM
:
35725
,
NEVER
:
512
,
LESS
:
513
,
EQUAL
:
514
,
LEQUAL
:
515
,
GREATER
:
516
,
NOTEQUAL
:
517
,
GEQUAL
:
518
,
ALWAYS
:
519
,
KEEP
:
7680
,
REPLACE
:
7681
,
INCR
:
7682
,
DECR
:
7683
,
INVERT
:
5386
,
INCR_WRAP
:
34055
,
DECR_WRAP
:
34056
,
VENDOR
:
7936
,
RENDERER
:
7937
,
VERSION
:
7938
,
NEAREST
:
9728
,
LINEAR
:
9729
,
NEAREST_MIPMAP_NEAREST
:
9984
,
LINEAR_MIPMAP_NEAREST
:
9985
,
NEAREST_MIPMAP_LINEAR
:
9986
,
LINEAR_MIPMAP_LINEAR
:
9987
,
TEXTURE_MAG_FILTER
:
10240
,
TEXTURE_MIN_FILTER
:
10241
,
TEXTURE_WRAP_S
:
10242
,
TEXTURE_WRAP_T
:
10243
,
TEXTURE_2D
:
3553
,
TEXTURE
:
5890
,
TEXTURE_CUBE_MAP
:
34067
,
TEXTURE_BINDING_CUBE_MAP
:
34068
,
TEXTURE_CUBE_MAP_POSITIVE_X
:
34069
,
TEXTURE_CUBE_MAP_NEGATIVE_X
:
34070
,
TEXTURE_CUBE_MAP_POSITIVE_Y
:
34071
,
TEXTURE_CUBE_MAP_NEGATIVE_Y
:
34072
,
TEXTURE_CUBE_MAP_POSITIVE_Z
:
34073
,
TEXTURE_CUBE_MAP_NEGATIVE_Z
:
34074
,
MAX_CUBE_MAP_TEXTURE_SIZE
:
34076
,
TEXTURE0
:
33984
,
TEXTURE1
:
33985
,
TEXTURE2
:
33986
,
TEXTURE3
:
33987
,
TEXTURE4
:
33988
,
TEXTURE5
:
33989
,
TEXTURE6
:
33990
,
TEXTURE7
:
33991
,
TEXTURE8
:
33992
,
TEXTURE9
:
33993
,
TEXTURE10
:
33994
,
TEXTURE11
:
33995
,
TEXTURE12
:
33996
,
TEXTURE13
:
33997
,
TEXTURE14
:
33998
,
TEXTURE15
:
33999
,
TEXTURE16
:
34
e3
,
TEXTURE17
:
34001
,
TEXTURE18
:
34002
,
TEXTURE19
:
34003
,
TEXTURE20
:
34004
,
TEXTURE21
:
34005
,
TEXTURE22
:
34006
,
TEXTURE23
:
34007
,
TEXTURE24
:
34008
,
TEXTURE25
:
34009
,
TEXTURE26
:
34010
,
TEXTURE27
:
34011
,
TEXTURE28
:
34012
,
TEXTURE29
:
34013
,
TEXTURE30
:
34014
,
TEXTURE31
:
34015
,
ACTIVE_TEXTURE
:
34016
,
REPEAT
:
10497
,
CLAMP_TO_EDGE
:
33071
,
MIRRORED_REPEAT
:
33648
,
FLOAT_VEC2
:
35664
,
FLOAT_VEC3
:
35665
,
FLOAT_VEC4
:
35666
,
INT_VEC2
:
35667
,
INT_VEC3
:
35668
,
INT_VEC4
:
35669
,
BOOL
:
35670
,
BOOL_VEC2
:
35671
,
BOOL_VEC3
:
35672
,
BOOL_VEC4
:
35673
,
FLOAT_MAT2
:
35674
,
FLOAT_MAT3
:
35675
,
FLOAT_MAT4
:
35676
,
SAMPLER_2D
:
35678
,
SAMPLER_CUBE
:
35680
,
VERTEX_ATTRIB_ARRAY_ENABLED
:
34338
,
VERTEX_ATTRIB_ARRAY_SIZE
:
34339
,
VERTEX_ATTRIB_ARRAY_STRIDE
:
34340
,
VERTEX_ATTRIB_ARRAY_TYPE
:
34341
,
VERTEX_ATTRIB_ARRAY_NORMALIZED
:
34922
,
VERTEX_ATTRIB_ARRAY_POINTER
:
34373
,
VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
:
34975
,
IMPLEMENTATION_COLOR_READ_TYPE
:
35738
,
IMPLEMENTATION_COLOR_READ_FORMAT
:
35739
,
COMPILE_STATUS
:
35713
,
LOW_FLOAT
:
36336
,
MEDIUM_FLOAT
:
36337
,
HIGH_FLOAT
:
36338
,
LOW_INT
:
36339
,
MEDIUM_INT
:
36340
,
HIGH_INT
:
36341
,
FRAMEBUFFER
:
36160
,
RENDERBUFFER
:
36161
,
RGBA4
:
32854
,
RGB5_A1
:
32855
,
RGB565
:
36194
,
DEPTH_COMPONENT16
:
33189
,
STENCIL_INDEX
:
6401
,
STENCIL_INDEX8
:
36168
,
DEPTH_STENCIL
:
34041
,
RENDERBUFFER_WIDTH
:
36162
,
RENDERBUFFER_HEIGHT
:
36163
,
RENDERBUFFER_INTERNAL_FORMAT
:
36164
,
RENDERBUFFER_RED_SIZE
:
36176
,
RENDERBUFFER_GREEN_SIZE
:
36177
,
RENDERBUFFER_BLUE_SIZE
:
36178
,
RENDERBUFFER_ALPHA_SIZE
:
36179
,
RENDERBUFFER_DEPTH_SIZE
:
36180
,
RENDERBUFFER_STENCIL_SIZE
:
36181
,
FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE
:
36048
,
FRAMEBUFFER_ATTACHMENT_OBJECT_NAME
:
36049
,
FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL
:
36050
,
FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE
:
36051
,
COLOR_ATTACHMENT0
:
36064
,
DEPTH_ATTACHMENT
:
36096
,
STENCIL_ATTACHMENT
:
36128
,
DEPTH_STENCIL_ATTACHMENT
:
33306
,
NONE
:
0
,
FRAMEBUFFER_COMPLETE
:
36053
,
FRAMEBUFFER_INCOMPLETE_ATTACHMENT
:
36054
,
FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
:
36055
,
FRAMEBUFFER_INCOMPLETE_DIMENSIONS
:
36057
,
FRAMEBUFFER_UNSUPPORTED
:
36061
,
FRAMEBUFFER_BINDING
:
36006
,
RENDERBUFFER_BINDING
:
36007
,
MAX_RENDERBUFFER_SIZE
:
34024
,
INVALID_FRAMEBUFFER_OPERATION
:
1286
,
UNPACK_FLIP_Y_WEBGL
:
37440
,
UNPACK_PREMULTIPLY_ALPHA_WEBGL
:
37441
,
CONTEXT_LOST_WEBGL
:
37442
,
UNPACK_COLORSPACE_CONVERSION_WEBGL
:
37443
,
BROWSER_DEFAULT_WEBGL
:
37444
,
COMPRESSED_RGB_S3TC_DXT1_EXT
:
33776
,
COMPRESSED_RGBA_S3TC_DXT1_EXT
:
33777
,
COMPRESSED_RGBA_S3TC_DXT3_EXT
:
33778
,
COMPRESSED_RGBA_S3TC_DXT5_EXT
:
33779
,
COMPRESSED_RGB_PVRTC_4BPPV1_IMG
:
35840
,
COMPRESSED_RGB_PVRTC_2BPPV1_IMG
:
35841
,
COMPRESSED_RGBA_PVRTC_4BPPV1_IMG
:
35842
,
COMPRESSED_RGBA_PVRTC_2BPPV1_IMG
:
35843
,
COMPRESSED_RGB_ETC1_WEBGL
:
36196
,
HALF_FLOAT_OES
:
36193
,
DOUBLE
:
5130
,
READ_BUFFER
:
3074
,
UNPACK_ROW_LENGTH
:
3314
,
UNPACK_SKIP_ROWS
:
3315
,
UNPACK_SKIP_PIXELS
:
3316
,
PACK_ROW_LENGTH
:
3330
,
PACK_SKIP_ROWS
:
3331
,
PACK_SKIP_PIXELS
:
3332
,
COLOR
:
6144
,
DEPTH
:
6145
,
STENCIL
:
6146
,
RED
:
6403
,
RGB8
:
32849
,
RGBA8
:
32856
,
RGB10_A2
:
32857
,
TEXTURE_BINDING_3D
:
32874
,
UNPACK_SKIP_IMAGES
:
32877
,
UNPACK_IMAGE_HEIGHT
:
32878
,
TEXTURE_3D
:
32879
,
TEXTURE_WRAP_R
:
32882
,
MAX_3D_TEXTURE_SIZE
:
32883
,
UNSIGNED_INT_2_10_10_10_REV
:
33640
,
MAX_ELEMENTS_VERTICES
:
33
e3
,
MAX_ELEMENTS_INDICES
:
33001
,
TEXTURE_MIN_LOD
:
33082
,
TEXTURE_MAX_LOD
:
33083
,
TEXTURE_BASE_LEVEL
:
33084
,
TEXTURE_MAX_LEVEL
:
33085
,
MIN
:
32775
,
MAX
:
32776
,
DEPTH_COMPONENT24
:
33190
,
MAX_TEXTURE_LOD_BIAS
:
34045
,
TEXTURE_COMPARE_MODE
:
34892
,
TEXTURE_COMPARE_FUNC
:
34893
,
CURRENT_QUERY
:
34917
,
QUERY_RESULT
:
34918
,
QUERY_RESULT_AVAILABLE
:
34919
,
STREAM_READ
:
35041
,
STREAM_COPY
:
35042
,
STATIC_READ
:
35045
,
STATIC_COPY
:
35046
,
DYNAMIC_READ
:
35049
,
DYNAMIC_COPY
:
35050
,
MAX_DRAW_BUFFERS
:
34852
,
DRAW_BUFFER0
:
34853
,
DRAW_BUFFER1
:
34854
,
DRAW_BUFFER2
:
34855
,
DRAW_BUFFER3
:
34856
,
DRAW_BUFFER4
:
34857
,
DRAW_BUFFER5
:
34858
,
DRAW_BUFFER6
:
34859
,
DRAW_BUFFER7
:
34860
,
DRAW_BUFFER8
:
34861
,
DRAW_BUFFER9
:
34862
,
DRAW_BUFFER10
:
34863
,
DRAW_BUFFER11
:
34864
,
DRAW_BUFFER12
:
34865
,
DRAW_BUFFER13
:
34866
,
DRAW_BUFFER14
:
34867
,
DRAW_BUFFER15
:
34868
,
MAX_FRAGMENT_UNIFORM_COMPONENTS
:
35657
,
MAX_VERTEX_UNIFORM_COMPONENTS
:
35658
,
SAMPLER_3D
:
35679
,
SAMPLER_2D_SHADOW
:
35682
,
FRAGMENT_SHADER_DERIVATIVE_HINT
:
35723
,
PIXEL_PACK_BUFFER
:
35051
,
PIXEL_UNPACK_BUFFER
:
35052
,
PIXEL_PACK_BUFFER_BINDING
:
35053
,
PIXEL_UNPACK_BUFFER_BINDING
:
35055
,
FLOAT_MAT2x3
:
35685
,
FLOAT_MAT2x4
:
35686
,
FLOAT_MAT3x2
:
35687
,
FLOAT_MAT3x4
:
35688
,
FLOAT_MAT4x2
:
35689
,
FLOAT_MAT4x3
:
35690
,
SRGB
:
35904
,
SRGB8
:
35905
,
SRGB8_ALPHA8
:
35907
,
COMPARE_REF_TO_TEXTURE
:
34894
,
RGBA32F
:
34836
,
RGB32F
:
34837
,
RGBA16F
:
34842
,
RGB16F
:
34843
,
VERTEX_ATTRIB_ARRAY_INTEGER
:
35069
,
MAX_ARRAY_TEXTURE_LAYERS
:
35071
,
MIN_PROGRAM_TEXEL_OFFSET
:
35076
,
MAX_PROGRAM_TEXEL_OFFSET
:
35077
,
MAX_VARYING_COMPONENTS
:
35659
,
TEXTURE_2D_ARRAY
:
35866
,
TEXTURE_BINDING_2D_ARRAY
:
35869
,
R11F_G11F_B10F
:
35898
,
UNSIGNED_INT_10F_11F_11F_REV
:
35899
,
RGB9_E5
:
35901
,
UNSIGNED_INT_5_9_9_9_REV
:
35902
,
TRANSFORM_FEEDBACK_BUFFER_MODE
:
35967
,
MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS
:
35968
,
TRANSFORM_FEEDBACK_VARYINGS
:
35971
,
TRANSFORM_FEEDBACK_BUFFER_START
:
35972
,
TRANSFORM_FEEDBACK_BUFFER_SIZE
:
35973
,
TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN
:
35976
,
RASTERIZER_DISCARD
:
35977
,
MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS
:
35978
,
MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS
:
35979
,
INTERLEAVED_ATTRIBS
:
35980
,
SEPARATE_ATTRIBS
:
35981
,
TRANSFORM_FEEDBACK_BUFFER
:
35982
,
TRANSFORM_FEEDBACK_BUFFER_BINDING
:
35983
,
RGBA32UI
:
36208
,
RGB32UI
:
36209
,
RGBA16UI
:
36214
,
RGB16UI
:
36215
,
RGBA8UI
:
36220
,
RGB8UI
:
36221
,
RGBA32I
:
36226
,
RGB32I
:
36227
,
RGBA16I
:
36232
,
RGB16I
:
36233
,
RGBA8I
:
36238
,
RGB8I
:
36239
,
RED_INTEGER
:
36244
,
RGB_INTEGER
:
36248
,
RGBA_INTEGER
:
36249
,
SAMPLER_2D_ARRAY
:
36289
,
SAMPLER_2D_ARRAY_SHADOW
:
36292
,
SAMPLER_CUBE_SHADOW
:
36293
,
UNSIGNED_INT_VEC2
:
36294
,
UNSIGNED_INT_VEC3
:
36295
,
UNSIGNED_INT_VEC4
:
36296
,
INT_SAMPLER_2D
:
36298
,
INT_SAMPLER_3D
:
36299
,
INT_SAMPLER_CUBE
:
36300
,
INT_SAMPLER_2D_ARRAY
:
36303
,
UNSIGNED_INT_SAMPLER_2D
:
36306
,
UNSIGNED_INT_SAMPLER_3D
:
36307
,
UNSIGNED_INT_SAMPLER_CUBE
:
36308
,
UNSIGNED_INT_SAMPLER_2D_ARRAY
:
36311
,
DEPTH_COMPONENT32F
:
36012
,
DEPTH32F_STENCIL8
:
36013
,
FLOAT_32_UNSIGNED_INT_24_8_REV
:
36269
,
FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING
:
33296
,
FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE
:
33297
,
FRAMEBUFFER_ATTACHMENT_RED_SIZE
:
33298
,
FRAMEBUFFER_ATTACHMENT_GREEN_SIZE
:
33299
,
FRAMEBUFFER_ATTACHMENT_BLUE_SIZE
:
33300
,
FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE
:
33301
,
FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE
:
33302
,
FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE
:
33303
,
FRAMEBUFFER_DEFAULT
:
33304
,
UNSIGNED_INT_24_8
:
34042
,
DEPTH24_STENCIL8
:
35056
,
UNSIGNED_NORMALIZED
:
35863
,
DRAW_FRAMEBUFFER_BINDING
:
36006
,
READ_FRAMEBUFFER
:
36008
,
DRAW_FRAMEBUFFER
:
36009
,
READ_FRAMEBUFFER_BINDING
:
36010
,
RENDERBUFFER_SAMPLES
:
36011
,
FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER
:
36052
,
MAX_COLOR_ATTACHMENTS
:
36063
,
COLOR_ATTACHMENT1
:
36065
,
COLOR_ATTACHMENT2
:
36066
,
COLOR_ATTACHMENT3
:
36067
,
COLOR_ATTACHMENT4
:
36068
,
COLOR_ATTACHMENT5
:
36069
,
COLOR_ATTACHMENT6
:
36070
,
COLOR_ATTACHMENT7
:
36071
,
COLOR_ATTACHMENT8
:
36072
,
COLOR_ATTACHMENT9
:
36073
,
COLOR_ATTACHMENT10
:
36074
,
COLOR_ATTACHMENT11
:
36075
,
COLOR_ATTACHMENT12
:
36076
,
COLOR_ATTACHMENT13
:
36077
,
COLOR_ATTACHMENT14
:
36078
,
COLOR_ATTACHMENT15
:
36079
,
FRAMEBUFFER_INCOMPLETE_MULTISAMPLE
:
36182
,
MAX_SAMPLES
:
36183
,
HALF_FLOAT
:
5131
,
RG
:
33319
,
RG_INTEGER
:
33320
,
R8
:
33321
,
RG8
:
33323
,
R16F
:
33325
,
R32F
:
33326
,
RG16F
:
33327
,
RG32F
:
33328
,
R8I
:
33329
,
R8UI
:
33330
,
R16I
:
33331
,
R16UI
:
33332
,
R32I
:
33333
,
R32UI
:
33334
,
RG8I
:
33335
,
RG8UI
:
33336
,
RG16I
:
33337
,
RG16UI
:
33338
,
RG32I
:
33339
,
RG32UI
:
33340
,
VERTEX_ARRAY_BINDING
:
34229
,
R8_SNORM
:
36756
,
RG8_SNORM
:
36757
,
RGB8_SNORM
:
36758
,
RGBA8_SNORM
:
36759
,
SIGNED_NORMALIZED
:
36764
,
COPY_READ_BUFFER
:
36662
,
COPY_WRITE_BUFFER
:
36663
,
COPY_READ_BUFFER_BINDING
:
36662
,
COPY_WRITE_BUFFER_BINDING
:
36663
,
UNIFORM_BUFFER
:
35345
,
UNIFORM_BUFFER_BINDING
:
35368
,
UNIFORM_BUFFER_START
:
35369
,
UNIFORM_BUFFER_SIZE
:
35370
,
MAX_VERTEX_UNIFORM_BLOCKS
:
35371
,
MAX_FRAGMENT_UNIFORM_BLOCKS
:
35373
,
MAX_COMBINED_UNIFORM_BLOCKS
:
35374
,
MAX_UNIFORM_BUFFER_BINDINGS
:
35375
,
MAX_UNIFORM_BLOCK_SIZE
:
35376
,
MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS
:
35377
,
MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS
:
35379
,
UNIFORM_BUFFER_OFFSET_ALIGNMENT
:
35380
,
ACTIVE_UNIFORM_BLOCKS
:
35382
,
UNIFORM_TYPE
:
35383
,
UNIFORM_SIZE
:
35384
,
UNIFORM_BLOCK_INDEX
:
35386
,
UNIFORM_OFFSET
:
35387
,
UNIFORM_ARRAY_STRIDE
:
35388
,
UNIFORM_MATRIX_STRIDE
:
35389
,
UNIFORM_IS_ROW_MAJOR
:
35390
,
UNIFORM_BLOCK_BINDING
:
35391
,
UNIFORM_BLOCK_DATA_SIZE
:
35392
,
UNIFORM_BLOCK_ACTIVE_UNIFORMS
:
35394
,
UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES
:
35395
,
UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER
:
35396
,
UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER
:
35398
,
INVALID_INDEX
:
4294967295
,
MAX_VERTEX_OUTPUT_COMPONENTS
:
37154
,
MAX_FRAGMENT_INPUT_COMPONENTS
:
37157
,
MAX_SERVER_WAIT_TIMEOUT
:
37137
,
OBJECT_TYPE
:
37138
,
SYNC_CONDITION
:
37139
,
SYNC_STATUS
:
37140
,
SYNC_FLAGS
:
37141
,
SYNC_FENCE
:
37142
,
SYNC_GPU_COMMANDS_COMPLETE
:
37143
,
UNSIGNALED
:
37144
,
SIGNALED
:
37145
,
ALREADY_SIGNALED
:
37146
,
TIMEOUT_EXPIRED
:
37147
,
CONDITION_SATISFIED
:
37148
,
WAIT_FAILED
:
37149
,
SYNC_FLUSH_COMMANDS_BIT
:
1
,
VERTEX_ATTRIB_ARRAY_DIVISOR
:
35070
,
ANY_SAMPLES_PASSED
:
35887
,
ANY_SAMPLES_PASSED_CONSERVATIVE
:
36202
,
SAMPLER_BINDING
:
35097
,
RGB10_A2UI
:
36975
,
INT_2_10_10_10_REV
:
36255
,
TRANSFORM_FEEDBACK
:
36386
,
TRANSFORM_FEEDBACK_PAUSED
:
36387
,
TRANSFORM_FEEDBACK_ACTIVE
:
36388
,
TRANSFORM_FEEDBACK_BINDING
:
36389
,
COMPRESSED_R11_EAC
:
37488
,
COMPRESSED_SIGNED_R11_EAC
:
37489
,
COMPRESSED_RG11_EAC
:
37490
,
COMPRESSED_SIGNED_RG11_EAC
:
37491
,
COMPRESSED_RGB8_ETC2
:
37492
,
COMPRESSED_SRGB8_ETC2
:
37493
,
COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2
:
37494
,
COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2
:
37495
,
COMPRESSED_RGBA8_ETC2_EAC
:
37496
,
COMPRESSED_SRGB8_ALPHA8_ETC2_EAC
:
37497
,
TEXTURE_IMMUTABLE_FORMAT
:
37167
,
MAX_ELEMENT_INDEX
:
36203
,
TEXTURE_IMMUTABLE_LEVELS
:
33503
,
MAX_TEXTURE_MAX_ANISOTROPY_EXT
:
34047
});
E
.
WebGLConstants
=
_
});
vcm/lib/Cesium/Workers/WebMercatorProjection-a1ea4f18.js
0 → 100644
View file @
c53f4211
/**
* Cesium - https://github.com/CesiumGS/cesium
*
* Copyright 2011-2020 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/master/LICENSE.md for full licensing details.
*/
define
([
"
exports
"
,
"
./when-60b00257
"
,
"
./Check-4274a1fd
"
,
"
./Math-9d37f659
"
,
"
./Cartesian2-2951f601
"
],
function
(
e
,
n
,
t
,
i
,
u
){
"
use strict
"
;
function
d
(
e
){
this
.
_ellipsoid
=
n
.
defaultValue
(
e
,
u
.
Ellipsoid
.
WGS84
),
this
.
_semimajorAxis
=
this
.
_ellipsoid
.
maximumRadius
,
this
.
_oneOverSemimajorAxis
=
1
/
this
.
_semimajorAxis
}
Object
.
defineProperties
(
d
.
prototype
,{
ellipsoid
:{
get
:
function
(){
return
this
.
_ellipsoid
}}}),
d
.
mercatorAngleToGeodeticLatitude
=
function
(
e
){
return
i
.
CesiumMath
.
PI_OVER_TWO
-
2
*
Math
.
atan
(
Math
.
exp
(
-
e
))},
d
.
geodeticLatitudeToMercatorAngle
=
function
(
e
){
d
.
MaximumLatitude
<
e
?
e
=
d
.
MaximumLatitude
:
e
<-
d
.
MaximumLatitude
&&
(
e
=-
d
.
MaximumLatitude
);
var
t
=
Math
.
sin
(
e
);
return
.
5
*
Math
.
log
((
1
+
t
)
/
(
1
-
t
))},
d
.
MaximumLatitude
=
d
.
mercatorAngleToGeodeticLatitude
(
Math
.
PI
),
d
.
prototype
.
project
=
function
(
e
,
t
){
var
i
=
this
.
_semimajorAxis
,
a
=
e
.
longitude
*
i
,
o
=
d
.
geodeticLatitudeToMercatorAngle
(
e
.
latitude
)
*
i
,
r
=
e
.
height
;
return
n
.
defined
(
t
)?(
t
.
x
=
a
,
t
.
y
=
o
,
t
.
z
=
r
,
t
):
new
u
.
Cartesian3
(
a
,
o
,
r
)},
d
.
prototype
.
unproject
=
function
(
e
,
t
){
var
i
=
this
.
_oneOverSemimajorAxis
,
a
=
e
.
x
*
i
,
o
=
d
.
mercatorAngleToGeodeticLatitude
(
e
.
y
*
i
),
r
=
e
.
z
;
return
n
.
defined
(
t
)?(
t
.
longitude
=
a
,
t
.
latitude
=
o
,
t
.
height
=
r
,
t
):
new
u
.
Cartographic
(
a
,
o
,
r
)},
e
.
WebMercatorProjection
=
d
});
vcm/lib/Cesium/Workers/arrayRemoveDuplicates-ac049603.js
0 → 100644
View file @
c53f4211
/**
* Cesium - https://github.com/CesiumGS/cesium
*
* Copyright 2011-2020 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/CesiumGS/cesium/blob/master/LICENSE.md for full licensing details.
*/
define
([
"
exports
"
,
"
./when-60b00257
"
,
"
./Check-4274a1fd
"
,
"
./Math-9d37f659
"
],
function
(
e
,
h
,
t
,
r
){
"
use strict
"
;
var
l
=
r
.
CesiumMath
.
EPSILON10
;
e
.
arrayRemoveDuplicates
=
function
(
e
,
t
,
r
){
if
(
h
.
defined
(
e
)){
r
=
h
.
defaultValue
(
r
,
!
1
);
var
n
,
f
,
i
,
a
=
e
.
length
;
if
(
a
<
2
)
return
e
;
for
(
n
=
1
;
n
<
a
&&!
t
(
f
=
e
[
n
-
1
],
i
=
e
[
n
],
l
);
++
n
);
if
(
n
===
a
)
return
r
&&
t
(
e
[
0
],
e
[
e
.
length
-
1
],
l
)?
e
.
slice
(
1
):
e
;
for
(
var
u
=
e
.
slice
(
0
,
n
);
n
<
a
;
++
n
)
t
(
f
,
i
=
e
[
n
],
l
)
||
(
u
.
push
(
i
),
f
=
i
);
return
r
&&
1
<
u
.
length
&&
t
(
u
[
0
],
u
[
u
.
length
-
1
],
l
)
&&
u
.
shift
(),
u
}}});
vcm/lib/Cesium/Workers/cesiumWorkerBootstrapper.js
View file @
c53f4211
This diff is collapsed.
Click to expand it.
Prev
1
2
3
4
5
6
7
8
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment