本文整理汇总了C#中Vector3d.AngleInDegrees方法的典型用法代码示例。如果您正苦于以下问题:C# Vector3d.AngleInDegrees方法的具体用法?C# Vector3d.AngleInDegrees怎么用?C# Vector3d.AngleInDegrees使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vector3d
的用法示例。
在下文中一共展示了Vector3d.AngleInDegrees方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadFromSettings
void LoadFromSettings()
{
loading = true;
Settings settings = Settings.Get<Settings>();
if(settings!=null)
{
this.Enabled=true;
Vector3d cam = new Vector3d(settings.Read(Settings.CAMERA, Settings.X, 0f), settings.Read(Settings.CAMERA, Settings.Y, 50f), settings.Read(Settings.CAMERA, Settings.Z, 220f));
SetNumericUpDownValue(this.CameraZ,(decimal)cam.Z);
SetNumericUpDownValue(this.CameraY,(decimal)cam.Y);
ILaserProxy laser = Settings.Get<ILaserProxy>();
if (laser != null)
{
int currentLaser = this.LaserComboBox.Items.Count == 0 ? -1 : this.LaserComboBox.SelectedIndex;
int lasercount = laser.Count;
this.LaserComboBox.Items.Clear();
for (int i = 0; i < lasercount; i++)
{
this.LaserComboBox.Items.Add(String.Format("Laser {0}", i));
}
currentLaser = Math.Max(0, currentLaser);
this.LaserComboBox.SelectedIndex = currentLaser;
Vector3d laserLoc = new Vector3d(
settings.Read(Settings.LASER(currentLaser), Settings.X, 50f),
settings.Read(Settings.LASER(currentLaser), Settings.Y, (double)this.CameraY.Value),
settings.Read(Settings.LASER(currentLaser), Settings.Z, (double)this.CameraZ.Value)
);
double angle = laserLoc.AngleInDegrees(cam);
if(cam.X < laserLoc.X)
angle = -angle;
SetNumericUpDownValue(this.LaserX,(decimal)laserLoc.X);
this.LaserYLabel.Text = string.Format("{0:.0}",laserLoc.Y);
SetNumericUpDownValue(this.LaserZ,(decimal)laserLoc.Z);
SetNumericUpDownValue(this.LaserAngle,(decimal) angle);
}
}
else
this.Enabled=false;
loading = false;
}