Commit 727d5eee by liulongfei

1. 3D鼠标添加是否启用平滑设置

parent 4bdac1b6
...@@ -37,6 +37,11 @@ namespace VIZ.Framework.Core ...@@ -37,6 +37,11 @@ namespace VIZ.Framework.Core
public double MaxX { get; set; } = 3; public double MaxX { get; set; } = 3;
/// <summary> /// <summary>
/// 是否使用平滑
/// </summary>
public bool IsUseSmooth { get; set; } = true;
/// <summary>
/// 平滑处理器 /// 平滑处理器
/// </summary> /// </summary>
private Navigation3DSmooth Smooth = new Navigation3DSmooth(); private Navigation3DSmooth Smooth = new Navigation3DSmooth();
...@@ -46,7 +51,12 @@ namespace VIZ.Framework.Core ...@@ -46,7 +51,12 @@ namespace VIZ.Framework.Core
/// </summary> /// </summary>
public void UpdateSmooth() public void UpdateSmooth()
{ {
double x = this.Smooth.Call(-this.Camera.Position.X); double x = -this.Camera.Position.X;
if (this.IsUseSmooth)
{
x = this.Smooth.Call(-this.Camera.Position.X);
}
x = MathHelper.Clip(-this.MaxX, this.MaxX, x); x = MathHelper.Clip(-this.MaxX, this.MaxX, x);
this.SmoothCamera.Position = new Point(x, 0, 0); this.SmoothCamera.Position = new Point(x, 0, 0);
......
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