Commit 003f813e authored by 谢旭's avatar 谢旭

完善接口请求

完善计算方法
对接socket格式
parent a98e7e3a
No preview for this file type
......@@ -92,12 +92,18 @@
<Reference Include="System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll</HintPath>
</Reference>
<Reference Include="System.Web.Cors, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.Cors.5.2.7\lib\net45\System.Web.Cors.dll</HintPath>
</Reference>
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll</HintPath>
</Reference>
<Reference Include="System.Web.Http, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll</HintPath>
</Reference>
<Reference Include="System.Web.Http.Cors, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Cors.5.2.7\lib\net45\System.Web.Http.Cors.dll</HintPath>
</Reference>
<Reference Include="System.Web.Http.Owin, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Owin.5.2.7\lib\net45\System.Web.Http.Owin.dll</HintPath>
</Reference>
......@@ -134,8 +140,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Controllers\ElecFenceController.cs" />
<Compile Include="Controllers\queryController.cs" />
<Compile Include="Extension\CalculateModel.cs" />
<Compile Include="Extension\DataModel.cs" />
<Compile Include="Extension\ExtensionMethod.cs" />
<Compile Include="Extension\SocketModel.cs" />
<Compile Include="ProcessSocketRequest.cs" />
......
using CefDemo.Extension;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;
using System.Web.Http.Cors;
namespace CefDemo.Controllers
{
//[EnableCors(origins: "http://localhost:4200/", headers: "*", methods: "GET,POST,PUT,DELETE")]
public class ElecFenceController : ApiController
{
// GET api
public string Get(string id)
{
return id;
}
// POST api
public string Post([FromBody] FenceModel model)
{
CalculateModel.SaveModel(model);
return "ok";
}
// PUT api
public void Put(int id, string value)
{
}
// DELETE api
public void Delete(int id)
{
}
}
}
using System;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
......@@ -6,29 +7,185 @@ using System.Threading.Tasks;
namespace CefDemo.Extension
{
class Point
class CalculateModel
{
public Point(double x,double y,double z)
static public List<Point> points = new List<Point>();
static public Point Center ;
static public FenceModel Model;
public static bool IsSamePoint(Point p1,Point p2)
{
if (p1.X == p2.X && p1.Y == p2.Y && p1.Z == p2.Z)
{
return true;
}
else
{
return false;
}
}
/// <summary>
/// 判断点是否再围栏内
/// </summary>
/// <param name="point"></param>
/// <param name="points"></param>
/// <param name="Height"></param>
/// <returns></returns>
public static bool IsinPolyhedron(Point point ,List<Point> points,double Height)
{
int nCross = 0;
for (int i=0;i< points.Count();i++)
{
Point p1 = points.ElementAt(i);
Point p2 = points.ElementAt(i+1);
if (IsSamePoint(p1,p2))
continue;
if (point.Y < Math.Min(p1.Y, p2.Y))
continue;
if (point.Y >= Math.Max(p1.Y, p2.Y))
continue;
if (point.Z >= Height)
continue;
X = x;
Y = y;
Z = z;
var x1 = (point.Y - p1.Y) * (p2.X - p1.X) / (p2.Y - p1.Y) + p1.X;
if (x1 > point.X)
{
nCross++;
}
}
if (nCross % 2 == 1)
{ // 在围栏内
return true;
}
else
{
//
return false;
}
}
public double X { get; set; }
public double Y { get; set; }
public double Z { get; set; }
public static double PointToPlane(List<Point> points, Point point, double Height, double Buffer_dis)
{
List<double> numlist = new List<double>();
for (int i = 0; i < points.Count() - 1; ++i)
{
Point firstPoint = points.ElementAt(i);
Point secondPoint = points.ElementAt(i + 1);
Point thirdPoint = new Point(firstPoint.X, firstPoint.Y, firstPoint.Z + Height);
//计算法向量
Vec3 AB = new Vec3(thirdPoint.X - firstPoint.X, thirdPoint.Y - firstPoint.Y, thirdPoint.Z - firstPoint.Z);
Vec3 BC = new Vec3(secondPoint.X - firstPoint.X, secondPoint.Y - firstPoint.Y, secondPoint.Z - firstPoint.Z);
Vec3 n = GetNormalVector(AB, BC);
//计算点到面的距离
Vec3 B2point = new Vec3(firstPoint.X - point.X, firstPoint.Y - point.Y, firstPoint.Z - point.Z);
double number_up = B2point.X * n.X + B2point.Y * n.Y + B2point.Z * n.Z;
double number_down = Math.Sqrt(n.X * n.X + n.Y * n.Y + n.Z * n.Z);
double d = number_up / number_down;
numlist.Add(d);
}
for (int i = 0; i < points.Count() - 1; ++i)
{
double p2p_dis = P2PDistance(points.ElementAt(i), point);
numlist.Add(p2p_dis);
}
return numlist.Min();
}
/// <summary>
/// 多面体电子围栏
/// </summary>
/// <param name="points"></param> 底面点集
/// <param name="point"></param>
/// <param name="Height"></param> 围栏高度
/// <param name="Buffer_dis"></param> 缓冲距离
/// <returns></returns>
public static string DistanceToPolyhedron(List<Point> points ,Point point, double Height, double Buffer_dis)
{
if (IsinPolyhedron(point, points, Height))
{
//在围栏内
var dis = PointToPlane(points, point, Height, Buffer_dis);
if (dis >= Buffer_dis)
{
return "在缓冲区内";
}
else if( dis < Buffer_dis)
{
return $"距离电子围栏{dis}米";
}
}
else
{
//在围栏外
var dis = PointToPlane(points, point, Height, Buffer_dis);
return $"超出电子围栏{dis}米";
}
return "";
}
class CalculateModel
{
public static string DistanceTo()
public static Vec3 GetNormalVector(Vec3 n1 ,Vec3 n2)
{
double x = n1.Y * n2.Z - n2.Y * n1.Z;
double y = n2.X * n1.Z - n1.X * n2.Z;
double z = n1.X * n2.Y - n2.X * n1.Y;
Vec3 vec = new Vec3(x, y, z);
return vec;
}
/// <summary>
/// 球体电子围栏
/// </summary>
/// <param name="point"></param>
/// <param name="Sphere_center"></param> 球心
/// <param name="Radius"></param> 半径
/// <param name="Buffer_dis"></param> 缓冲区
/// <returns></returns>
public static string DistanceToSphere(Point point, Point Sphere_center, double Radius, double Buffer_dis)
{
double _inner_Radius = Radius - Buffer_dis; //内球体半径
double _distance = P2PDistance(point, Sphere_center); //
if (_distance < _inner_Radius)
{
// 内球体内
return "在缓冲区内";
}
else if (_distance >= _inner_Radius && _distance < Radius)
{
//缓冲区内
double _dis_R = Radius - _distance;
return $"距离电子围栏{_dis_R}";
}
else if (_distance >= Radius)
{
//在球外
return $"超出电子围栏{ _distance-Radius }";
}
return "";
}
......@@ -143,5 +300,58 @@ namespace CefDemo.Extension
}
public static void SaveModel(FenceModel model)
{
if (model.FenceType == "polygon")
{
string pointsstr = model.points;
var list = JsonConvert.DeserializeObject<List<DataModel>>(pointsstr);
list.ForEach(p => {
points.Add(new Point(p.longitude, p.latitude, p.height));
});
}
else if (model.FenceType == "sphere")
{
string pointsstr = model.Center;
var center = JsonConvert.DeserializeObject<DataModel>(pointsstr);
Center = new Point(center.longitude, center.latitude, center.height);
}
else if (model.FenceType == "circle")
{
string pointsstr = model.Center;
var center = JsonConvert.DeserializeObject<DataModel>(pointsstr);
Center = new Point(center.longitude, center.latitude, center.height);
}
Model = model;
}
public static string GetWarningInfo(Point point)
{
if (Model.FenceType == "polygon") //多边体
{
return DistanceToPolyhedron(points, point, Convert.ToSingle(Model.Height), Convert.ToSingle(Model.Buffer_dis));
}
else if (Model.FenceType == "circle")//圆柱体
{
return DistanceToCylinder(Center, Convert.ToSingle(Model.Radius), point, Convert.ToSingle(Model.Height), Convert.ToSingle(Model.Buffer_dis));
}
else if (Model.FenceType == "sphere")//球体
{
return DistanceToSphere(point, Center, Convert.ToSingle(Model.Radius), Convert.ToSingle(Model.Buffer_dis));
}
return "";
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CefDemo.Extension
{
public class FenceModel
{
public string FenceType { get; set; } //电子围栏类型
public string Buffer_dis { get; set; } //缓冲距离
public string Height { get; set; } //围栏高度、圆柱体高度
public string points { get; set; } //多面体点选的坐标、圆柱体的地面圆心、球心。存在这个集合进来
public string Center { get; set; } //球心、圆柱体底面圆心
public string Radius { get; set; } //球、圆柱体半径
}
public class Vec3
{
public Vec3(double x, double y, double z)
{
X = x;
Y = y;
Z = z;
}
public double X { get; set; }
public double Y { get; set; }
public double Z { get; set; }
}
public class Point
{
public Point(double x, double y, double z)
{
X = x;
Y = y;
Z = z;
}
public double X { get; set; }
public double Y { get; set; }
public double Z { get; set; }
}
class DataModel
{
public DataModel(double x, double y, double z)
{
longitude = x;
latitude = y;
height = z;
}
public double longitude { get; set; }
public double latitude { get; set; }
public double height { get; set; }
}
}
......@@ -12,8 +12,7 @@ namespace CefDemo.Extension
{
public static Socket socketwatch;
public static Socket client;
public static bool StartListening(string ip,string port)
public static bool StartListening(string ip,string port)
{
try
{ //定义一个套接字用于监听客户端发来的消息,包含三个参数(IP4寻址协议,流式连接,Tcp协议)
......@@ -36,7 +35,6 @@ namespace CefDemo.Extension
}
public static Task<bool> SocketAccept()
{
return Task.Run<bool>(()=> {
......@@ -45,8 +43,6 @@ namespace CefDemo.Extension
return true;
});
}
public static Task<string> getZNZ3Position()
{
......@@ -79,9 +75,6 @@ namespace CefDemo.Extension
string strSRecMsg = Encoding.UTF8.GetString(arrServerRecMsg, 0, length);
string[] protocalStr = strSRecMsg.Split('$');
if (strSRecMsg == "") //没有收到信息
{
......@@ -172,6 +165,10 @@ namespace CefDemo.Extension
",\"deviceBrand\":\"SOUTH\"" +
",\"receivetime\":" + System.DateTime.Now.ToString().Replace('/', '0').Replace(':', '0').Trim() +
",\"longitude\":" + Convert.ToString(Convert.ToSingle(ggastr_array.ElementAt(4).ToString()) / 100) +
",\"WarningInfo\":" + CalculateModel.GetWarningInfo(new Point(Convert.ToSingle(ggastr_array.ElementAt(4).ToString()),
Convert.ToSingle(ggastr_array.ElementAt(2).ToString()),
Convert.ToSingle(ggastr_array.ElementAt(9).ToString())
)) +
"}";
return jsonStr;
}
......@@ -188,5 +185,6 @@ namespace CefDemo.Extension
}
}
}
......@@ -131,12 +131,14 @@ namespace CefDemo
long i = 0;
while (!websocketContext.TryGetValue("websocket.ClientCloseStatus", out status) || (int)status == 0)
{
string longitude = location.ElementAt(Convert.ToInt32(i++ % 16)).Value.ToString();
string latitude = location.ElementAt(Convert.ToInt32(i++ % 16)).Key.ToString();
string alitude = "50.32";
string sendMessage = "" +
"{\"deviceType\":\"RTK\"" +
",\"SICVersion\":\"SIC_1.2\"" +
",\"alitude\":\"50.32\"" +
",\"latitude\":" + location .ElementAt(Convert.ToInt32( i++%16)).Key.ToString()+
",\"alitude\":" + alitude +
",\"latitude\":" + latitude +
",\"interactive\":\"02\"" +
",\"terminalType\":\"指南者3\"" +
",\"gnss\":\"21\"" +
......@@ -147,7 +149,11 @@ namespace CefDemo
",\"sendtime\":\"20200630153620\"" +
",\"deviceBrand\":\"SOUTH\"" +
",\"receivetime\":\"20200630153620\"" +
",\"longitude\":" + location.ElementAt(Convert.ToInt32(i++ % 16)).Value.ToString() +
",\"longitude\":" + longitude + //
",\"WarningInfo\":" + CalculateModel.GetWarningInfo(new Point(Convert.ToSingle(longitude),
Convert.ToSingle(latitude),
Convert.ToSingle(alitude)
)) +
"}";
if (i==10000000)
{
......
......@@ -7,6 +7,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web.Http;
using System.Web.Http.Cors;
using System.Web.Mvc.Html;
using Microsoft.Owin;
using Owin;
......@@ -21,6 +22,7 @@ namespace CefDemo
// 创建 Web API 的配置
var config = new HttpConfiguration();
// 启用标记路由
// config.EnableCors(new EnableCorsAttribute("*", "*", "*"));
config.MapHttpAttributeRoutes();
// 默认的 Web API 路由
config.Routes.MapHttpRoute(
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{o1NI:function(n,l,t){"use strict";t.r(l);var o=t("CcnG"),e=function(){return function(){}}(),u=t("pMnS"),i=t("Ip0R"),r=[{name:"\u7535\u5b50\u56f4\u680f",component:t("eAIX").a,icon:"icon-weilan"}],c=function(){function n(n){this.resolver=n,this.functions=r}return n.prototype.createComponent=function(n){if(this.container.clear(),this.currentComponentName!==n.name){var l=this.resolver.resolveComponentFactory(n);this.componentRef=this.container.createComponent(l),this.currentComponentName=n.name}else this.currentComponentName=""},n.prototype.ngOnDestroy=function(){this.componentRef.destroy(),this.currentComponentName=""},n}(),a=o.sb({encapsulation:0,styles:[[".smartBtn[_ngcontent-%COMP%]{position:absolute;z-index:8;left:30px;top:8%;max-height:90%;width:48px;border-radius:6px;background-color:#fff;box-shadow:2px 2px 10px rgba(102,102,102,.75);overflow-y:auto}.smartBtn[_ngcontent-%COMP%] .map-toolbar[_ngcontent-%COMP%] .widget-button[_ngcontent-%COMP%]{text-align:center;height:48px;line-height:48px;cursor:pointer}.smartBtn[_ngcontent-%COMP%] .map-toolbar.is-active[_ngcontent-%COMP%] .widget-button[_ngcontent-%COMP%]{background-color:#e5e8fd}.smartBtn[_ngcontent-%COMP%] .map-toolbar[_ngcontent-%COMP%] i.iconfont[_ngcontent-%COMP%]{font-size:24px}.toolbarContainer[_ngcontent-%COMP%]{position:absolute;z-index:8;left:100px;top:8%;max-height:90%;border-radius:6px;background-color:#fff;box-shadow:2px 2px 10px rgba(102,102,102,.75);overflow-y:auto}"]],data:{}});function s(n){return o.Nb(0,[(n()(),o.ub(0,0,null,null,4,"div",[["class","map-toolbar"]],null,null,null,null,null)),o.tb(1,278528,null,0,i.i,[o.u,o.v,o.k,o.H],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),o.Gb(2,{"is-active":0}),(n()(),o.ub(3,0,null,null,1,"div",[["class","widget-button"],["nz-tooltip",""],["nzPlacement","right"]],[[8,"title",0]],[[null,"click"]],(function(n,l,t){var o=!0;return"click"===l&&(o=!1!==n.component.createComponent(n.context.$implicit.component)&&o),o}),null,null)),(n()(),o.ub(4,0,null,null,0,"i",[],[[8,"className",0]],null,null,null,null))],(function(n,l){var t=n(l,2,0,l.component.currentComponentName===l.context.$implicit.component.name);n(l,1,0,"map-toolbar",t)}),(function(n,l){n(l,3,0,o.wb(1," ",l.context.$implicit.name,"")),n(l,4,0,o.wb(1,"iconfont ",l.context.$implicit.icon,""))}))}function p(n){return o.Nb(0,[(n()(),o.lb(0,null,null,0))],null,null)}function b(n){return o.Nb(0,[o.Jb(402653184,1,{container:0}),(n()(),o.ub(1,0,null,null,2,"div",[["class","smartBtn"]],null,null,null,null,null)),(n()(),o.lb(16777216,null,null,1,null,s)),o.tb(3,278528,null,0,i.j,[o.T,o.P,o.u],{ngForOf:[0,"ngForOf"]},null),(n()(),o.ub(4,0,null,null,1,"div",[["class","toolbarContainer"],["id","toolbarContainer"]],null,null,null,null,null)),(n()(),o.lb(16777216,[[1,3],["alertContainer",2]],null,0,null,p))],(function(n,l){n(l,3,0,l.component.functions)}),null)}var m=t("wFCa"),f=t("elQI"),C=function(){function n(n){this.viewerService=n}return n.prototype.ngOnInit=function(){this.viewerService.initViewer("cesiumContainer"),this.viewer=this.viewerService.getViewer(),this.viewerService.getModelLayer(f.a)},n}(),g=o.sb({encapsulation:0,styles:[[".cesiumContainer[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;background-color:#000;overflow:hidden}"]],data:{}});function d(n){return o.Nb(0,[(n()(),o.ub(0,0,null,null,0,"div",[["class","cesiumContainer"],["id","cesiumContainer"]],null,null,null,null,null)),(n()(),o.ub(1,0,null,null,1,"app-map-toolbar",[],null,null,null,b,a)),o.tb(2,180224,null,0,c,[o.j],null,null)],null,null)}var h=function(){function n(){}return n.prototype.ngOnInit=function(){},n.prototype.ngOnDestroy=function(){},n}(),v=o.sb({encapsulation:0,styles:[[""]],data:{}});function w(n){return o.Nb(0,[(n()(),o.ub(0,0,null,null,2,"div",[["class","app-main"]],null,null,null,null,null)),(n()(),o.ub(1,0,null,null,1,"app-map",[["class","app-map"]],null,null,null,d,g)),o.tb(2,114688,null,0,C,[m.a],null,null)],(function(n,l){n(l,2,0)}),null)}function x(n){return o.Nb(0,[(n()(),o.ub(0,0,null,null,1,"app-main",[],null,null,null,w,v)),o.tb(1,245760,null,0,h,[],null,null)],(function(n,l){n(l,1,0)}),null)}var O=o.qb("app-main",h,x,{},{},[]),y=t("gIcY"),M=t("ZYCi"),N=function(){return function(){}}();t.d(l,"MainModuleNgFactory",(function(){return P}));var P=o.rb(e,[],(function(n){return o.Bb([o.Cb(512,o.j,o.gb,[[8,[u.a,O]],[3,o.j],o.A]),o.Cb(4608,i.m,i.l,[o.w,[2,i.C]]),o.Cb(4608,y.u,y.u,[]),o.Cb(1073742336,i.c,i.c,[]),o.Cb(1073742336,y.s,y.s,[]),o.Cb(1073742336,y.i,y.i,[]),o.Cb(1073742336,M.q,M.q,[[2,M.w],[2,M.p]]),o.Cb(1073742336,N,N,[]),o.Cb(1073742336,e,e,[]),o.Cb(1024,M.n,(function(){return[[{path:"",component:h,children:[]}]]}),[])])}))}}]);
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{o1NI:function(n,l,t){"use strict";t.r(l);var o=t("qNl8"),e=function(){return function(){}}(),u=t("pMnS"),i=t("yUdI"),r=[{name:"\u7535\u5b50\u56f4\u680f",component:t("eAIX").a,icon:"icon-weilan"}],a=function(){function n(n){this.resolver=n,this.functions=r}return n.prototype.createComponent=function(n){if(this.container.clear(),this.currentComponentName!==n.name){var l=this.resolver.resolveComponentFactory(n);this.componentRef=this.container.createComponent(l),this.currentComponentName=n.name}else this.currentComponentName=""},n.prototype.ngOnDestroy=function(){this.componentRef.destroy(),this.currentComponentName=""},n}(),c=o.sb({encapsulation:0,styles:[[".smartBtn[_ngcontent-%COMP%]{position:absolute;z-index:8;left:30px;top:8%;max-height:90%;width:48px;border-radius:6px;background-color:#fff;box-shadow:2px 2px 10px rgba(102,102,102,.75);overflow-y:auto}.smartBtn[_ngcontent-%COMP%] .map-toolbar[_ngcontent-%COMP%] .widget-button[_ngcontent-%COMP%]{text-align:center;height:48px;line-height:48px;cursor:pointer}.smartBtn[_ngcontent-%COMP%] .map-toolbar.is-active[_ngcontent-%COMP%] .widget-button[_ngcontent-%COMP%]{background-color:#e5e8fd}.smartBtn[_ngcontent-%COMP%] .map-toolbar[_ngcontent-%COMP%] i.iconfont[_ngcontent-%COMP%]{font-size:24px}.toolbarContainer[_ngcontent-%COMP%]{position:absolute;z-index:8;left:100px;top:8%;max-height:90%;border-radius:6px;background-color:#fff;box-shadow:2px 2px 10px rgba(102,102,102,.75);overflow-y:auto}"]],data:{}});function s(n){return o.Nb(0,[(n()(),o.ub(0,0,null,null,4,"div",[["class","map-toolbar"]],null,null,null,null,null)),o.tb(1,278528,null,0,i.i,[o.u,o.v,o.k,o.H],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),o.Gb(2,{"is-active":0}),(n()(),o.ub(3,0,null,null,1,"div",[["class","widget-button"],["nz-tooltip",""],["nzPlacement","right"]],[[8,"title",0]],[[null,"click"]],(function(n,l,t){var o=!0;return"click"===l&&(o=!1!==n.component.createComponent(n.context.$implicit.component)&&o),o}),null,null)),(n()(),o.ub(4,0,null,null,0,"i",[],[[8,"className",0]],null,null,null,null))],(function(n,l){var t=n(l,2,0,l.component.currentComponentName===l.context.$implicit.component.name);n(l,1,0,"map-toolbar",t)}),(function(n,l){n(l,3,0,o.wb(1," ",l.context.$implicit.name,"")),n(l,4,0,o.wb(1,"iconfont ",l.context.$implicit.icon,""))}))}function p(n){return o.Nb(0,[(n()(),o.lb(0,null,null,0))],null,null)}function b(n){return o.Nb(0,[o.Jb(402653184,1,{container:0}),(n()(),o.ub(1,0,null,null,2,"div",[["class","smartBtn"]],null,null,null,null,null)),(n()(),o.lb(16777216,null,null,1,null,s)),o.tb(3,278528,null,0,i.j,[o.T,o.P,o.u],{ngForOf:[0,"ngForOf"]},null),(n()(),o.ub(4,0,null,null,1,"div",[["class","toolbarContainer"],["id","toolbarContainer"]],null,null,null,null,null)),(n()(),o.lb(16777216,[[1,3],["alertContainer",2]],null,0,null,p))],(function(n,l){n(l,3,0,l.component.functions)}),null)}var m=t("wFCa"),f=t("elQI"),C=function(){function n(n){this.viewerService=n}return n.prototype.ngOnInit=function(){this.viewerService.initViewer("cesiumContainer"),this.viewer=this.viewerService.getViewer(),this.viewerService.getModelLayer(f.a)},n}(),g=o.sb({encapsulation:0,styles:[[".cesiumContainer[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;background-color:#000;overflow:hidden}"]],data:{}});function d(n){return o.Nb(0,[(n()(),o.ub(0,0,null,null,0,"div",[["class","cesiumContainer"],["id","cesiumContainer"]],null,null,null,null,null)),(n()(),o.ub(1,0,null,null,1,"app-map-toolbar",[],null,null,null,b,c)),o.tb(2,180224,null,0,a,[o.j],null,null)],null,null)}var h=function(){function n(){}return n.prototype.ngOnInit=function(){},n.prototype.ngOnDestroy=function(){},n}(),v=o.sb({encapsulation:0,styles:[[""]],data:{}});function w(n){return o.Nb(0,[(n()(),o.ub(0,0,null,null,2,"div",[["class","app-main"]],null,null,null,null,null)),(n()(),o.ub(1,0,null,null,1,"app-map",[["class","app-map"]],null,null,null,d,g)),o.tb(2,114688,null,0,C,[m.a],null,null)],(function(n,l){n(l,2,0)}),null)}function x(n){return o.Nb(0,[(n()(),o.ub(0,0,null,null,1,"app-main",[],null,null,null,w,v)),o.tb(1,245760,null,0,h,[],null,null)],(function(n,l){n(l,1,0)}),null)}var O=o.qb("app-main",h,x,{},{},[]),y=t("Nki+"),M=t("SGKw"),N=function(){return function(){}}();t.d(l,"MainModuleNgFactory",(function(){return P}));var P=o.rb(e,[],(function(n){return o.Bb([o.Cb(512,o.j,o.gb,[[8,[u.a,O]],[3,o.j],o.A]),o.Cb(4608,i.m,i.l,[o.w,[2,i.C]]),o.Cb(4608,y.u,y.u,[]),o.Cb(1073742336,i.c,i.c,[]),o.Cb(1073742336,y.s,y.s,[]),o.Cb(1073742336,y.i,y.i,[]),o.Cb(1073742336,M.q,M.q,[[2,M.w],[2,M.p]]),o.Cb(1073742336,N,N,[]),o.Cb(1073742336,e,e,[]),o.Cb(1024,M.n,(function(){return[[{path:"",component:h,children:[]}]]}),[])])}))}}]);
\ No newline at end of file
......@@ -22,4 +22,4 @@
* Portions licensed separately.
* See https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md for full licensing details.
*/
define(["exports","./defined-b9ff0e39","./Check-e6691f86","./Math-92bd3539","./Cartesian2-8fa798b8"],function(t,u,o,r,c){"use strict";var s={octEncodeInRange:function(t,o,e){if(e.x=t.x/(Math.abs(t.x)+Math.abs(t.y)+Math.abs(t.z)),e.y=t.y/(Math.abs(t.x)+Math.abs(t.y)+Math.abs(t.z)),t.z<0){var n=e.x,a=e.y;e.x=(1-Math.abs(a))*r.CesiumMath.signNotZero(n),e.y=(1-Math.abs(n))*r.CesiumMath.signNotZero(a)}return e.x=r.CesiumMath.toSNorm(e.x,o),e.y=r.CesiumMath.toSNorm(e.y,o),e},octEncode:function(t,o){return s.octEncodeInRange(t,255,o)}},e=new c.Cartesian2,n=new Uint8Array(1);function a(t){return n[0]=t,n[0]}s.octEncodeToCartesian4=function(t,o){return s.octEncodeInRange(t,65535,e),o.x=a(e.x*(1/256)),o.y=a(e.x),o.z=a(e.y*(1/256)),o.w=a(e.y),o},s.octDecodeInRange=function(t,o,e,n){if(n.x=r.CesiumMath.fromSNorm(t,e),n.y=r.CesiumMath.fromSNorm(o,e),n.z=1-(Math.abs(n.x)+Math.abs(n.y)),n.z<0){var a=n.x;n.x=(1-Math.abs(n.y))*r.CesiumMath.signNotZero(a),n.y=(1-Math.abs(a))*r.CesiumMath.signNotZero(n.y)}return c.Cartesian3.normalize(n,n)},s.octDecode=function(t,o,e){return s.octDecodeInRange(t,o,255,e)},s.octDecodeFromCartesian4=function(t,o){var e=256*t.x+t.y,n=256*t.z+t.w;return s.octDecodeInRange(e,n,65535,o)},s.octPackFloat=function(t){return 256*t.x+t.y};var i=new c.Cartesian2;function f(t){return t>>1^-(1&t)}s.octEncodeFloat=function(t){return s.octEncode(t,i),s.octPackFloat(i)},s.octDecodeFloat=function(t,o){var e=t/256,n=Math.floor(e),a=256*(e-n);return s.octDecode(n,a,o)},s.octPack=function(t,o,e,n){var a=s.octEncodeFloat(t),r=s.octEncodeFloat(o),c=s.octEncode(e,i);return n.x=65536*c.x+a,n.y=65536*c.y+r,n},s.octUnpack=function(t,o,e,n){var a=t.x/65536,r=Math.floor(a),c=65536*(a-r);a=t.y/65536;var i=Math.floor(a),u=65536*(a-i);s.octDecodeFloat(c,o),s.octDecodeFloat(u,e),s.octDecode(r,i,n)},s.compressTextureCoordinates=function(t){return 4096*(4095*t.x|0)+(4095*t.y|0)},s.decompressTextureCoordinates=function(t,o){var e=t/4096,n=Math.floor(e);return o.x=n/4095,o.y=(t-4096*n)/4095,o},s.zigZagDeltaDecode=function(t,o,e){for(var n=t.length,a=0,r=0,c=0,i=0;i<n;++i)a+=f(t[i]),r+=f(o[i]),t[i]=a,o[i]=r,u.defined(e)&&(c+=f(e[i]),e[i]=c)},t.AttributeCompression=s});
define(["exports","./defined-b9ff0e39","./Check-e6691f86","./Math-92bd3539","./Cartesian2-8fa798b8"],function(t,u,o,r,c){"use strict";var s={octEncodeInRange:function(t,o,e){var n,a;return e.x=t.x/(Math.abs(t.x)+Math.abs(t.y)+Math.abs(t.z)),e.y=t.y/(Math.abs(t.x)+Math.abs(t.y)+Math.abs(t.z)),t.z<0&&(n=e.x,a=e.y,e.x=(1-Math.abs(a))*r.CesiumMath.signNotZero(n),e.y=(1-Math.abs(n))*r.CesiumMath.signNotZero(a)),e.x=r.CesiumMath.toSNorm(e.x,o),e.y=r.CesiumMath.toSNorm(e.y,o),e},octEncode:function(t,o){return s.octEncodeInRange(t,255,o)}},e=new c.Cartesian2,n=new Uint8Array(1);function a(t){return n[0]=t,n[0]}s.octEncodeToCartesian4=function(t,o){return s.octEncodeInRange(t,65535,e),o.x=a(e.x*(1/256)),o.y=a(e.x),o.z=a(e.y*(1/256)),o.w=a(e.y),o},s.octDecodeInRange=function(t,o,e,n){var a;return n.x=r.CesiumMath.fromSNorm(t,e),n.y=r.CesiumMath.fromSNorm(o,e),n.z=1-(Math.abs(n.x)+Math.abs(n.y)),n.z<0&&(a=n.x,n.x=(1-Math.abs(n.y))*r.CesiumMath.signNotZero(a),n.y=(1-Math.abs(a))*r.CesiumMath.signNotZero(n.y)),c.Cartesian3.normalize(n,n)},s.octDecode=function(t,o,e){return s.octDecodeInRange(t,o,255,e)},s.octDecodeFromCartesian4=function(t,o){var e=256*t.x+t.y,n=256*t.z+t.w;return s.octDecodeInRange(e,n,65535,o)},s.octPackFloat=function(t){return 256*t.x+t.y};var i=new c.Cartesian2;function f(t){return t>>1^-(1&t)}s.octEncodeFloat=function(t){return s.octEncode(t,i),s.octPackFloat(i)},s.octDecodeFloat=function(t,o){var e=t/256,n=Math.floor(e),a=256*(e-n);return s.octDecode(n,a,o)},s.octPack=function(t,o,e,n){var a=s.octEncodeFloat(t),r=s.octEncodeFloat(o),c=s.octEncode(e,i);return n.x=65536*c.x+a,n.y=65536*c.y+r,n},s.octUnpack=function(t,o,e,n){var a=t.x/65536,r=Math.floor(a),c=65536*(a-r),a=t.y/65536,i=Math.floor(a),u=65536*(a-i);s.octDecodeFloat(c,o),s.octDecodeFloat(u,e),s.octDecode(r,i,n)},s.compressTextureCoordinates=function(t){return 4096*(4095*t.x|0)+(4095*t.y|0)},s.decompressTextureCoordinates=function(t,o){var e=t/4096,n=Math.floor(e);return o.x=n/4095,o.y=(t-4096*n)/4095,o},s.zigZagDeltaDecode=function(t,o,e){for(var n=t.length,a=0,r=0,c=0,i=0;i<n;++i)a+=f(t[i]),r+=f(o[i]),t[i]=a,o[i]=r,u.defined(e)&&(c+=f(e[i]),e[i]=c)},t.AttributeCompression=s});
......@@ -22,4 +22,4 @@
* Portions licensed separately.
* See https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md for full licensing details.
*/
define(["exports","./defined-b9ff0e39","./Check-e6691f86","./defaultValue-199f5aa8","./Cartesian2-8fa798b8","./Transforms-c1620692"],function(t,c,e,r,a,d){"use strict";function x(t,e,n,i){this.x=r.defaultValue(t,0),this.y=r.defaultValue(e,0),this.width=r.defaultValue(n,0),this.height=r.defaultValue(i,0)}x.packedLength=4,x.pack=function(t,e,n){return n=r.defaultValue(n,0),e[n++]=t.x,e[n++]=t.y,e[n++]=t.width,e[n]=t.height,e},x.unpack=function(t,e,n){return e=r.defaultValue(e,0),c.defined(n)||(n=new x),n.x=t[e++],n.y=t[e++],n.width=t[e++],n.height=t[e],n},x.fromPoints=function(t,e){if(c.defined(e)||(e=new x),!c.defined(t)||0===t.length)return e.x=0,e.y=0,e.width=0,e.height=0,e;for(var n=t.length,i=t[0].x,h=t[0].y,r=t[0].x,a=t[0].y,d=1;d<n;d++){var u=t[d],f=u.x,o=u.y;i=Math.min(f,i),r=Math.max(f,r),h=Math.min(o,h),a=Math.max(o,a)}return e.x=i,e.y=h,e.width=r-i,e.height=a-h,e};var u=new d.GeographicProjection,f=new a.Cartographic,o=new a.Cartographic;x.fromRectangle=function(t,e,n){if(c.defined(n)||(n=new x),!c.defined(t))return n.x=0,n.y=0,n.width=0,n.height=0,n;var i=(e=r.defaultValue(e,u)).project(a.Rectangle.southwest(t,f)),h=e.project(a.Rectangle.northeast(t,o));return a.Cartesian2.subtract(h,i,h),n.x=i.x,n.y=i.y,n.width=h.x,n.height=h.y,n},x.clone=function(t,e){if(c.defined(t))return c.defined(e)?(e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e):new x(t.x,t.y,t.width,t.height)},x.union=function(t,e,n){c.defined(n)||(n=new x);var i=Math.min(t.x,e.x),h=Math.min(t.y,e.y),r=Math.max(t.x+t.width,e.x+e.width),a=Math.max(t.y+t.height,e.y+e.height);return n.x=i,n.y=h,n.width=r-i,n.height=a-h,n},x.expand=function(t,e,n){n=x.clone(t,n);var i=e.x-n.x,h=e.y-n.y;return i>n.width?n.width=i:i<0&&(n.width-=i,n.x=e.x),h>n.height?n.height=h:h<0&&(n.height-=h,n.y=e.y),n},x.intersect=function(t,e){var n=t.x,i=t.y,h=e.x,r=e.y;return n>h+e.width||n+t.width<h||i+t.height<r||i>r+e.height?d.Intersect.OUTSIDE:d.Intersect.INTERSECTING},x.equals=function(t,e){return t===e||c.defined(t)&&c.defined(e)&&t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height},x.prototype.clone=function(t){return x.clone(this,t)},x.prototype.intersect=function(t){return x.intersect(this,t)},x.prototype.equals=function(t){return x.equals(this,t)},t.BoundingRectangle=x});
define(["exports","./defined-b9ff0e39","./Check-e6691f86","./defaultValue-199f5aa8","./Cartesian2-8fa798b8","./Transforms-c1620692"],function(t,c,e,r,a,d){"use strict";function x(t,e,n,i){this.x=r.defaultValue(t,0),this.y=r.defaultValue(e,0),this.width=r.defaultValue(n,0),this.height=r.defaultValue(i,0)}x.packedLength=4,x.pack=function(t,e,n){return n=r.defaultValue(n,0),e[n++]=t.x,e[n++]=t.y,e[n++]=t.width,e[n]=t.height,e},x.unpack=function(t,e,n){return e=r.defaultValue(e,0),c.defined(n)||(n=new x),n.x=t[e++],n.y=t[e++],n.width=t[e++],n.height=t[e],n},x.fromPoints=function(t,e){if(c.defined(e)||(e=new x),!c.defined(t)||0===t.length)return e.x=0,e.y=0,e.width=0,e.height=0,e;for(var n=t.length,i=t[0].x,h=t[0].y,r=t[0].x,a=t[0].y,d=1;d<n;d++)var u=t[d],f=u.x,o=u.y,i=Math.min(f,i),r=Math.max(f,r),h=Math.min(o,h),a=Math.max(o,a);return e.x=i,e.y=h,e.width=r-i,e.height=a-h,e};var u=new d.GeographicProjection,f=new a.Cartographic,o=new a.Cartographic;x.fromRectangle=function(t,e,n){if(c.defined(n)||(n=new x),!c.defined(t))return n.x=0,n.y=0,n.width=0,n.height=0,n;var i=(e=r.defaultValue(e,u)).project(a.Rectangle.southwest(t,f)),h=e.project(a.Rectangle.northeast(t,o));return a.Cartesian2.subtract(h,i,h),n.x=i.x,n.y=i.y,n.width=h.x,n.height=h.y,n},x.clone=function(t,e){if(c.defined(t))return c.defined(e)?(e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e):new x(t.x,t.y,t.width,t.height)},x.union=function(t,e,n){c.defined(n)||(n=new x);var i=Math.min(t.x,e.x),h=Math.min(t.y,e.y),r=Math.max(t.x+t.width,e.x+e.width),a=Math.max(t.y+t.height,e.y+e.height);return n.x=i,n.y=h,n.width=r-i,n.height=a-h,n},x.expand=function(t,e,n){n=x.clone(t,n);var i=e.x-n.x,h=e.y-n.y;return i>n.width?n.width=i:i<0&&(n.width-=i,n.x=e.x),h>n.height?n.height=h:h<0&&(n.height-=h,n.y=e.y),n},x.intersect=function(t,e){var n=t.x,i=t.y,h=e.x,r=e.y;return n>h+e.width||n+t.width<h||i+t.height<r||i>r+e.height?d.Intersect.OUTSIDE:d.Intersect.INTERSECTING},x.equals=function(t,e){return t===e||c.defined(t)&&c.defined(e)&&t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height},x.prototype.clone=function(t){return x.clone(this,t)},x.prototype.intersect=function(t){return x.intersect(this,t)},x.prototype.equals=function(t){return x.equals(this,t)},t.BoundingRectangle=x});
......@@ -22,4 +22,4 @@
* Portions licensed separately.
* See https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md for full licensing details.
*/
define(["exports","./defined-b9ff0e39","./Check-e6691f86","./defaultValue-199f5aa8","./Math-92bd3539","./Cartesian2-8fa798b8","./Transforms-c1620692","./ComponentDatatype-569c1e3e","./GeometryAttribute-429d5416","./GeometryAttributes-c3465b51","./IndexDatatype-7119db15","./GeometryOffsetAttribute-0abfa3f6","./VertexFormat-b4c6d1c2","./CylinderGeometryLibrary-1a232241"],function(t,I,e,m,U,S,B,Y,Z,J,W,j,f,q){"use strict";var H=new S.Cartesian2,K=new S.Cartesian3,Q=new S.Cartesian3,X=new S.Cartesian3,$=new S.Cartesian3;function d(t){var e=(t=m.defaultValue(t,m.defaultValue.EMPTY_OBJECT)).length,a=t.topRadius,r=t.bottomRadius,n=m.defaultValue(t.vertexFormat,f.VertexFormat.DEFAULT),o=m.defaultValue(t.slices,128);this._length=e,this._topRadius=a,this._bottomRadius=r,this._vertexFormat=f.VertexFormat.clone(n),this._slices=o,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}d.packedLength=f.VertexFormat.packedLength+5,d.pack=function(t,e,a){return a=m.defaultValue(a,0),f.VertexFormat.pack(t._vertexFormat,e,a),a+=f.VertexFormat.packedLength,e[a++]=t._length,e[a++]=t._topRadius,e[a++]=t._bottomRadius,e[a++]=t._slices,e[a]=m.defaultValue(t._offsetAttribute,-1),e};var a,p=new f.VertexFormat,l={vertexFormat:p,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};d.unpack=function(t,e,a){e=m.defaultValue(e,0);var r=f.VertexFormat.unpack(t,e,p);e+=f.VertexFormat.packedLength;var n=t[e++],o=t[e++],i=t[e++],s=t[e++],u=t[e];return I.defined(a)?(a._vertexFormat=f.VertexFormat.clone(r,a._vertexFormat),a._length=n,a._topRadius=o,a._bottomRadius=i,a._slices=s,a._offsetAttribute=-1===u?void 0:u,a):(l.length=n,l.topRadius=o,l.bottomRadius=i,l.slices=s,l.offsetAttribute=-1===u?void 0:u,new d(l))},d.createGeometry=function(t){var e=t._length,a=t._topRadius,r=t._bottomRadius,n=t._vertexFormat,o=t._slices;if(!(e<=0||a<0||r<0||0===a&&0===r)){var i,s=o+o,u=o+s,m=s+s,f=q.CylinderGeometryLibrary.computePositions(e,a,r,o,!0),d=n.st?new Float32Array(2*m):void 0,p=n.normal?new Float32Array(3*m):void 0,l=n.tangent?new Float32Array(3*m):void 0,y=n.bitangent?new Float32Array(3*m):void 0,b=n.normal||n.tangent||n.bitangent;if(b){var c=n.tangent||n.bitangent,v=0,A=0,g=0,x=Math.atan2(r-a,e),_=K;_.z=Math.sin(x);var h=Math.cos(x),C=X,F=Q;for(i=0;i<o;i++){var w=i/o*U.CesiumMath.TWO_PI,G=h*Math.cos(w),V=h*Math.sin(w);b&&(_.x=G,_.y=V,c&&(C=S.Cartesian3.normalize(S.Cartesian3.cross(S.Cartesian3.UNIT_Z,_,C),C)),n.normal&&(p[v++]=_.x,p[v++]=_.y,p[v++]=_.z,p[v++]=_.x,p[v++]=_.y,p[v++]=_.z),n.tangent&&(l[A++]=C.x,l[A++]=C.y,l[A++]=C.z,l[A++]=C.x,l[A++]=C.y,l[A++]=C.z),n.bitangent&&(F=S.Cartesian3.normalize(S.Cartesian3.cross(_,C,F),F),y[g++]=F.x,y[g++]=F.y,y[g++]=F.z,y[g++]=F.x,y[g++]=F.y,y[g++]=F.z))}for(i=0;i<o;i++)n.normal&&(p[v++]=0,p[v++]=0,p[v++]=-1),n.tangent&&(l[A++]=1,l[A++]=0,l[A++]=0),n.bitangent&&(y[g++]=0,y[g++]=-1,y[g++]=0);for(i=0;i<o;i++)n.normal&&(p[v++]=0,p[v++]=0,p[v++]=1),n.tangent&&(l[A++]=1,l[A++]=0,l[A++]=0),n.bitangent&&(y[g++]=0,y[g++]=1,y[g++]=0)}var D=12*o-12,R=W.IndexDatatype.createTypedArray(m,D),T=0,O=0;for(i=0;i<o-1;i++)R[T++]=O,R[T++]=O+2,R[T++]=O+3,R[T++]=O,R[T++]=O+3,R[T++]=O+1,O+=2;for(R[T++]=s-2,R[T++]=0,R[T++]=1,R[T++]=s-2,R[T++]=1,R[T++]=s-1,i=1;i<o-1;i++)R[T++]=s+i+1,R[T++]=s+i,R[T++]=s;for(i=1;i<o-1;i++)R[T++]=u,R[T++]=u+i,R[T++]=u+i+1;var L=0;if(n.st){var P=Math.max(a,r);for(i=0;i<m;i++){var k=S.Cartesian3.fromArray(f,3*i,$);d[L++]=(k.x+P)/(2*P),d[L++]=(k.y+P)/(2*P)}}var M=new J.GeometryAttributes;n.position&&(M.position=new Z.GeometryAttribute({componentDatatype:Y.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:f})),n.normal&&(M.normal=new Z.GeometryAttribute({componentDatatype:Y.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:p})),n.tangent&&(M.tangent=new Z.GeometryAttribute({componentDatatype:Y.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:l})),n.bitangent&&(M.bitangent=new Z.GeometryAttribute({componentDatatype:Y.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:y})),n.st&&(M.st=new Z.GeometryAttribute({componentDatatype:Y.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:d})),H.x=.5*e,H.y=Math.max(r,a);var z=new B.BoundingSphere(S.Cartesian3.ZERO,S.Cartesian2.magnitude(H));if(I.defined(t._offsetAttribute)){e=f.length;var E=new Uint8Array(e/3),N=t._offsetAttribute===j.GeometryOffsetAttribute.NONE?0:1;j.arrayFill(E,N),M.applyOffset=new Z.GeometryAttribute({componentDatatype:Y.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}return new Z.Geometry({attributes:M,indices:R,primitiveType:Z.PrimitiveType.TRIANGLES,boundingSphere:z,offsetAttribute:t._offsetAttribute})}},d.getUnitCylinder=function(){return I.defined(a)||(a=d.createGeometry(new d({topRadius:1,bottomRadius:1,length:1,vertexFormat:f.VertexFormat.POSITION_ONLY}))),a},t.CylinderGeometry=d});
define(["exports","./defined-b9ff0e39","./Check-e6691f86","./defaultValue-199f5aa8","./Math-92bd3539","./Cartesian2-8fa798b8","./Transforms-c1620692","./ComponentDatatype-569c1e3e","./GeometryAttribute-429d5416","./GeometryAttributes-c3465b51","./IndexDatatype-7119db15","./GeometryOffsetAttribute-0abfa3f6","./VertexFormat-b4c6d1c2","./CylinderGeometryLibrary-1a232241"],function(t,I,e,m,U,S,B,Y,Z,J,W,j,d,q){"use strict";var H=new S.Cartesian2,K=new S.Cartesian3,Q=new S.Cartesian3,X=new S.Cartesian3,$=new S.Cartesian3;function f(t){var e=(t=m.defaultValue(t,m.defaultValue.EMPTY_OBJECT)).length,a=t.topRadius,r=t.bottomRadius,n=m.defaultValue(t.vertexFormat,d.VertexFormat.DEFAULT),o=m.defaultValue(t.slices,128);this._length=e,this._topRadius=a,this._bottomRadius=r,this._vertexFormat=d.VertexFormat.clone(n),this._slices=o,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}f.packedLength=d.VertexFormat.packedLength+5,f.pack=function(t,e,a){return a=m.defaultValue(a,0),d.VertexFormat.pack(t._vertexFormat,e,a),a+=d.VertexFormat.packedLength,e[a++]=t._length,e[a++]=t._topRadius,e[a++]=t._bottomRadius,e[a++]=t._slices,e[a]=m.defaultValue(t._offsetAttribute,-1),e};var a,p=new d.VertexFormat,l={vertexFormat:p,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};f.unpack=function(t,e,a){e=m.defaultValue(e,0);var r=d.VertexFormat.unpack(t,e,p);e+=d.VertexFormat.packedLength;var n=t[e++],o=t[e++],i=t[e++],s=t[e++],u=t[e];return I.defined(a)?(a._vertexFormat=d.VertexFormat.clone(r,a._vertexFormat),a._length=n,a._topRadius=o,a._bottomRadius=i,a._slices=s,a._offsetAttribute=-1===u?void 0:u,a):(l.length=n,l.topRadius=o,l.bottomRadius=i,l.slices=s,l.offsetAttribute=-1===u?void 0:u,new f(l))},f.createGeometry=function(t){var e=t._length,a=t._topRadius,r=t._bottomRadius,n=t._vertexFormat,o=t._slices;if(!(e<=0||a<0||r<0||0===a&&0===r)){var i=o+o,s=o+i,u=i+i,m=q.CylinderGeometryLibrary.computePositions(e,a,r,o,!0),d=n.st?new Float32Array(2*u):void 0,f=n.normal?new Float32Array(3*u):void 0,p=n.tangent?new Float32Array(3*u):void 0,l=n.bitangent?new Float32Array(3*u):void 0,y=n.normal||n.tangent||n.bitangent;if(y){var b=n.tangent||n.bitangent,c=0,v=0,A=0,g=Math.atan2(r-a,e),x=K;x.z=Math.sin(g);for(var _=Math.cos(g),h=X,C=Q,F=0;F<o;F++){var w=F/o*U.CesiumMath.TWO_PI,G=_*Math.cos(w),V=_*Math.sin(w);y&&(x.x=G,x.y=V,b&&(h=S.Cartesian3.normalize(S.Cartesian3.cross(S.Cartesian3.UNIT_Z,x,h),h)),n.normal&&(f[c++]=x.x,f[c++]=x.y,f[c++]=x.z,f[c++]=x.x,f[c++]=x.y,f[c++]=x.z),n.tangent&&(p[v++]=h.x,p[v++]=h.y,p[v++]=h.z,p[v++]=h.x,p[v++]=h.y,p[v++]=h.z),n.bitangent&&(C=S.Cartesian3.normalize(S.Cartesian3.cross(x,h,C),C),l[A++]=C.x,l[A++]=C.y,l[A++]=C.z,l[A++]=C.x,l[A++]=C.y,l[A++]=C.z))}for(F=0;F<o;F++)n.normal&&(f[c++]=0,f[c++]=0,f[c++]=-1),n.tangent&&(p[v++]=1,p[v++]=0,p[v++]=0),n.bitangent&&(l[A++]=0,l[A++]=-1,l[A++]=0);for(F=0;F<o;F++)n.normal&&(f[c++]=0,f[c++]=0,f[c++]=1),n.tangent&&(p[v++]=1,p[v++]=0,p[v++]=0),n.bitangent&&(l[A++]=0,l[A++]=1,l[A++]=0)}var D=12*o-12,R=W.IndexDatatype.createTypedArray(u,D),T=0,O=0;for(F=0;F<o-1;F++)R[T++]=O,R[T++]=O+2,R[T++]=O+3,R[T++]=O,R[T++]=O+3,R[T++]=O+1,O+=2;for(R[T++]=i-2,R[T++]=0,R[T++]=1,R[T++]=i-2,R[T++]=1,R[T++]=i-1,F=1;F<o-1;F++)R[T++]=i+F+1,R[T++]=i+F,R[T++]=i;for(F=1;F<o-1;F++)R[T++]=s,R[T++]=s+F,R[T++]=s+F+1;var L=0;if(n.st){var P=Math.max(a,r);for(F=0;F<u;F++){var k=S.Cartesian3.fromArray(m,3*F,$);d[L++]=(k.x+P)/(2*P),d[L++]=(k.y+P)/(2*P)}}var M=new J.GeometryAttributes;n.position&&(M.position=new Z.GeometryAttribute({componentDatatype:Y.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:m})),n.normal&&(M.normal=new Z.GeometryAttribute({componentDatatype:Y.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:f})),n.tangent&&(M.tangent=new Z.GeometryAttribute({componentDatatype:Y.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:p})),n.bitangent&&(M.bitangent=new Z.GeometryAttribute({componentDatatype:Y.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:l})),n.st&&(M.st=new Z.GeometryAttribute({componentDatatype:Y.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:d})),H.x=.5*e,H.y=Math.max(r,a);var z,E,N=new B.BoundingSphere(S.Cartesian3.ZERO,S.Cartesian2.magnitude(H));return I.defined(t._offsetAttribute)&&(e=m.length,z=new Uint8Array(e/3),E=t._offsetAttribute===j.GeometryOffsetAttribute.NONE?0:1,j.arrayFill(z,E),M.applyOffset=new Z.GeometryAttribute({componentDatatype:Y.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:z})),new Z.Geometry({attributes:M,indices:R,primitiveType:Z.PrimitiveType.TRIANGLES,boundingSphere:N,offsetAttribute:t._offsetAttribute})}},f.getUnitCylinder=function(){return I.defined(a)||(a=f.createGeometry(new f({topRadius:1,bottomRadius:1,length:1,vertexFormat:d.VertexFormat.POSITION_ONLY}))),a},t.CylinderGeometry=f});
......@@ -22,4 +22,4 @@
* Portions licensed separately.
* See https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md for full licensing details.
*/
define(["exports","./Math-92bd3539"],function(r,P){"use strict";var t={computePositions:function(r,t,e,a,i){var n,o=.5*r,s=-o,u=a+a,c=new Float64Array(3*(i?2*u:u)),f=0,h=0,y=i?3*u:0,M=i?3*(u+a):3*a;for(n=0;n<a;n++){var d=n/a*P.CesiumMath.TWO_PI,m=Math.cos(d),v=Math.sin(d),b=m*e,l=v*e,p=m*t,C=v*t;c[h+y]=b,c[h+y+1]=l,c[h+y+2]=s,c[h+M]=p,c[h+M+1]=C,c[h+M+2]=o,h+=3,i&&(c[f++]=b,c[f++]=l,c[f++]=s,c[f++]=p,c[f++]=C,c[f++]=o)}return c}};r.CylinderGeometryLibrary=t});
define(["exports","./Math-92bd3539"],function(r,P){"use strict";var t={computePositions:function(r,t,e,a,i){for(var n=.5*r,o=-n,s=a+a,u=new Float64Array(3*(i?2*s:s)),c=0,f=0,h=i?3*s:0,y=i?3*(s+a):3*a,M=0;M<a;M++){var d=M/a*P.CesiumMath.TWO_PI,m=Math.cos(d),v=Math.sin(d),b=m*e,l=v*e,p=m*t,C=v*t;u[f+h]=b,u[f+h+1]=l,u[f+h+2]=o,u[f+y]=p,u[f+y+1]=C,u[f+y+2]=n,f+=3,i&&(u[c++]=b,u[c++]=l,u[c++]=o,u[c++]=p,u[c++]=C,u[c++]=n)}return u}};r.CylinderGeometryLibrary=t});
......@@ -22,4 +22,4 @@
* Portions licensed separately.
* See https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md for full licensing details.
*/
define(["exports","./Math-92bd3539","./Cartesian2-8fa798b8","./Transforms-c1620692"],function(a,R,W,h){"use strict";var r={},x=new W.Cartesian3,M=new W.Cartesian3,f=new h.Quaternion,z=new h.Matrix3;function S(a,r,e,t,i,n,s,o,l,C){var y=a+r;W.Cartesian3.multiplyByScalar(t,Math.cos(y),x),W.Cartesian3.multiplyByScalar(e,Math.sin(y),M),W.Cartesian3.add(x,M,x);var u=Math.cos(a);u*=u;var m=Math.sin(a);m*=m;var c=n/Math.sqrt(s*u+i*m)/o;return h.Quaternion.fromAxisAngle(x,c,f),h.Matrix3.fromQuaternion(f,z),h.Matrix3.multiplyByVector(z,l,C),W.Cartesian3.normalize(C,C),W.Cartesian3.multiplyByScalar(C,o,C),C}var B=new W.Cartesian3,b=new W.Cartesian3,Q=new W.Cartesian3,_=new W.Cartesian3;r.raisePositionsToHeight=function(a,r,e){for(var t=r.ellipsoid,i=r.height,n=r.extrudedHeight,s=e?a.length/3*2:a.length/3,o=new Float64Array(3*s),l=a.length,C=e?l:0,y=0;y<l;y+=3){var u=y+1,m=y+2,c=W.Cartesian3.fromArray(a,y,B);t.scaleToGeodeticSurface(c,c);var h=W.Cartesian3.clone(c,b),x=t.geodeticSurfaceNormal(c,_),M=W.Cartesian3.multiplyByScalar(x,i,Q);W.Cartesian3.add(c,M,c),e&&(W.Cartesian3.multiplyByScalar(x,n,M),W.Cartesian3.add(h,M,h),o[y+C]=h.x,o[u+C]=h.y,o[m+C]=h.z),o[y]=c.x,o[u]=c.y,o[m]=c.z}return o};var G=new W.Cartesian3,H=new W.Cartesian3,N=new W.Cartesian3;r.computeEllipsePositions=function(a,r,e){var t=a.semiMinorAxis,i=a.semiMajorAxis,n=a.rotation,s=a.center,o=8*a.granularity,l=t*t,C=i*i,y=i*t,u=W.Cartesian3.magnitude(s),m=W.Cartesian3.normalize(s,G),c=W.Cartesian3.cross(W.Cartesian3.UNIT_Z,s,H);c=W.Cartesian3.normalize(c,c);var h=W.Cartesian3.cross(m,c,N),x=1+Math.ceil(R.CesiumMath.PI_OVER_TWO/o),M=R.CesiumMath.PI_OVER_TWO/(x-1),f=R.CesiumMath.PI_OVER_TWO-x*M;f<0&&(x-=Math.ceil(Math.abs(f)/M));var z,_,d,v,O,p=r?new Array(3*(x*(x+2)*2)):void 0,w=0,P=B,T=b,I=4*x*3,g=I-1,E=0,V=e?new Array(I):void 0;for(P=S(f=R.CesiumMath.PI_OVER_TWO,n,h,c,l,y,C,u,m,P),r&&(p[w++]=P.x,p[w++]=P.y,p[w++]=P.z),e&&(V[g--]=P.z,V[g--]=P.y,V[g--]=P.x),f=R.CesiumMath.PI_OVER_TWO-M,z=1;z<x+1;++z){if(P=S(f,n,h,c,l,y,C,u,m,P),T=S(Math.PI-f,n,h,c,l,y,C,u,m,T),r){for(p[w++]=P.x,p[w++]=P.y,p[w++]=P.z,d=2*z+2,_=1;_<d-1;++_)v=_/(d-1),O=W.Cartesian3.lerp(P,T,v,Q),p[w++]=O.x,p[w++]=O.y,p[w++]=O.z;p[w++]=T.x,p[w++]=T.y,p[w++]=T.z}e&&(V[g--]=P.z,V[g--]=P.y,V[g--]=P.x,V[E++]=T.x,V[E++]=T.y,V[E++]=T.z),f=R.CesiumMath.PI_OVER_TWO-(z+1)*M}for(z=x;1<z;--z){if(P=S(-(f=R.CesiumMath.PI_OVER_TWO-(z-1)*M),n,h,c,l,y,C,u,m,P),T=S(f+Math.PI,n,h,c,l,y,C,u,m,T),r){for(p[w++]=P.x,p[w++]=P.y,p[w++]=P.z,d=2*(z-1)+2,_=1;_<d-1;++_)v=_/(d-1),O=W.Cartesian3.lerp(P,T,v,Q),p[w++]=O.x,p[w++]=O.y,p[w++]=O.z;p[w++]=T.x,p[w++]=T.y,p[w++]=T.z}e&&(V[g--]=P.z,V[g--]=P.y,V[g--]=P.x,V[E++]=T.x,V[E++]=T.y,V[E++]=T.z)}P=S(-(f=R.CesiumMath.PI_OVER_TWO),n,h,c,l,y,C,u,m,P);var A={};return r&&(p[w++]=P.x,p[w++]=P.y,p[w++]=P.z,A.positions=p,A.numPts=x),e&&(V[g--]=P.z,V[g--]=P.y,V[g--]=P.x,A.outerPositions=V),A},a.EllipseGeometryLibrary=r});
define(["exports","./Math-92bd3539","./Cartesian2-8fa798b8","./Transforms-c1620692"],function(a,R,W,h){"use strict";var r={},x=new W.Cartesian3,M=new W.Cartesian3,f=new h.Quaternion,z=new h.Matrix3;function S(a,r,e,t,i,n,s,o,l,C){var y=a+r;W.Cartesian3.multiplyByScalar(t,Math.cos(y),x),W.Cartesian3.multiplyByScalar(e,Math.sin(y),M),W.Cartesian3.add(x,M,x);var u=Math.cos(a);u*=u;var m=Math.sin(a);m*=m;var c=n/Math.sqrt(s*u+i*m)/o;return h.Quaternion.fromAxisAngle(x,c,f),h.Matrix3.fromQuaternion(f,z),h.Matrix3.multiplyByVector(z,l,C),W.Cartesian3.normalize(C,C),W.Cartesian3.multiplyByScalar(C,o,C),C}var B=new W.Cartesian3,b=new W.Cartesian3,Q=new W.Cartesian3,_=new W.Cartesian3;r.raisePositionsToHeight=function(a,r,e){for(var t=r.ellipsoid,i=r.height,n=r.extrudedHeight,s=e?a.length/3*2:a.length/3,o=new Float64Array(3*s),l=a.length,C=e?l:0,y=0;y<l;y+=3){var u=y+1,m=y+2,c=W.Cartesian3.fromArray(a,y,B);t.scaleToGeodeticSurface(c,c);var h=W.Cartesian3.clone(c,b),x=t.geodeticSurfaceNormal(c,_),M=W.Cartesian3.multiplyByScalar(x,i,Q);W.Cartesian3.add(c,M,c),e&&(W.Cartesian3.multiplyByScalar(x,n,M),W.Cartesian3.add(h,M,h),o[y+C]=h.x,o[u+C]=h.y,o[m+C]=h.z),o[y]=c.x,o[u]=c.y,o[m]=c.z}return o};var G=new W.Cartesian3,H=new W.Cartesian3,N=new W.Cartesian3;r.computeEllipsePositions=function(a,r,e){var t=a.semiMinorAxis,i=a.semiMajorAxis,n=a.rotation,s=a.center,o=8*a.granularity,l=t*t,C=i*i,y=i*t,u=W.Cartesian3.magnitude(s),m=W.Cartesian3.normalize(s,G),c=W.Cartesian3.cross(W.Cartesian3.UNIT_Z,s,H),c=W.Cartesian3.normalize(c,c),h=W.Cartesian3.cross(m,c,N),x=1+Math.ceil(R.CesiumMath.PI_OVER_TWO/o),M=R.CesiumMath.PI_OVER_TWO/(x-1),f=R.CesiumMath.PI_OVER_TWO-x*M;f<0&&(x-=Math.ceil(Math.abs(f)/M));var z,_,d,O,v,p=r?new Array(3*(x*(x+2)*2)):void 0,w=0,P=B,T=b,I=4*x*3,g=I-1,E=0,V=e?new Array(I):void 0,P=S(f=R.CesiumMath.PI_OVER_TWO,n,h,c,l,y,C,u,m,P);for(r&&(p[w++]=P.x,p[w++]=P.y,p[w++]=P.z),e&&(V[g--]=P.z,V[g--]=P.y,V[g--]=P.x),f=R.CesiumMath.PI_OVER_TWO-M,z=1;z<x+1;++z){if(P=S(f,n,h,c,l,y,C,u,m,P),T=S(Math.PI-f,n,h,c,l,y,C,u,m,T),r){for(p[w++]=P.x,p[w++]=P.y,p[w++]=P.z,d=2*z+2,_=1;_<d-1;++_)O=_/(d-1),v=W.Cartesian3.lerp(P,T,O,Q),p[w++]=v.x,p[w++]=v.y,p[w++]=v.z;p[w++]=T.x,p[w++]=T.y,p[w++]=T.z}e&&(V[g--]=P.z,V[g--]=P.y,V[g--]=P.x,V[E++]=T.x,V[E++]=T.y,V[E++]=T.z),f=R.CesiumMath.PI_OVER_TWO-(z+1)*M}for(z=x;1<z;--z){if(P=S(-(f=R.CesiumMath.PI_OVER_TWO-(z-1)*M),n,h,c,l,y,C,u,m,P),T=S(f+Math.PI,n,h,c,l,y,C,u,m,T),r){for(p[w++]=P.x,p[w++]=P.y,p[w++]=P.z,d=2*(z-1)+2,_=1;_<d-1;++_)O=_/(d-1),v=W.Cartesian3.lerp(P,T,O,Q),p[w++]=v.x,p[w++]=v.y,p[w++]=v.z;p[w++]=T.x,p[w++]=T.y,p[w++]=T.z}e&&(V[g--]=P.z,V[g--]=P.y,V[g--]=P.x,V[E++]=T.x,V[E++]=T.y,V[E++]=T.z)}P=S(-(f=R.CesiumMath.PI_OVER_TWO),n,h,c,l,y,C,u,m,P);var A={};return r&&(p[w++]=P.x,p[w++]=P.y,p[w++]=P.z,A.positions=p,A.numPts=x),e&&(V[g--]=P.z,V[g--]=P.y,V[g--]=P.x,A.outerPositions=V),A},a.EllipseGeometryLibrary=r});
......@@ -22,4 +22,4 @@
* Portions licensed separately.
* See https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md for full licensing details.
*/
define(["exports","./defined-b9ff0e39","./Check-e6691f86","./defaultValue-199f5aa8","./Math-92bd3539","./Cartesian2-8fa798b8","./defineProperties-ae15c9d5"],function(t,b,a,e,T,R,i){"use strict";function z(t,a,i,n,e,s,r){var h,o,d=(h=t)*(o=i)*(4+h*(4-3*o))/16;return(1-d)*t*a*(n+d*e*(r+d*s*(2*r*r-1)))}var P=new R.Cartesian3,y=new R.Cartesian3;function s(t,a,i,n){var e,s,r,h,o,d,u,c,M,l,g,_,p,f,v,m,C,H,O,S,q,U,b,A,w;R.Cartesian3.normalize(n.cartographicToCartesian(a,y),P),R.Cartesian3.normalize(n.cartographicToCartesian(i,y),y);!function(t,a,i,n,e,s,r){var h,o,d,u,c,M=(a-i)/a,l=s-n,g=Math.atan((1-M)*Math.tan(e)),_=Math.atan((1-M)*Math.tan(r)),p=Math.cos(g),f=Math.sin(g),v=Math.cos(_),m=Math.sin(_),C=p*v,H=p*m,O=f*m,S=f*v,q=l,U=T.CesiumMath.TWO_PI,b=Math.cos(q),A=Math.sin(q);do{b=Math.cos(q),A=Math.sin(q);var w,R=H-S*b;d=Math.sqrt(v*v*A*A+R*R),o=O+C*b,h=Math.atan2(d,o),U=q,c=o-2*O/(u=0===d?(w=0,1):1-(w=C*A/d)*w),isNaN(c)&&(c=0),q=l+z(M,w,u,h,d,o,c)}while(Math.abs(q-U)>T.CesiumMath.EPSILON12);var P=u*(a*a-i*i)/(i*i),y=P*(256+P*(P*(74-47*P)-128))/1024,E=c*c,x=i*(1+P*(4096+P*(P*(320-175*P)-768))/16384)*(h-y*d*(c+y*(o*(2*E-1)-y*c*(4*d*d-3)*(4*E-3)/6)/4)),D=Math.atan2(v*A,H-S*b),N=Math.atan2(p*A,H*b-S);t._distance=x,t._startHeading=D,t._endHeading=N,t._uSquared=P}(t,n.maximumRadius,n.minimumRadius,a.longitude,a.latitude,i.longitude,i.latitude),t._start=R.Cartographic.clone(a,t._start),t._end=R.Cartographic.clone(i,t._end),t._start.height=0,t._end.height=0,s=(e=t)._uSquared,r=e._ellipsoid.maximumRadius,h=e._ellipsoid.minimumRadius,o=(r-h)/r,d=Math.cos(e._startHeading),u=Math.sin(e._startHeading),c=(1-o)*Math.tan(e._start.latitude),M=1/Math.sqrt(1+c*c),l=M*c,g=Math.atan2(c,d),f=1-(p=(_=M*u)*_),v=Math.sqrt(f),U=1-3*(m=s/4)+35*(C=m*m)/4,b=1-5*m,A=(S=1+m-3*C/4+5*(H=C*m)/4-175*(O=C*C)/64)*g-(q=1-m+15*C/8-35*H/8)*Math.sin(2*g)*m/2-U*Math.sin(4*g)*C/16-b*Math.sin(6*g)*H/48-5*Math.sin(8*g)*O/512,(w=e._constants).a=r,w.b=h,w.f=o,w.cosineHeading=d,w.sineHeading=u,w.tanU=c,w.cosineU=M,w.sineU=l,w.sigma=g,w.sineAlpha=_,w.sineSquaredAlpha=p,w.cosineSquaredAlpha=f,w.cosineAlpha=v,w.u2Over4=m,w.u4Over16=C,w.u6Over64=H,w.u8Over256=O,w.a0=S,w.a1=q,w.a2=U,w.a3=b,w.distanceRatio=A}function n(t,a,i){var n=e.defaultValue(i,R.Ellipsoid.WGS84);this._ellipsoid=n,this._start=new R.Cartographic,this._end=new R.Cartographic,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,b.defined(t)&&b.defined(a)&&s(this,t,a,n)}i.defineProperties(n.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return this._startHeading}},endHeading:{get:function(){return this._endHeading}}}),n.prototype.setEndPoints=function(t,a){s(this,t,a,this._ellipsoid)},n.prototype.interpolateUsingFraction=function(t,a){return this.interpolateUsingSurfaceDistance(this._distance*t,a)},n.prototype.interpolateUsingSurfaceDistance=function(t,a){var i=this._constants,n=i.distanceRatio+t/i.b,e=Math.cos(2*n),s=Math.cos(4*n),r=Math.cos(6*n),h=Math.sin(2*n),o=Math.sin(4*n),d=Math.sin(6*n),u=Math.sin(8*n),c=n*n,M=n*c,l=i.u8Over256,g=i.u2Over4,_=i.u6Over64,p=i.u4Over16,f=2*M*l*e/3+n*(1-g+7*p/4-15*_/4+579*l/64-(p-15*_/4+187*l/16)*e-(5*_/4-115*l/16)*s-29*l*r/16)+(g/2-p+71*_/32-85*l/16)*h+(5*p/16-5*_/4+383*l/96)*o-c*((_-11*l/2)*h+5*l*o/2)+(29*_/96-29*l/16)*d+539*l*u/1536,v=Math.asin(Math.sin(f)*i.cosineAlpha),m=Math.atan(i.a/i.b*Math.tan(v));f-=i.sigma;var C=Math.cos(2*i.sigma+f),H=Math.sin(f),O=Math.cos(f),S=i.cosineU*O,q=i.sineU*H,U=Math.atan2(H*i.sineHeading,S-q*i.cosineHeading)-z(i.f,i.sineAlpha,i.cosineSquaredAlpha,f,H,O,C);return b.defined(a)?(a.longitude=this._start.longitude+U,a.latitude=m,a.height=0,a):new R.Cartographic(this._start.longitude+U,m,0)},t.EllipsoidGeodesic=n});
define(["exports","./defined-b9ff0e39","./Check-e6691f86","./defaultValue-199f5aa8","./Math-92bd3539","./Cartesian2-8fa798b8","./defineProperties-ae15c9d5"],function(t,b,a,e,T,R,i){"use strict";function z(t,a,i,n,e,s,r){var h,o,d=(h=t)*(o=i)*(4+h*(4-3*o))/16;return(1-d)*t*a*(n+d*e*(r+d*s*(2*r*r-1)))}var P=new R.Cartesian3,y=new R.Cartesian3;function s(t,a,i,n){var e,s,r,h,o,d,u,c,M,l,g,_,p,f,v,m,C,H,O,S,q,U,b,A,w;R.Cartesian3.normalize(n.cartographicToCartesian(a,y),P),R.Cartesian3.normalize(n.cartographicToCartesian(i,y),y);!function(t,a,i,n,e,s,r){var h=(a-i)/a,o=s-n,d=Math.atan((1-h)*Math.tan(e)),u=Math.atan((1-h)*Math.tan(r)),c=Math.cos(d),M=Math.sin(d),l=Math.cos(u),g=Math.sin(u),_=c*l,p=c*g,f=M*g,v=M*l,m=o,C=T.CesiumMath.TWO_PI,H=Math.cos(m),O=Math.sin(m);do{H=Math.cos(m),O=Math.sin(m);var S,q,U=p-v*H,b=Math.sqrt(l*l*O*O+U*U),A=f+_*H,w=Math.atan2(b,A),C=m,R=A-2*f/(q=0===b?(S=0,1):1-(S=_*O/b)*S);isNaN(R)&&(R=0),m=o+z(h,S,q,w,b,A,R)}while(Math.abs(m-C)>T.CesiumMath.EPSILON12);var P=q*(a*a-i*i)/(i*i),y=P*(256+P*(P*(74-47*P)-128))/1024,E=R*R,x=i*(1+P*(4096+P*(P*(320-175*P)-768))/16384)*(w-y*b*(R+y*(A*(2*E-1)-y*R*(4*b*b-3)*(4*E-3)/6)/4)),D=Math.atan2(l*O,p-v*H),N=Math.atan2(c*O,p*H-v);t._distance=x,t._startHeading=D,t._endHeading=N,t._uSquared=P}(t,n.maximumRadius,n.minimumRadius,a.longitude,a.latitude,i.longitude,i.latitude),t._start=R.Cartographic.clone(a,t._start),t._end=R.Cartographic.clone(i,t._end),t._start.height=0,t._end.height=0,s=(e=t)._uSquared,r=e._ellipsoid.maximumRadius,h=e._ellipsoid.minimumRadius,o=(r-h)/r,d=Math.cos(e._startHeading),u=Math.sin(e._startHeading),c=(1-o)*Math.tan(e._start.latitude),M=1/Math.sqrt(1+c*c),l=M*c,g=Math.atan2(c,d),f=1-(p=(_=M*u)*_),v=Math.sqrt(f),U=1-3*(m=s/4)+35*(C=m*m)/4,b=1-5*m,A=(S=1+m-3*C/4+5*(H=C*m)/4-175*(O=C*C)/64)*g-(q=1-m+15*C/8-35*H/8)*Math.sin(2*g)*m/2-U*Math.sin(4*g)*C/16-b*Math.sin(6*g)*H/48-5*Math.sin(8*g)*O/512,(w=e._constants).a=r,w.b=h,w.f=o,w.cosineHeading=d,w.sineHeading=u,w.tanU=c,w.cosineU=M,w.sineU=l,w.sigma=g,w.sineAlpha=_,w.sineSquaredAlpha=p,w.cosineSquaredAlpha=f,w.cosineAlpha=v,w.u2Over4=m,w.u4Over16=C,w.u6Over64=H,w.u8Over256=O,w.a0=S,w.a1=q,w.a2=U,w.a3=b,w.distanceRatio=A}function n(t,a,i){var n=e.defaultValue(i,R.Ellipsoid.WGS84);this._ellipsoid=n,this._start=new R.Cartographic,this._end=new R.Cartographic,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,b.defined(t)&&b.defined(a)&&s(this,t,a,n)}i.defineProperties(n.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return this._startHeading}},endHeading:{get:function(){return this._endHeading}}}),n.prototype.setEndPoints=function(t,a){s(this,t,a,this._ellipsoid)},n.prototype.interpolateUsingFraction=function(t,a){return this.interpolateUsingSurfaceDistance(this._distance*t,a)},n.prototype.interpolateUsingSurfaceDistance=function(t,a){var i=this._constants,n=i.distanceRatio+t/i.b,e=Math.cos(2*n),s=Math.cos(4*n),r=Math.cos(6*n),h=Math.sin(2*n),o=Math.sin(4*n),d=Math.sin(6*n),u=Math.sin(8*n),c=n*n,M=n*c,l=i.u8Over256,g=i.u2Over4,_=i.u6Over64,p=i.u4Over16,f=2*M*l*e/3+n*(1-g+7*p/4-15*_/4+579*l/64-(p-15*_/4+187*l/16)*e-(5*_/4-115*l/16)*s-29*l*r/16)+(g/2-p+71*_/32-85*l/16)*h+(5*p/16-5*_/4+383*l/96)*o-c*((_-11*l/2)*h+5*l*o/2)+(29*_/96-29*l/16)*d+539*l*u/1536,v=Math.asin(Math.sin(f)*i.cosineAlpha),m=Math.atan(i.a/i.b*Math.tan(v));f-=i.sigma;var C=Math.cos(2*i.sigma+f),H=Math.sin(f),O=Math.cos(f),S=i.cosineU*O,q=i.sineU*H,U=Math.atan2(H*i.sineHeading,S-q*i.cosineHeading)-z(i.f,i.sineAlpha,i.cosineSquaredAlpha,f,H,O,C);return b.defined(a)?(a.longitude=this._start.longitude+U,a.latitude=m,a.height=0,a):new R.Cartographic(this._start.longitude+U,m,0)},t.EllipsoidGeodesic=n});
......@@ -22,4 +22,4 @@
* Portions licensed separately.
* See https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md for full licensing details.
*/
define(["exports","./defined-b9ff0e39","./Check-e6691f86","./defaultValue-199f5aa8","./Math-92bd3539","./Cartesian2-8fa798b8","./Transforms-c1620692","./ComponentDatatype-569c1e3e","./GeometryAttribute-429d5416","./GeometryAttributes-c3465b51","./IndexDatatype-7119db15","./GeometryOffsetAttribute-0abfa3f6"],function(i,R,t,c,N,B,S,U,F,W,Y,J){"use strict";var f=new B.Cartesian3(1,1,1),j=Math.cos,q=Math.sin;function C(i){i=c.defaultValue(i,c.defaultValue.EMPTY_OBJECT);var t=c.defaultValue(i.radii,f),e=c.defaultValue(i.innerRadii,t),a=c.defaultValue(i.minimumClock,0),n=c.defaultValue(i.maximumClock,N.CesiumMath.TWO_PI),r=c.defaultValue(i.minimumCone,0),o=c.defaultValue(i.maximumCone,N.CesiumMath.PI),s=Math.round(c.defaultValue(i.stackPartitions,10)),m=Math.round(c.defaultValue(i.slicePartitions,8)),u=Math.round(c.defaultValue(i.subdivisions,128));this._radii=B.Cartesian3.clone(t),this._innerRadii=B.Cartesian3.clone(e),this._minimumClock=a,this._maximumClock=n,this._minimumCone=r,this._maximumCone=o,this._stackPartitions=s,this._slicePartitions=m,this._subdivisions=u,this._offsetAttribute=i.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}C.packedLength=2*B.Cartesian3.packedLength+8,C.pack=function(i,t,e){return e=c.defaultValue(e,0),B.Cartesian3.pack(i._radii,t,e),e+=B.Cartesian3.packedLength,B.Cartesian3.pack(i._innerRadii,t,e),e+=B.Cartesian3.packedLength,t[e++]=i._minimumClock,t[e++]=i._maximumClock,t[e++]=i._minimumCone,t[e++]=i._maximumCone,t[e++]=i._stackPartitions,t[e++]=i._slicePartitions,t[e++]=i._subdivisions,t[e]=c.defaultValue(i._offsetAttribute,-1),t};var _=new B.Cartesian3,h=new B.Cartesian3,p={radii:_,innerRadii:h,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};C.unpack=function(i,t,e){t=c.defaultValue(t,0);var a=B.Cartesian3.unpack(i,t,_);t+=B.Cartesian3.packedLength;var n=B.Cartesian3.unpack(i,t,h);t+=B.Cartesian3.packedLength;var r=i[t++],o=i[t++],s=i[t++],m=i[t++],u=i[t++],f=i[t++],d=i[t++],l=i[t];return R.defined(e)?(e._radii=B.Cartesian3.clone(a,e._radii),e._innerRadii=B.Cartesian3.clone(n,e._innerRadii),e._minimumClock=r,e._maximumClock=o,e._minimumCone=s,e._maximumCone=m,e._stackPartitions=u,e._slicePartitions=f,e._subdivisions=d,e._offsetAttribute=-1===l?void 0:l,e):(p.minimumClock=r,p.maximumClock=o,p.minimumCone=s,p.maximumCone=m,p.stackPartitions=u,p.slicePartitions=f,p.subdivisions=d,p.offsetAttribute=-1===l?void 0:l,new C(p))},C.createGeometry=function(i){var t=i._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var e=i._innerRadii;if(!(e.x<=0||e.y<=0||e.z<=0)){var a=i._minimumClock,n=i._maximumClock,r=i._minimumCone,o=i._maximumCone,s=i._subdivisions,m=B.Ellipsoid.fromCartesian3(t),u=i._slicePartitions+1,f=i._stackPartitions+1;(u=Math.round(u*Math.abs(n-a)/N.CesiumMath.TWO_PI))<2&&(u=2),(f=Math.round(f*Math.abs(o-r)/N.CesiumMath.PI))<2&&(f=2);var d=0,l=1,c=e.x!==t.x||e.y!==t.y||e.z!==t.z,C=!1,_=!1;c&&(l=2,0<r&&(C=!0,d+=u),o<Math.PI&&(_=!0,d+=u));var h,p,v,y,b=s*l*(f+u),k=new Float64Array(3*b),A=2*(b+d-(u+f)*l),x=Y.IndexDatatype.createTypedArray(b,A),P=0,M=new Array(f),w=new Array(f);for(h=0;h<f;h++)y=r+h*(o-r)/(f-1),M[h]=q(y),w[h]=j(y);var V=new Array(s),g=new Array(s);for(h=0;h<s;h++)v=a+h*(n-a)/(s-1),V[h]=q(v),g[h]=j(v);for(h=0;h<f;h++)for(p=0;p<s;p++)k[P++]=t.x*M[h]*g[p],k[P++]=t.y*M[h]*V[p],k[P++]=t.z*w[h];if(c)for(h=0;h<f;h++)for(p=0;p<s;p++)k[P++]=e.x*M[h]*g[p],k[P++]=e.y*M[h]*V[p],k[P++]=e.z*w[h];for(M.length=s,w.length=s,h=0;h<s;h++)y=r+h*(o-r)/(s-1),M[h]=q(y),w[h]=j(y);for(V.length=u,g.length=u,h=0;h<u;h++)v=a+h*(n-a)/(u-1),V[h]=q(v),g[h]=j(v);for(h=0;h<s;h++)for(p=0;p<u;p++)k[P++]=t.x*M[h]*g[p],k[P++]=t.y*M[h]*V[p],k[P++]=t.z*w[h];if(c)for(h=0;h<s;h++)for(p=0;p<u;p++)k[P++]=e.x*M[h]*g[p],k[P++]=e.y*M[h]*V[p],k[P++]=e.z*w[h];for(h=P=0;h<f*l;h++){var G=h*s;for(p=0;p<s-1;p++)x[P++]=G+p,x[P++]=G+p+1}var E=f*s*l;for(h=0;h<u;h++)for(p=0;p<s-1;p++)x[P++]=E+h+p*u,x[P++]=E+h+(p+1)*u;if(c)for(E=f*s*l+u*s,h=0;h<u;h++)for(p=0;p<s-1;p++)x[P++]=E+h+p*u,x[P++]=E+h+(p+1)*u;if(c){var O=f*s*l,D=O+s*u;if(C)for(h=0;h<u;h++)x[P++]=O+h,x[P++]=D+h;if(_)for(O+=s*u-u,D+=s*u-u,h=0;h<u;h++)x[P++]=O+h,x[P++]=D+h}var I=new W.GeometryAttributes({position:new F.GeometryAttribute({componentDatatype:U.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:k})});if(R.defined(i._offsetAttribute)){var T=k.length,z=new Uint8Array(T/3),L=i._offsetAttribute===J.GeometryOffsetAttribute.NONE?0:1;J.arrayFill(z,L),I.applyOffset=new F.GeometryAttribute({componentDatatype:U.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:z})}return new F.Geometry({attributes:I,indices:x,primitiveType:F.PrimitiveType.LINES,boundingSphere:S.BoundingSphere.fromEllipsoid(m),offsetAttribute:i._offsetAttribute})}}},i.EllipsoidOutlineGeometry=C});
define(["exports","./defined-b9ff0e39","./Check-e6691f86","./defaultValue-199f5aa8","./Math-92bd3539","./Cartesian2-8fa798b8","./Transforms-c1620692","./ComponentDatatype-569c1e3e","./GeometryAttribute-429d5416","./GeometryAttributes-c3465b51","./IndexDatatype-7119db15","./GeometryOffsetAttribute-0abfa3f6"],function(i,R,t,c,N,B,S,U,F,W,Y,J){"use strict";var f=new B.Cartesian3(1,1,1),j=Math.cos,q=Math.sin;function C(i){i=c.defaultValue(i,c.defaultValue.EMPTY_OBJECT);var t=c.defaultValue(i.radii,f),e=c.defaultValue(i.innerRadii,t),a=c.defaultValue(i.minimumClock,0),n=c.defaultValue(i.maximumClock,N.CesiumMath.TWO_PI),r=c.defaultValue(i.minimumCone,0),o=c.defaultValue(i.maximumCone,N.CesiumMath.PI),s=Math.round(c.defaultValue(i.stackPartitions,10)),m=Math.round(c.defaultValue(i.slicePartitions,8)),u=Math.round(c.defaultValue(i.subdivisions,128));this._radii=B.Cartesian3.clone(t),this._innerRadii=B.Cartesian3.clone(e),this._minimumClock=a,this._maximumClock=n,this._minimumCone=r,this._maximumCone=o,this._stackPartitions=s,this._slicePartitions=m,this._subdivisions=u,this._offsetAttribute=i.offsetAttribute,this._workerName="createEllipsoidOutlineGeometry"}C.packedLength=2*B.Cartesian3.packedLength+8,C.pack=function(i,t,e){return e=c.defaultValue(e,0),B.Cartesian3.pack(i._radii,t,e),e+=B.Cartesian3.packedLength,B.Cartesian3.pack(i._innerRadii,t,e),e+=B.Cartesian3.packedLength,t[e++]=i._minimumClock,t[e++]=i._maximumClock,t[e++]=i._minimumCone,t[e++]=i._maximumCone,t[e++]=i._stackPartitions,t[e++]=i._slicePartitions,t[e++]=i._subdivisions,t[e]=c.defaultValue(i._offsetAttribute,-1),t};var _=new B.Cartesian3,h=new B.Cartesian3,p={radii:_,innerRadii:h,minimumClock:void 0,maximumClock:void 0,minimumCone:void 0,maximumCone:void 0,stackPartitions:void 0,slicePartitions:void 0,subdivisions:void 0,offsetAttribute:void 0};C.unpack=function(i,t,e){t=c.defaultValue(t,0);var a=B.Cartesian3.unpack(i,t,_);t+=B.Cartesian3.packedLength;var n=B.Cartesian3.unpack(i,t,h);t+=B.Cartesian3.packedLength;var r=i[t++],o=i[t++],s=i[t++],m=i[t++],u=i[t++],f=i[t++],d=i[t++],l=i[t];return R.defined(e)?(e._radii=B.Cartesian3.clone(a,e._radii),e._innerRadii=B.Cartesian3.clone(n,e._innerRadii),e._minimumClock=r,e._maximumClock=o,e._minimumCone=s,e._maximumCone=m,e._stackPartitions=u,e._slicePartitions=f,e._subdivisions=d,e._offsetAttribute=-1===l?void 0:l,e):(p.minimumClock=r,p.maximumClock=o,p.minimumCone=s,p.maximumCone=m,p.stackPartitions=u,p.slicePartitions=f,p.subdivisions=d,p.offsetAttribute=-1===l?void 0:l,new C(p))},C.createGeometry=function(i){var t=i._radii;if(!(t.x<=0||t.y<=0||t.z<=0)){var e=i._innerRadii;if(!(e.x<=0||e.y<=0||e.z<=0)){var a=i._minimumClock,n=i._maximumClock,r=i._minimumCone,o=i._maximumCone,s=i._subdivisions,m=B.Ellipsoid.fromCartesian3(t),u=i._slicePartitions+1,f=i._stackPartitions+1;(u=Math.round(u*Math.abs(n-a)/N.CesiumMath.TWO_PI))<2&&(u=2),(f=Math.round(f*Math.abs(o-r)/N.CesiumMath.PI))<2&&(f=2);var d=0,l=1,c=e.x!==t.x||e.y!==t.y||e.z!==t.z,C=!1,_=!1;c&&(l=2,0<r&&(C=!0,d+=u),o<Math.PI&&(_=!0,d+=u));for(var h,p,y=s*l*(f+u),v=new Float64Array(3*y),b=2*(y+d-(u+f)*l),k=Y.IndexDatatype.createTypedArray(y,b),A=0,x=new Array(f),P=new Array(f),M=0;M<f;M++)p=r+M*(o-r)/(f-1),x[M]=q(p),P[M]=j(p);var w=new Array(s),V=new Array(s);for(M=0;M<s;M++)h=a+M*(n-a)/(s-1),w[M]=q(h),V[M]=j(h);for(M=0;M<f;M++)for(G=0;G<s;G++)v[A++]=t.x*x[M]*V[G],v[A++]=t.y*x[M]*w[G],v[A++]=t.z*P[M];if(c)for(M=0;M<f;M++)for(G=0;G<s;G++)v[A++]=e.x*x[M]*V[G],v[A++]=e.y*x[M]*w[G],v[A++]=e.z*P[M];for(x.length=s,P.length=s,M=0;M<s;M++)p=r+M*(o-r)/(s-1),x[M]=q(p),P[M]=j(p);for(w.length=u,V.length=u,M=0;M<u;M++)h=a+M*(n-a)/(u-1),w[M]=q(h),V[M]=j(h);for(M=0;M<s;M++)for(G=0;G<u;G++)v[A++]=t.x*x[M]*V[G],v[A++]=t.y*x[M]*w[G],v[A++]=t.z*P[M];if(c)for(M=0;M<s;M++)for(G=0;G<u;G++)v[A++]=e.x*x[M]*V[G],v[A++]=e.y*x[M]*w[G],v[A++]=e.z*P[M];for(M=A=0;M<f*l;M++)for(var g=M*s,G=0;G<s-1;G++)k[A++]=g+G,k[A++]=g+G+1;var E=f*s*l;for(M=0;M<u;M++)for(G=0;G<s-1;G++)k[A++]=E+M+G*u,k[A++]=E+M+(G+1)*u;if(c)for(E=f*s*l+u*s,M=0;M<u;M++)for(G=0;G<s-1;G++)k[A++]=E+M+G*u,k[A++]=E+M+(G+1)*u;if(c){var O=f*s*l,D=O+s*u;if(C)for(M=0;M<u;M++)k[A++]=O+M,k[A++]=D+M;if(_)for(O+=s*u-u,D+=s*u-u,M=0;M<u;M++)k[A++]=O+M,k[A++]=D+M}var I,T,z,L=new W.GeometryAttributes({position:new F.GeometryAttribute({componentDatatype:U.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:v})});return R.defined(i._offsetAttribute)&&(I=v.length,T=new Uint8Array(I/3),z=i._offsetAttribute===J.GeometryOffsetAttribute.NONE?0:1,J.arrayFill(T,z),L.applyOffset=new F.GeometryAttribute({componentDatatype:U.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:T})),new F.Geometry({attributes:L,indices:k,primitiveType:F.PrimitiveType.LINES,boundingSphere:S.BoundingSphere.fromEllipsoid(m),offsetAttribute:i._offsetAttribute})}}},i.EllipsoidOutlineGeometry=C});
......@@ -22,4 +22,4 @@
* Portions licensed separately.
* See https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md for full licensing details.
*/
define(["exports","./defined-b9ff0e39","./Check-e6691f86","./defaultValue-199f5aa8","./Cartesian2-8fa798b8","./defineProperties-ae15c9d5","./Transforms-c1620692","./IntersectionTests-b2cf7157","./Plane-25b68fde"],function(e,C,n,a,x,t,s,o,r){"use strict";function y(e,n,t){this.minimum=x.Cartesian3.clone(a.defaultValue(e,x.Cartesian3.ZERO)),this.maximum=x.Cartesian3.clone(a.defaultValue(n,x.Cartesian3.ZERO)),t=C.defined(t)?x.Cartesian3.clone(t):x.Cartesian3.midpoint(this.minimum,this.maximum,new x.Cartesian3),this.center=t}y.fromPoints=function(e,n){if(C.defined(n)||(n=new y),!C.defined(e)||0===e.length)return n.minimum=x.Cartesian3.clone(x.Cartesian3.ZERO,n.minimum),n.maximum=x.Cartesian3.clone(x.Cartesian3.ZERO,n.maximum),n.center=x.Cartesian3.clone(x.Cartesian3.ZERO,n.center),n;for(var t=e[0].x,i=e[0].y,a=e[0].z,r=e[0].x,s=e[0].y,o=e[0].z,m=e.length,l=1;l<m;l++){var u=e[l],c=u.x,d=u.y,f=u.z;t=Math.min(c,t),r=Math.max(c,r),i=Math.min(d,i),s=Math.max(d,s),a=Math.min(f,a),o=Math.max(f,o)}var h=n.minimum;h.x=t,h.y=i,h.z=a;var p=n.maximum;return p.x=r,p.y=s,p.z=o,n.center=x.Cartesian3.midpoint(h,p,n.center),n},y.clone=function(e,n){if(C.defined(e))return C.defined(n)?(n.minimum=x.Cartesian3.clone(e.minimum,n.minimum),n.maximum=x.Cartesian3.clone(e.maximum,n.maximum),n.center=x.Cartesian3.clone(e.center,n.center),n):new y(e.minimum,e.maximum,e.center)},y.equals=function(e,n){return e===n||C.defined(e)&&C.defined(n)&&x.Cartesian3.equals(e.center,n.center)&&x.Cartesian3.equals(e.minimum,n.minimum)&&x.Cartesian3.equals(e.maximum,n.maximum)};var m=new x.Cartesian3;y.intersectPlane=function(e,n){m=x.Cartesian3.subtract(e.maximum,e.minimum,m);var t=x.Cartesian3.multiplyByScalar(m,.5,m),i=n.normal,a=t.x*Math.abs(i.x)+t.y*Math.abs(i.y)+t.z*Math.abs(i.z),r=x.Cartesian3.dot(e.center,i)+n.distance;return 0<r-a?s.Intersect.INSIDE:r+a<0?s.Intersect.OUTSIDE:s.Intersect.INTERSECTING},y.prototype.clone=function(e){return y.clone(this,e)},y.prototype.intersectPlane=function(e){return y.intersectPlane(this,e)},y.prototype.equals=function(e){return y.equals(this,e)};var l=new s.Cartesian4;function i(e,n){e=(n=a.defaultValue(n,x.Ellipsoid.WGS84)).scaleToGeodeticSurface(e);var t=s.Transforms.eastNorthUpToFixedFrame(e,n);this._ellipsoid=n,this._origin=e,this._xAxis=x.Cartesian3.fromCartesian4(s.Matrix4.getColumn(t,0,l)),this._yAxis=x.Cartesian3.fromCartesian4(s.Matrix4.getColumn(t,1,l));var i=x.Cartesian3.fromCartesian4(s.Matrix4.getColumn(t,2,l));this._plane=r.Plane.fromPointNormal(e,i)}t.defineProperties(i.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var u=new y;i.fromPoints=function(e,n){return new i(y.fromPoints(e,u).center,n)};var c=new o.Ray,d=new x.Cartesian3;i.prototype.projectPointOntoPlane=function(e,n){var t=c;t.origin=e,x.Cartesian3.normalize(e,t.direction);var i=o.IntersectionTests.rayPlane(t,this._plane,d);if(C.defined(i)||(x.Cartesian3.negate(t.direction,t.direction),i=o.IntersectionTests.rayPlane(t,this._plane,d)),C.defined(i)){var a=x.Cartesian3.subtract(i,this._origin,i),r=x.Cartesian3.dot(this._xAxis,a),s=x.Cartesian3.dot(this._yAxis,a);return C.defined(n)?(n.x=r,n.y=s,n):new x.Cartesian2(r,s)}},i.prototype.projectPointsOntoPlane=function(e,n){C.defined(n)||(n=[]);for(var t=0,i=e.length,a=0;a<i;a++){var r=this.projectPointOntoPlane(e[a],n[t]);C.defined(r)&&(n[t]=r,t++)}return n.length=t,n},i.prototype.projectPointToNearestOnPlane=function(e,n){C.defined(n)||(n=new x.Cartesian2);var t=c;t.origin=e,x.Cartesian3.clone(this._plane.normal,t.direction);var i=o.IntersectionTests.rayPlane(t,this._plane,d);C.defined(i)||(x.Cartesian3.negate(t.direction,t.direction),i=o.IntersectionTests.rayPlane(t,this._plane,d));var a=x.Cartesian3.subtract(i,this._origin,i),r=x.Cartesian3.dot(this._xAxis,a),s=x.Cartesian3.dot(this._yAxis,a);return n.x=r,n.y=s,n},i.prototype.projectPointsToNearestOnPlane=function(e,n){C.defined(n)||(n=[]);var t=e.length;n.length=t;for(var i=0;i<t;i++)n[i]=this.projectPointToNearestOnPlane(e[i],n[i]);return n};var f=new x.Cartesian3;i.prototype.projectPointOntoEllipsoid=function(e,n){C.defined(n)||(n=new x.Cartesian3);var t=this._ellipsoid,i=this._origin,a=this._xAxis,r=this._yAxis,s=f;return x.Cartesian3.multiplyByScalar(a,e.x,s),n=x.Cartesian3.add(i,s,n),x.Cartesian3.multiplyByScalar(r,e.y,s),x.Cartesian3.add(n,s,n),t.scaleToGeocentricSurface(n,n),n},i.prototype.projectPointsOntoEllipsoid=function(e,n){var t=e.length;C.defined(n)?n.length=t:n=new Array(t);for(var i=0;i<t;++i)n[i]=this.projectPointOntoEllipsoid(e[i],n[i]);return n},e.AxisAlignedBoundingBox=y,e.EllipsoidTangentPlane=i});
define(["exports","./defined-b9ff0e39","./Check-e6691f86","./defaultValue-199f5aa8","./Cartesian2-8fa798b8","./defineProperties-ae15c9d5","./Transforms-c1620692","./IntersectionTests-b2cf7157","./Plane-25b68fde"],function(e,C,n,a,x,t,s,o,r){"use strict";function y(e,n,t){this.minimum=x.Cartesian3.clone(a.defaultValue(e,x.Cartesian3.ZERO)),this.maximum=x.Cartesian3.clone(a.defaultValue(n,x.Cartesian3.ZERO)),t=C.defined(t)?x.Cartesian3.clone(t):x.Cartesian3.midpoint(this.minimum,this.maximum,new x.Cartesian3),this.center=t}y.fromPoints=function(e,n){if(C.defined(n)||(n=new y),!C.defined(e)||0===e.length)return n.minimum=x.Cartesian3.clone(x.Cartesian3.ZERO,n.minimum),n.maximum=x.Cartesian3.clone(x.Cartesian3.ZERO,n.maximum),n.center=x.Cartesian3.clone(x.Cartesian3.ZERO,n.center),n;for(var t=e[0].x,i=e[0].y,a=e[0].z,r=e[0].x,s=e[0].y,o=e[0].z,m=e.length,l=1;l<m;l++)var u=e[l],c=u.x,d=u.y,f=u.z,t=Math.min(c,t),r=Math.max(c,r),i=Math.min(d,i),s=Math.max(d,s),a=Math.min(f,a),o=Math.max(f,o);var h=n.minimum;h.x=t,h.y=i,h.z=a;var p=n.maximum;return p.x=r,p.y=s,p.z=o,n.center=x.Cartesian3.midpoint(h,p,n.center),n},y.clone=function(e,n){if(C.defined(e))return C.defined(n)?(n.minimum=x.Cartesian3.clone(e.minimum,n.minimum),n.maximum=x.Cartesian3.clone(e.maximum,n.maximum),n.center=x.Cartesian3.clone(e.center,n.center),n):new y(e.minimum,e.maximum,e.center)},y.equals=function(e,n){return e===n||C.defined(e)&&C.defined(n)&&x.Cartesian3.equals(e.center,n.center)&&x.Cartesian3.equals(e.minimum,n.minimum)&&x.Cartesian3.equals(e.maximum,n.maximum)};var m=new x.Cartesian3;y.intersectPlane=function(e,n){m=x.Cartesian3.subtract(e.maximum,e.minimum,m);var t=x.Cartesian3.multiplyByScalar(m,.5,m),i=n.normal,a=t.x*Math.abs(i.x)+t.y*Math.abs(i.y)+t.z*Math.abs(i.z),r=x.Cartesian3.dot(e.center,i)+n.distance;return 0<r-a?s.Intersect.INSIDE:r+a<0?s.Intersect.OUTSIDE:s.Intersect.INTERSECTING},y.prototype.clone=function(e){return y.clone(this,e)},y.prototype.intersectPlane=function(e){return y.intersectPlane(this,e)},y.prototype.equals=function(e){return y.equals(this,e)};var l=new s.Cartesian4;function i(e,n){e=(n=a.defaultValue(n,x.Ellipsoid.WGS84)).scaleToGeodeticSurface(e);var t=s.Transforms.eastNorthUpToFixedFrame(e,n);this._ellipsoid=n,this._origin=e,this._xAxis=x.Cartesian3.fromCartesian4(s.Matrix4.getColumn(t,0,l)),this._yAxis=x.Cartesian3.fromCartesian4(s.Matrix4.getColumn(t,1,l));var i=x.Cartesian3.fromCartesian4(s.Matrix4.getColumn(t,2,l));this._plane=r.Plane.fromPointNormal(e,i)}t.defineProperties(i.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},origin:{get:function(){return this._origin}},plane:{get:function(){return this._plane}},xAxis:{get:function(){return this._xAxis}},yAxis:{get:function(){return this._yAxis}},zAxis:{get:function(){return this._plane.normal}}});var u=new y;i.fromPoints=function(e,n){return new i(y.fromPoints(e,u).center,n)};var c=new o.Ray,d=new x.Cartesian3;i.prototype.projectPointOntoPlane=function(e,n){var t=c;t.origin=e,x.Cartesian3.normalize(e,t.direction);var i=o.IntersectionTests.rayPlane(t,this._plane,d);if(C.defined(i)||(x.Cartesian3.negate(t.direction,t.direction),i=o.IntersectionTests.rayPlane(t,this._plane,d)),C.defined(i)){var a=x.Cartesian3.subtract(i,this._origin,i),r=x.Cartesian3.dot(this._xAxis,a),s=x.Cartesian3.dot(this._yAxis,a);return C.defined(n)?(n.x=r,n.y=s,n):new x.Cartesian2(r,s)}},i.prototype.projectPointsOntoPlane=function(e,n){C.defined(n)||(n=[]);for(var t=0,i=e.length,a=0;a<i;a++){var r=this.projectPointOntoPlane(e[a],n[t]);C.defined(r)&&(n[t]=r,t++)}return n.length=t,n},i.prototype.projectPointToNearestOnPlane=function(e,n){C.defined(n)||(n=new x.Cartesian2);var t=c;t.origin=e,x.Cartesian3.clone(this._plane.normal,t.direction);var i=o.IntersectionTests.rayPlane(t,this._plane,d);C.defined(i)||(x.Cartesian3.negate(t.direction,t.direction),i=o.IntersectionTests.rayPlane(t,this._plane,d));var a=x.Cartesian3.subtract(i,this._origin,i),r=x.Cartesian3.dot(this._xAxis,a),s=x.Cartesian3.dot(this._yAxis,a);return n.x=r,n.y=s,n},i.prototype.projectPointsToNearestOnPlane=function(e,n){C.defined(n)||(n=[]);var t=e.length;n.length=t;for(var i=0;i<t;i++)n[i]=this.projectPointToNearestOnPlane(e[i],n[i]);return n};var f=new x.Cartesian3;i.prototype.projectPointOntoEllipsoid=function(e,n){C.defined(n)||(n=new x.Cartesian3);var t=this._ellipsoid,i=this._origin,a=this._xAxis,r=this._yAxis,s=f;return x.Cartesian3.multiplyByScalar(a,e.x,s),n=x.Cartesian3.add(i,s,n),x.Cartesian3.multiplyByScalar(r,e.y,s),x.Cartesian3.add(n,s,n),t.scaleToGeocentricSurface(n,n),n},i.prototype.projectPointsOntoEllipsoid=function(e,n){var t=e.length;C.defined(n)?n.length=t:n=new Array(t);for(var i=0;i<t;++i)n[i]=this.projectPointOntoEllipsoid(e[i],n[i]);return n},e.AxisAlignedBoundingBox=y,e.EllipsoidTangentPlane=i});
......@@ -22,4 +22,4 @@
* Portions licensed separately.
* See https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md for full licensing details.
*/
define(["./defined-b9ff0e39","./Check-e6691f86","./freezeObject-2d5b18ce","./defaultValue-199f5aa8","./Math-92bd3539","./Cartesian2-8fa798b8","./defineProperties-ae15c9d5","./Transforms-c1620692","./RuntimeError-d5522ee3","./WebGLConstants-554ddbe2","./ComponentDatatype-569c1e3e","./GeometryAttribute-429d5416","./when-c208a7cf","./GeometryAttributes-c3465b51","./AttributeCompression-4cb3e905","./GeometryPipeline-73b04848","./EncodedCartesian3-e4976669","./IndexDatatype-7119db15","./IntersectionTests-b2cf7157","./Plane-25b68fde","./PrimitivePipeline-09855ec0","./WebMercatorProjection-3d8e7edb","./createTaskProcessorWorker"],function(d,e,r,t,n,i,o,a,s,c,f,u,b,m,l,p,y,P,k,v,C,h,G){"use strict";var W={};function A(e){var r=W[e];return d.defined(r)||("object"==typeof exports?W[r]=r=require("Workers/"+e):require(["Workers/"+e],function(e){W[r=e]=e})),r}return G(function(e,r){for(var t=e.subTasks,n=t.length,i=new Array(n),o=0;o<n;o++){var a=t[o],s=a.geometry,c=a.moduleName;if(d.defined(c)){var f=A(c);i[o]=f(s,a.offset)}else i[o]=s}return b.when.all(i,function(e){return C.PrimitivePipeline.packCreateGeometryResults(e,r)})})});
define(["./defined-b9ff0e39","./Check-e6691f86","./freezeObject-2d5b18ce","./defaultValue-199f5aa8","./Math-92bd3539","./Cartesian2-8fa798b8","./defineProperties-ae15c9d5","./Transforms-c1620692","./RuntimeError-d5522ee3","./WebGLConstants-554ddbe2","./ComponentDatatype-569c1e3e","./GeometryAttribute-429d5416","./when-c208a7cf","./GeometryAttributes-c3465b51","./AttributeCompression-4cb3e905","./GeometryPipeline-73b04848","./EncodedCartesian3-e4976669","./IndexDatatype-7119db15","./IntersectionTests-b2cf7157","./Plane-25b68fde","./PrimitivePipeline-09855ec0","./WebMercatorProjection-3d8e7edb","./createTaskProcessorWorker"],function(d,e,r,t,n,i,o,a,s,c,f,u,b,m,l,p,y,P,k,C,v,h,G){"use strict";var W={};return G(function(e,r){for(var t=e.subTasks,n=t.length,i=new Array(n),o=0;o<n;o++){var a,s=t[o],c=s.geometry,f=s.moduleName;d.defined(f)?(a=function(e){var r=W[e];return d.defined(r)||("object"==typeof exports?W[r]=r=require("Workers/"+e):require(["Workers/"+e],function(e){W[r=e]=e})),r}(f),i[o]=a(c,s.offset)):i[o]=c}return b.when.all(i,function(e){return v.PrimitivePipeline.packCreateGeometryResults(e,r)})})});
......@@ -22,4 +22,4 @@
* Portions licensed separately.
* See https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md for full licensing details.
*/
define(["exports","./defined-b9ff0e39"],function(e,r){"use strict";var n=function(){try{return"x"in Object.defineProperty({},"x",{})}catch(e){return!1}}(),t=Object.defineProperties;n&&r.defined(t)||(t=function(e){return e});var i=t;e.defineProperties=i});
define(["exports","./defined-b9ff0e39"],function(e,n){"use strict";var r=function(){try{return"x"in Object.defineProperty({},"x",{})}catch(e){return!1}}(),t=Object.defineProperties;r&&n.defined(t)||(t=function(e){return e}),e.defineProperties=t});
......@@ -22,4 +22,4 @@
* Portions licensed separately.
* See https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md for full licensing details.
*/
define(["exports","./defined-b9ff0e39"],function(e,f){"use strict";var n=Object.freeze;f.defined(n)||(n=function(e){return e});var r=n;e.freezeObject=r});
define(["exports","./defined-b9ff0e39"],function(e,f){"use strict";var n=Object.freeze;f.defined(n)||(n=function(e){return e});e.freezeObject=n});
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment