Commit d4d8cd97 authored by 谢旭's avatar 谢旭

提交代码

parent a3bef9f9
No preview for this file type
......@@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:CefDemo"
StartupUri="View/MainWindow.xaml">
StartupUri="View/charwindow.xaml">
<Application.Resources>
</Application.Resources>
......
......@@ -65,7 +65,10 @@
<HintPath>..\packages\CefSharp.Wpf.81.3.100\CefSharp\x64\CefSharp.Wpf.dll</HintPath>
</Reference>
<Reference Include="DevExpress.Mvvm.v19.2, Version=19.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Xpf.Charts.v19.2, Version=19.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Xpf.Core.v19.2, Version=19.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Xpf.Grid.v19.2, Version=19.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Xpf.Grid.v19.2.Core, Version=19.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="Microsoft.Owin">
<HintPath>..\packages\Microsoft.Owin.3.0.0\lib\net45\Microsoft.Owin.dll</HintPath>
</Reference>
......@@ -143,17 +146,32 @@
<Compile Include="Controllers\ElecFenceController.cs" />
<Compile Include="Controllers\queryController.cs" />
<Compile Include="Extension\CalculateModel.cs" />
<Compile Include="Extension\CoordinateTransformation.cs" />
<Compile Include="Extension\DataModel.cs" />
<Compile Include="Extension\ExtensionMethod.cs" />
<Compile Include="Extension\SocketJson.cs" />
<Compile Include="Extension\SocketModel.cs" />
<Compile Include="ProcessSocketRequest.cs" />
<Compile Include="RemoteFileDownloadMiddleware.cs" />
<Compile Include="StaticFiles.cs" />
<Compile Include="StaticFilesMiddlewareExtension.cs" />
<Compile Include="ViewModel\ChartWindowViewModel.cs" />
<Compile Include="ViewModel\ConHardwareViewModel.cs" />
<Compile Include="ViewModel\HardwareStateViewModel.cs" />
<Compile Include="View\charwindow.xaml.cs">
<DependentUpon>charwindow.xaml</DependentUpon>
</Compile>
<Compile Include="View\ConHardware.xaml.cs">
<DependentUpon>ConHardware.xaml</DependentUpon>
</Compile>
<Page Include="View\charwindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\HardwareState.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
......@@ -163,6 +181,9 @@
<SubType>Code</SubType>
</Compile>
<Compile Include="Startup.cs" />
<Compile Include="View\HardwareState.xaml.cs">
<DependentUpon>HardwareState.xaml</DependentUpon>
</Compile>
<Compile Include="View\MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
......
......@@ -16,8 +16,17 @@ namespace CefDemo.Controllers
// GET api
public bool Get(string id)
{
if (id == "false")
{
CalculateModel.Model = null;
return true;
}
else
{
}
return false;
}
// POST api
public bool Post([FromBody] FenceModel model)
{
......
This diff is collapsed.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CefDemo.Extension
{
class CoordinateTransformation
{
public static double[] TranslateBLHToXYZ(double B, double L, double H, double a = 6378137, double b = 6356752.314245179)
{
double p = 180 / Math.PI;
B = B / p;
L = L / p;
double x = 0, y = 0, z = 0;
double ee = Math.Pow(Math.Sqrt(a * a - b * b) / a, 2);
double N = a / (Math.Sqrt(1 - (ee * Math.Sin(B) * Math.Sin(B))));
x = (N + H) * Math.Cos(B) * Math.Cos(L);
y = (N + H) * Math.Cos(B) * Math.Sin(L);
z = (N * (1 - ee) + H) * Math.Sin(B);
return new double[] { x, y, z };
}
public static double[] TranslateXYZToBLH(double X, double Y, double Z, double a = 6378137, double b = 6356752.314245179)
{
double ee = Math.Pow(Math.Sqrt(a * a - b * b) / a, 2);
double p = 180 / Math.PI;
double B, L, H;
L = Math.Atan(Y / X);
if (X < 0)
L += Math.PI;
double r = Math.Sqrt(X * X + Y * Y);
double B1 = Math.Atan(Z / r);
double B2;
while (true)
{
double W1 = Math.Sqrt(1 - ee * (Math.Sin(B1) * Math.Sin(B1)));
double N1 = a / W1;
B2 = Math.Atan((Z + N1 * ee * Math.Sin(B1)) / r);
if (Math.Abs(B2 - B1) <= 0.0000000001)
break;
B1 = B2;
}
B = B2;
double W = Math.Sqrt(1 - ee * (Math.Sin(B2) * Math.Sin(B2)));
double N = a / W;
H = r / Math.Cos(B2) - N;
return new double[] { B * p, L * p, H };
}
public static double[] TranslateValue(double longtitude,double latitude,double altitude)
{
string[] list = { longtitude.ToString(),latitude.ToString() };
double Longitude=0;
//// 经度
if (longtitude.ToString()!="" && longtitude.ToString().Length >= 5)
{
Longitude = Double.Parse(list.ElementAt(0).Substring(0,3));//度
Longitude += Double.Parse(list.ElementAt(0).Substring(3)) / 60; //分
}
//// 纬度
///
double Latitude=0;
if (latitude.ToString() != "" && latitude.ToString().Length >= 4)
{
Latitude = Double.Parse(list.ElementAt(1).Substring(0, 2)); //度
Latitude += Double.Parse(list.ElementAt(1).Substring(2)) / 60; //分
}
return new double[] { Longitude, Latitude ,altitude };
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CefDemo.Extension
{
class SocketJson
{
/// <summary>
/// 测试用json
/// </summary>
/// <param name="point"></param>
/// <returns></returns>
public static string getTestJson(Point point)
{
string distance = CalculateModel.GetWarningInfo(point);
string pointstate = CalculateModel.GetPointState(point);
string sendMessage = "" +
"{\"deviceType\":\"RTK\"" +
",\"SICVersion\":\"SIC_1.2\"" +
",\"alitude\":" + point.Z +
",\"latitude\":" + point.Y +
",\"interactive\":\"02\"" +
",\"terminalType\":\"指南者3\"" +
",\"gnss\":\"21\"" +
",\"producer\":\"广州南方卫星导航仪器有限公司\"" +
",\"deviceModel\":\"Galaxy-6\"" +
",\"TN\":\"SG609AE41000059\"" +
",\"SN\":\"SG609AE41000059\"" +
",\"sendtime\":\"20200630153620\"" +
",\"deviceBrand\":\"SOUTH\"" +
",\"receivetime\":\"20200630153620\"" +
",\"longitude\":" + point.X + //
",\"WarningInfo\":" + "\"" + distance + "\"" +
",\"Pointstate\":" + "\"" + pointstate + "\"" +
"}";
return sendMessage;
}
/// <summary>
/// 当收到socket数据是无效数据时
/// </summary>
/// <returns></returns>
public static string getUnvalidJson()
{
return "" +
"{\"deviceType\":\"RTK\"" +
",\"SICVersion\":\"SIC_1.2\"" +
",\"alitude\":\"0.0\"" +
",\"latitude\":\"0.0\"" +
",\"interactive\":\"02\"" +
",\"terminalType\":\"指南者3\"" +
",\"gnss\":\"21\"" +
",\"producer\":\"广州南方卫星导航仪器有限公司\"" +
",\"deviceModel\":\"Galaxy-6\"" +
",\"TN\":\"SG609AE41000059\"" +
",\"SN\":\"SG609AE41000059\"" +
",\"sendtime\":\"20200630153620\"" +
",\"deviceBrand\":\"SOUTH\"" +
",\"receivetime\":\"20200630153620\"" +
",\"longitude\":\"0.0\"" +
",\"WarningInfo\":\"0.0\"" +
",\"Pointstate\":\"0.0\"" +
"}"; ;
}
public static string getGnssState(string num)
{
string state = "";
// , 2, 3, 4, 5, 7,, 8, 9
if (num == "0")
{
//
state = "初始化";
}
else if (num == "1")
{
state = "单点定位";
}
else if (num == "2")
{
state = "码差分";
}
else if (num == "3")
{
state = "无效PPS";
}
else if (num == "4")
{
state = "固定解";
}
else if (num == "5")
{
state = "浮点解";
}
else if (num == "6")
{
state = "正在估算";
}
else if (num == "7")
{
state = "人工输入固定值";
}
else if (num == "8")
{
state = "模拟模式";
}
else if (num == "9")
{
state = "WAAS差分";
}
return state;
}
/// <summary>
/// 获取指南者数据,发送给三维前端
/// </summary>
/// <param name="ggastr_array"></param>
/// <returns></returns>
public static string getSocketJson(string[] ggastr_array)
{
double[] location = CoordinateTransformation.TranslateValue(
Double.Parse(ggastr_array.ElementAt(4).ToString()),
Double.Parse(ggastr_array.ElementAt(2).ToString()),
Double.Parse(ggastr_array.ElementAt(9).ToString())
);
string longitude = location.ElementAt(0).ToString();
string latitude = location.ElementAt(1).ToString();
var aa = location.ElementAt(2) + Double.Parse(ggastr_array.ElementAt(11).ToString());
string alitude = aa.ToString(); // "39.649";
string gnss = getGnssState( ggastr_array.ElementAt(6).ToString());
Point point = new Point(Convert.ToSingle(longitude),
Convert.ToSingle(latitude),
Convert.ToSingle(alitude)
);
string distance = CalculateModel.GetWarningInfo(point);
string pointstate = CalculateModel.GetPointState(point);
string time = System.DateTime.Now.ToString().Replace('/', '0')
.Replace(':', '0').Trim();
var jsonStr = "" +
"{\"deviceType\":\"RTK\"" +
",\"SICVersion\":\"SIC_1.2\"" +
",\"alitude\":" + alitude +
",\"latitude\":" + latitude +
",\"interactive\":\"02\"" +
",\"terminalType\":\"指南者3\"" +
",\"gnss\":"+ "\""+ gnss+ "\""+
",\"producer\":\"广州南方卫星导航仪器有限公司\"" +
",\"deviceModel\":\"Galaxy-6\"" +
",\"TN\":\"SG609AE41000059\"" +
",\"SN\":\"SG609AE41000059\"" +
",\"sendtime\":" + "\"" + time + "\"" +
",\"deviceBrand\":\"SOUTH\"" +
",\"receivetime\":" + "\"" + time + "\"" +
",\"longitude\":" + longitude + //
",\"WarningInfo\":" + "\"" + distance + "\"" +
",\"Pointstate\":" + "\"" + pointstate + "\"" +
"}";
return jsonStr;
}
}
}
......@@ -10,6 +10,11 @@ namespace CefDemo.Extension
{
class SocketModel
{
public static string TempJson="";
public static Socket socketwatch;
public static Socket client;
public static bool StartListening(string ip,string port)
......@@ -47,7 +52,7 @@ namespace CefDemo.Extension
{
return Task.Run<string>(() => {
string jsonStr = "11111111111";
string jsonStr = "";
if (client != null)
{
Socket Conntection = client as Socket;
......@@ -66,8 +71,6 @@ namespace CefDemo.Extension
bool tag = true;
Dictionary<string, string> locationStr = new Dictionary<string, string>();
while (tag)
{
//没有新连接进来的前,当前线程被阻塞的
int length = Conntection.Receive(arrServerRecMsg);
......@@ -77,7 +80,7 @@ namespace CefDemo.Extension
if (strSRecMsg == "") //没有收到信息
{
return TempJson;
}
else
{
......@@ -85,91 +88,38 @@ namespace CefDemo.Extension
for (int i = 0; i < protocalStr.Count(); ++i)
{
if (protocalStr.Count() == 2)
{ break; }
if (protocalStr.ElementAt(i).Contains("GNRMC") && !locationStr.Keys.Contains("GNRMC"))
{
locationStr.Add("GNRMC", protocalStr.ElementAt(i).ToString());
}
else if (protocalStr.ElementAt(i).Contains("GNGGA") && !locationStr.Keys.Contains("GNGGA"))
if (protocalStr.ElementAt(i).Contains("GNGGA") )
{
locationStr.Add("GNGGA", protocalStr.ElementAt(i).ToString());
break;
}
if (locationStr.Count == 2)
{
var mcstr = locationStr.Find("GNRMC").Value.Substring(6, 9);
var ggsstr = locationStr.Find("GNGGA").Value.Substring(6, 9);
if (Convert.ToSingle(mcstr) < Convert.ToSingle(ggsstr))
{
locationStr.Remove("GNRMC");
}
else if (Convert.ToSingle(mcstr) > Convert.ToSingle(ggsstr))
{
locationStr.Remove("GNGGA");
}
}
}
if (locationStr.Count() == 2)
if (locationStr.Count() == 0)
{
tag = false;
return TempJson;
}
var ggastr_array = locationStr.Find("GNGGA").Value.ToString().Split(',');
//经纬度没有值的时候
if (ggastr_array.ElementAt(4).ToString()==""|| ggastr_array.ElementAt(2).ToString()==""|| ggastr_array.ElementAt(9).ToString()=="")
{
if (TempJson != "")
{
return TempJson;
}
else return SocketJson.getUnvalidJson();
}
var mcsrt_array = locationStr.Find("GNRMC").Value.ToString().Split(',');
var ggastr_array = locationStr.Find("GNGGA").Value.ToString().Split(',');
#region
//var jsonobj = new {
// deviceType = "RTK",
// SICVersion = "SIC_1.2",
// alitude = ,
// latitude = ,
// interactive = "02",
// terminalType = "指南者3",
// gnss = ggastr_array.ElementAt(7).ToString(),
// producer = "广州南方卫星导航仪器有限公司",
// deviceModel = "Galaxy-6",
// TN = "SG609AE41000059",
// SN = "SG609AE41000059",
// sendtime = System.DateTime.Now.ToString(),
// deviceBrand = "SOUTH",
// receivetime = System.DateTime.Now.ToString(),
// longitude =
//};
//jsonStr = JsonConvert.SerializeObject(jsonobj);
#endregion
jsonStr = "{" +
"\"deviceType\":\"RTK\"" +
",\"SICVersion\":\"SIC_1.2\"" +
",\"alitude\":" + ggastr_array.ElementAt(9).ToString() +
",\"latitude\":" + Convert.ToString(Convert.ToSingle(ggastr_array.ElementAt(2).ToString()) / 100) +
",\"interactive\":\"02\"" +
",\"terminalType\":\"指南者3\"" +
",\"gnss\":" + ggastr_array.ElementAt(7).ToString() +
",\"producer\":\"广州南方卫星导航仪器有限公司\"" +
",\"deviceModel\":\"Galaxy-6\"" +
",\"TN\":\"SG609AE41000059\"" +
",\"SN\":\"SG609AE41000059\"" +
",\"sendtime\":" + System.DateTime.Now.ToString().Replace('/', '0').Replace(':', '0').Trim() +
",\"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())
)) +
"}";
jsonStr = SocketJson.getSocketJson(ggastr_array);
TempJson = jsonStr;
return jsonStr;
}
else
......@@ -185,6 +135,20 @@ namespace CefDemo.Extension
}
public static Task<string> test()
{
return Task.Run<string>(()=>{
if (client != null)
{
return "222";
}
return "111";
});
}
public static bool SendCmd(string cmd)
{
byte[] arrServerRecMsg = new byte[1024 * 10];
......
......@@ -52,6 +52,7 @@ namespace CefDemo
if (requestType == "/getPosition/")
{
accept(null, WebSocketEcho);
// accept(null, ZNZ3PositionEcho);
}
else if (requestType == "/getZNZ3Position")
{
......@@ -60,6 +61,7 @@ namespace CefDemo
else
{
accept(null, WebSocketEcho);
// accept(null, ZNZ3PositionEcho);
}
......@@ -81,7 +83,17 @@ namespace CefDemo
object status;
while (!websocketContext.TryGetValue("websocket.ClientCloseStatus", out status) || (int)status == 0)
{
string messageStr = await SocketModel.getZNZ3Position();
string messageStr = "";
try
{
messageStr = await SocketModel.getZNZ3Position();
//messageStr = await SocketModel.test();
}
catch
{
messageStr = "硬件数据获取失败!";
}
if (messageStr != "")
{
......@@ -107,65 +119,106 @@ namespace CefDemo
byte[] buffer = new byte[1024*1024];
Dictionary<string, string> location = new Dictionary<string, string>();
location.Add("28.227208","113.083900");
location.Add("28.227282","113.083851");
location.Add("28.227336","113.083773");
location.Add("28.227449","113.083710");
location.Add("28.227587","113.083591");
location.Add("28.227591","113.083856");
location.Add("28.227544","113.084038");
location.Add("28.227445","113.084131");
location.Add("28.227322","113.084340");
location.Add("28.227256","113.084118");
location.Add("28.227139","113.083997");
location.Add("28.226966","113.083947");
location.Add("28.226908","113.083872");
location.Add("28.227081","113.083755");
location.Add("28.227098","113.083805");
location.Add("28.227174","113.083842");
location.Add("28.227448", "113.083787");
location.Add("28.227446", "113.083787");
location.Add("28.227444", "113.083787");
location.Add("28.227442", "113.083787");
location.Add("28.227441", "113.083787");
location.Add("28.227439", "113.083787");
location.Add("28.227437", "113.083787");
location.Add("28.227436", "113.083787");
location.Add("28.227434", "113.083787");
location.Add("28.227433", "113.083787");
location.Add("28.227430", "113.083787");
location.Add("28.227427", "113.083786");
location.Add("28.227421", "113.083786");
location.Add("28.227420", "113.083786");
location.Add("28.227414", "113.083786");
location.Add("28.227412", "113.083786");
location.Add("28.227410", "113.083786");
location.Add("28.227408", "113.083786");
location.Add("28.227406", "113.083787");
location.Add("28.227405", "113.083787");
location.Add("28.227403", "113.083787");
location.Add("28.227401", "113.083787");
location.Add("28.227399", "113.083787");
location.Add("28.227396", "113.083787");
location.Add("28.227393", "113.083788");
location.Add("28.227387", "113.083790");
object status;
long i = 0;
//while (!websocketContext.TryGetValue("websocket.ClientCloseStatus", out status) || (int)status == 0)
//{
// string longitude = location.ElementAt(Convert.ToInt32(i++ % 52)).Value.ToString();
// string latitude = location.ElementAt(Convert.ToInt32(i++ % 52)).Key.ToString();
// string alitude = "64.53";
// Point point = new Point(Convert.ToSingle(longitude),
// Convert.ToSingle(latitude),
// Convert.ToSingle(alitude)
// );
// string socketjson = SocketJson.getTestJson(point);
// if (i==10000)
// {
// i = 0;
// }
// buffer = Encoding.UTF8.GetBytes(socketjson);
// await sendAsync(new ArraySegment<byte>(buffer, 0, buffer.Count()), 1, true, callCancelled);
// await Task.Delay(5000);
//}
bool tag = true;
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";
if (tag)
{
long currentnum = i;
string longitude = location.ElementAt(Convert.ToInt32(i % 26)).Value.ToString();
string latitude = location.ElementAt(Convert.ToInt32(i++ % 26)).Key.ToString();
string alitude = "64.53";
Point point = new Point(Convert.ToSingle(longitude),
Convert.ToSingle(latitude),
Convert.ToSingle(alitude)
);
string distance = CalculateModel.GetWarningInfo(point);
string pointstate = CalculateModel.GetPointState(point);
string sendMessage = "" +
"{\"deviceType\":\"RTK\"" +
",\"SICVersion\":\"SIC_1.2\"" +
",\"alitude\":" + alitude +
",\"latitude\":" + latitude +
",\"interactive\":\"02\"" +
",\"terminalType\":\"指南者3\"" +
",\"gnss\":\"21\"" +
",\"producer\":\"广州南方卫星导航仪器有限公司\"" +
",\"deviceModel\":\"Galaxy-6\"" +
",\"TN\":\"SG609AE41000059\"" +
",\"SN\":\"SG609AE41000059\"" +
",\"sendtime\":\"20200630153620\"" +
",\"deviceBrand\":\"SOUTH\"" +
",\"receivetime\":\"20200630153620\"" +
",\"longitude\":" + longitude + //
",\"WarningInfo\":" +"\""+ distance + "\"" +
",\"Pointstate\":" + "\"" + pointstate + "\"" +
"}";
if (i==10000000)
{
i = 0;
}
buffer = Encoding.UTF8.GetBytes(sendMessage);
string socketjson = SocketJson.getTestJson(point);
if (i == 25)
{
tag = false;
}
buffer = Encoding.UTF8.GetBytes(socketjson);
await sendAsync(new ArraySegment<byte>(buffer, 0, buffer.Count()), 1, true, callCancelled);
await Task.Delay(5000);
await Task.Delay(2000);
}
else
{
long currentnum = i;
string longitude = location.ElementAt(Convert.ToInt32(i % 26)).Value.ToString();
string latitude = location.ElementAt(Convert.ToInt32(i-- % 26)).Key.ToString();
string alitude = "64.53";
Point point = new Point(Convert.ToSingle(longitude),
Convert.ToSingle(latitude),
Convert.ToSingle(alitude)
);
string socketjson = SocketJson.getTestJson(point);
if (i == 0)
{
tag = true;
}
buffer = Encoding.UTF8.GetBytes(socketjson);
await sendAsync(new ArraySegment<byte>(buffer, 0, buffer.Count()), 1, true, callCancelled);
await Task.Delay(2000);
}
}
......
<dx:ThemedWindow
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" x:Class="CefDemo.View.HardwareState"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:local="clr-namespace:CefDemo.View"
mc:Ignorable="d"
WindowStartupLocation="CenterScreen"
Title="硬件连接状态" Height="400" Width="800">
<dx:ThemedWindow.Resources>
<Style TargetType="GroupBox"
x:Key="GroupBoxStyle">
<Setter Property="Margin"
Value="4,2,4,2" />
</Style>
<Style TargetType="RadioButton"
x:Key="RadioStyle">
<Setter Property="Margin"
Value="31,7,8,7" />
<Setter Property="VerticalAlignment"
Value="Center" />
<Setter Property="HorizontalAlignment"
Value="Center" />
<Setter Property="Height"
Value="22" />
<Setter Property="Width"
Value="102" />
</Style>
<Style TargetType="TextBlock"
x:Key="TextBlockStyle">
<Setter Property="VerticalAlignment"
Value="Center" />
<Setter Property="Height"
Value="16" />
<Setter Property="Margin"
Value="0,10" />
</Style>
<Style TargetType="Button"
x:Key="ButtonStyle">
<Setter Property="VerticalAlignment"
Value="Center" />
<Setter Property="HorizontalAlignment"
Value="Stretch" />
<Setter Property="Width"
Value="90" />
<Setter Property="Height"
Value="23" />
</Style>
<Style TargetType="TextBox"
x:Key="TextBoxStyle">
<Setter Property="VerticalAlignment"
Value="Center" />
<Setter Property="HorizontalAlignment"
Value="Stretch" />
</Style>
</dx:ThemedWindow.Resources>
<Grid>
<GroupBox Header="设备连接列表" Style="{StaticResource GroupBoxStyle}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.3*"></RowDefinition>
<RowDefinition Height="8.7*"></RowDefinition>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
</Grid>
<Grid Grid.Row="1">
<dxg:GridControl Name="AttributeGridControl"
DockPanel.Dock="Right"
BorderThickness="0,1,1,1"
ShowBorder="True"
Width="auto"
AutoGenerateColumns="None"
SelectionMode="Row"
ItemsSourceChanged="GridControl_ItemsSourceChanged"
ItemsSource="{Binding DeviceSource,Mode=TwoWay}" >
<dxg:GridColumn Header="设备类型"
HorizontalHeaderContentAlignment="Center"
ReadOnly="True"
Binding="{Binding DeviceName ,Mode=TwoWay}"/>
<dxg:GridColumn Header="连接状态"
HorizontalHeaderContentAlignment="Center"
Binding="{Binding State ,Mode=TwoWay}" />
<dxg:GridControl.View>
<dxg:TableView ShowGroupPanel="False"
AllowSorting="True"
CellValueChanged="TableView_CellValueChanged"
Name="AttributeTable"
AutoWidth="True"
IsColumnMenuEnabled="False"
ColumnFilterPopupMode="Excel" />
</dxg:GridControl.View>
<!--<dxg:GridControl.LayoutTransform>
<TransformGroup>
<RotateTransform Angle="-90"/>
<ScaleTransform ScaleX="1" ScaleY="-1"/>
</TransformGroup>
</dxg:GridControl.LayoutTransform>-->
</dxg:GridControl>
</Grid>
</Grid>
</GroupBox>
</Grid>
</dx:ThemedWindow>
using DevExpress.Xpf.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace CefDemo.View
{
/// <summary>
/// HardwareState.xaml 的交互逻辑
/// </summary>
public partial class HardwareState : ThemedWindow
{
public HardwareState()
{
InitializeComponent();
this.DataContext =new ViewModel.HardwareStateViewModel();
}
private void GridControl_ItemsSourceChanged(object sender, DevExpress.Xpf.Grid.ItemsSourceChangedEventArgs e)
{
}
private void TableView_CellValueChanged(object sender, DevExpress.Xpf.Grid.CellValueChangedEventArgs e)
{
}
}
}
......@@ -25,7 +25,7 @@
<MenuItem Header="设备">
<!--菜单项为MenuItem,文字使用属性 Header-->
<MenuItem Name="ConntectHardware" Header="硬件连接" Click="ConntectHardware_Click"></MenuItem>
<MenuItem Header="查看连接状态"></MenuItem>
<MenuItem Header="查看连接状态" Click="MenuItem_Click"></MenuItem>
</MenuItem>
<MenuItem Header="检索"></MenuItem>
......
......@@ -48,5 +48,11 @@ namespace CefDemo
connecthardware.ShowDialog();
}
private void MenuItem_Click(object sender, RoutedEventArgs e)
{
View.HardwareState hardwarestate = new View.HardwareState();
hardwarestate.ShowDialog();
}
}
}
<dx:ThemedWindow
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" x:Class="CefDemo.View.charwindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:CefDemo.View"
xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts"
mc:Ignorable="d"
WindowStartupLocation="CenterScreen"
Title="charwindow" Height="450" Width="800">
<Grid>
<dxc:ChartControl
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Margin="8,8,16,16"
DataSource="{Binding ElementName=grid, Path=SelectedItems}">
<dxc:ChartControl.Titles>
<dxc:Title HorizontalAlignment="Center">Monthly Revenue</dxc:Title>
</dxc:ChartControl.Titles>
<dxc:XYDiagram2D SeriesDataMember="Category">
<dxc:XYDiagram2D.SeriesTemplate>
<dxc:LineSeries2D ArgumentDataMember="ReportDate" ValueDataMember="Revenue" />
</dxc:XYDiagram2D.SeriesTemplate>
<dxc:XYDiagram2D.AxisX>
<dxc:AxisX2D>
<dxc:AxisX2D.DateTimeScaleOptions>
<dxc:AutomaticDateTimeScaleOptions AggregateFunction="Sum" />
</dxc:AxisX2D.DateTimeScaleOptions>
</dxc:AxisX2D>
</dxc:XYDiagram2D.AxisX>
<dxc:XYDiagram2D.AxisY>
<dxc:AxisY2D>
<dxc:AxisY2D.Label>
<dxc:AxisLabel TextPattern="${V:#,##0,,}M" />
</dxc:AxisY2D.Label>
</dxc:AxisY2D>
</dxc:XYDiagram2D.AxisY>
</dxc:XYDiagram2D>
<dxc:ChartControl.Legends>
<dxc:Legend HorizontalPosition="Center" VerticalPosition="BottomOutside" Orientation="Horizontal" />
</dxc:ChartControl.Legends>
</dxc:ChartControl>
</Grid>
</dx:ThemedWindow>
using DevExpress.Xpf.Core;
using DevExpress.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace CefDemo.View
{
/// <summary>
/// charwindow.xaml 的交互逻辑
/// </summary>
public partial class charwindow :ThemedWindow
{
public charwindow()
{
InitializeComponent();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CefDemo.ViewModel
{
class ChartWindowViewModel
{
public ChartWindowViewModel()
{
}
}
}
......@@ -87,12 +87,30 @@ namespace CefDemo.ViewModel
isTypeVisable = "Visible";
}
var jsonstr= await SocketModel.getZNZ3Position();
try
{
var jsonstr = await SocketModel.getZNZ3Position();
if (jsonstr != "")
{
string[] objlist = jsonstr.ToString().Split(',');
string[] typelist = objlist.ElementAt(5).ToString().Split(':');
string[] factorylist = objlist.ElementAt(7).ToString().Split(':');
DeviceType = typelist.ElementAt(1).Substring(1, typelist.ElementAt(1).ToString().Length-2);
DeviceType = typelist.ElementAt(1).Substring(1, typelist.ElementAt(1).ToString().Length - 2);
ProFactory = factorylist.ElementAt(1).Substring(1, factorylist.ElementAt(1).ToString().Length - 2);
}
else
{
DeviceType = "连接成功,数据异常!";
ProFactory = "连接成功,数据异常!";
}
}
catch
{
DeviceType = "连接成功,数据异常!";
ProFactory = "连接成功,数据异常!";
}
}
......
using DevExpress.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CefDemo.ViewModel
{
class Device
{
public Device(string name ,string state)
{
DeviceName = name;
State = state;
}
public string DeviceName;
public string State;
}
class HardwareStateViewModel :ViewModelBase
{
//private List<Device> devicesource;
//public List<Device> DeviceSource
//{
// get => devicesource;
// set { SetProperty(ref devicesource, value, nameof(DeviceSource), () => RaisePropertiesChanged((DeviceSource)));
//}
public HardwareStateViewModel()
{
//DeviceSource = new List<Device>();
//DeviceSource.Add(new Device("111", "111"));
//DeviceSource.Add(new Device("222", "222"));
}
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<doc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<assembly>
<name>DevExpress.Xpf.Layout.v19.2.Core</name>
</assembly>
<members>
<member name="N:DevExpress.Xpf.Layout.Core">
<summary>
<para>Contains classes that implement the basic functionality of the DXDocking for WPF suite.</para>
</summary>
</member>
<member name="T:DevExpress.Xpf.Layout.Core.DockType">
<summary>
<para>Contains values that specify how a panel can be docked to another panel.</para>
</summary>
</member>
<member name="F:DevExpress.Xpf.Layout.Core.DockType.Bottom">
<summary>
<para>A panel is docked at the bottom of another panel.</para>
</summary>
</member>
<member name="F:DevExpress.Xpf.Layout.Core.DockType.Fill">
<summary>
<para>A panel is docked to another panel, forming a tabbed group.</para>
</summary>
</member>
<member name="F:DevExpress.Xpf.Layout.Core.DockType.Left">
<summary>
<para>A panel is docked at the left side of another panel.</para>
</summary>
</member>
<member name="F:DevExpress.Xpf.Layout.Core.DockType.None">
<summary>
<para>A panel will not be docked.</para>
</summary>
</member>
<member name="F:DevExpress.Xpf.Layout.Core.DockType.Right">
<summary>
<para>A panel is docked at the right side of another panel.</para>
</summary>
</member>
<member name="F:DevExpress.Xpf.Layout.Core.DockType.Top">
<summary>
<para>A panel is docked at the top of another panel.</para>
</summary>
</member>
<member name="T:DevExpress.Xpf.Layout.Core.MoveType">
<summary>
<para>Provides members that specify the position of an element related to other UI elements.</para>
</summary>
</member>
<member name="F:DevExpress.Xpf.Layout.Core.MoveType.Bottom">
<summary>
<para>Moves an item below another item.</para>
</summary>
</member>
<member name="F:DevExpress.Xpf.Layout.Core.MoveType.InsideGroup">
<summary>
<para>Moves an item inside another container item.</para>
</summary>
</member>
<member name="F:DevExpress.Xpf.Layout.Core.MoveType.Left">
<summary>
<para>Moves an item to the left of another item.</para>
</summary>
</member>
<member name="F:DevExpress.Xpf.Layout.Core.MoveType.None">
<summary>
<para>Prevents an item from being moved.</para>
</summary>
</member>
<member name="F:DevExpress.Xpf.Layout.Core.MoveType.Right">
<summary>
<para>Moves an item to the right of another item.</para>
</summary>
</member>
<member name="F:DevExpress.Xpf.Layout.Core.MoveType.Top">
<summary>
<para>Moves an item above another item.</para>
</summary>
</member>
<member name="T:DevExpress.Xpf.Layout.Core.SelectionMode">
<summary>
<para>Specifies the single/multiple element selection option (when in Customization Mode.)</para>
</summary>
</member>
<member name="F:DevExpress.Xpf.Layout.Core.SelectionMode.ItemRange">
<summary>
<para>Selects in Customization Mode all items in the range between the last selected item and an item specified as a parameter in the DockLayoutManager.SelectItem method.</para>
</summary>
</member>
<member name="F:DevExpress.Xpf.Layout.Core.SelectionMode.MultipleItems">
<summary>
<para>Selects in Customization Mode multiple items specified via all the DockLayoutManager.SelectItem methods called.</para>
</summary>
</member>
<member name="F:DevExpress.Xpf.Layout.Core.SelectionMode.SingleItem">
<summary>
<para>Selects in Customization Mode the only item specified via the DockLayoutManager.SelectItem method. If multiple DockLayoutManager.SelectItem methods were called, the last one&#39;s item will be selected.</para>
</summary>
</member>
<member name="T:DevExpress.Xpf.Layout.Core.TabHeaderLayoutType">
<summary>
<para>Contains values that specify how tabs within a tabbed group are arranged.</para>
</summary>
</member>
<member name="F:DevExpress.Xpf.Layout.Core.TabHeaderLayoutType.Default">
<summary>
<para>The same as the <see cref="F:DevExpress.Xpf.Layout.Core.TabHeaderLayoutType.Scroll"/> option.</para>
</summary>
</member>
<member name="F:DevExpress.Xpf.Layout.Core.TabHeaderLayoutType.MultiLine">
<summary>
<para>Tab headers are displayed in multiple rows.</para>
</summary>
</member>
<member name="F:DevExpress.Xpf.Layout.Core.TabHeaderLayoutType.Scroll">
<summary>
<para>Tab headers are displayed in a single row. Scroll buttons are enabled to scroll through the tabs, if necessary.</para>
</summary>
</member>
<member name="F:DevExpress.Xpf.Layout.Core.TabHeaderLayoutType.Trim">
<summary>
<para>Tab headers are displayed in a single row. Tab header text is trimmed, if required, to fit all the tabs in the row.</para>
</summary>
</member>
</members>
</doc>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
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("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
(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=t("eAIX"),c=t("m9Am"),a=[{name:"\u7535\u5b50\u56f4\u680f",component:r.a,icon:"icon-weilan"},{name:"\u5750\u6807\u62fe\u53d6",component:c.a,icon:"icon-tubiao-"}],s=function(){function n(n){this.resolver=n,this.functions=a}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}(),p=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 b(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 m(n){return o.Nb(0,[(n()(),o.lb(0,null,null,0))],null,null)}function f(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,b)),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,m))],(function(n,l){n(l,3,0,l.component.functions)}),null)}var C=t("wFCa"),g=t("elQI"),d=function(){function n(n){this.viewerService=n}return n.prototype.ngOnInit=function(){this.viewerService.initViewer("cesiumContainer"),this.viewer=this.viewerService.getViewer(),this.viewerService.getModelLayer(g.a)},n}(),h=o.sb({encapsulation:0,styles:[[".cesiumContainer[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;background-color:#000;overflow:hidden}"]],data:{}});function v(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,f,p)),o.tb(2,180224,null,0,s,[o.j],null,null)],null,null)}var w=function(){function n(){}return n.prototype.ngOnInit=function(){},n.prototype.ngOnDestroy=function(){},n}(),x=o.sb({encapsulation:0,styles:[[""]],data:{}});function O(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,v,h)),o.tb(2,114688,null,0,d,[C.a],null,null)],(function(n,l){n(l,2,0)}),null)}function y(n){return o.Nb(0,[(n()(),o.ub(0,0,null,null,1,"app-main",[],null,null,null,O,x)),o.tb(1,245760,null,0,w,[],null,null)],(function(n,l){n(l,1,0)}),null)}var M=o.qb("app-main",w,y,{},{},[]),N=t("gIcY"),P=t("ZYCi"),_=function(){return function(){}}();t.d(l,"MainModuleNgFactory",(function(){return k}));var k=o.rb(e,[],(function(n){return o.Bb([o.Cb(512,o.j,o.gb,[[8,[u.a,M]],[3,o.j],o.A]),o.Cb(4608,i.m,i.l,[o.w,[2,i.C]]),o.Cb(4608,N.u,N.u,[]),o.Cb(1073742336,i.c,i.c,[]),o.Cb(1073742336,N.s,N.s,[]),o.Cb(1073742336,N.i,N.i,[]),o.Cb(1073742336,P.q,P.q,[[2,P.w],[2,P.p]]),o.Cb(1073742336,_,_,[]),o.Cb(1073742336,e,e,[]),o.Cb(1024,P.n,(function(){return[[{path:"",component:w,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){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});
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});
......@@ -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,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});
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});
......@@ -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){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});
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});
......@@ -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),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});
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});
......@@ -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=(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});
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});
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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