Browse Source

fix: 完善运算部分参数调整

master
fajiao 2 years ago
parent
commit
005f6590bc
  1. 9
      Cis.Application/Core/Component/MarkSeacher/Seacher/DaHuaMarkSearcher.cs
  2. 34
      Cis.Application/Core/Component/MarkSeacher/Seacher/HiKMarkSeacher.cs
  3. 14
      Cis.Application/Core/Component/MarkSeacher/Seacher/MarkSearcherBase.cs
  4. 2
      Cis.Application/Core/Component/MarkSeacher/Seacher/YuShiMarkSeacher.cs

9
Cis.Application/Core/Component/MarkSeacher/Seacher/DaHuaMarkSearcher.cs

@ -1,6 +1,4 @@
using System.Drawing; namespace Cis.Application.Core.Component.MarkSeacher;
namespace Cis.Application.Core.Component.MarkSeacher;
public class DaHuaMarkSearcher : MarkSearcherBase public class DaHuaMarkSearcher : MarkSearcherBase
{ {
@ -22,9 +20,10 @@ public class DaHuaMarkSearcher : MarkSearcherBase
return ret; return ret;
} }
protected override PointF GetFOfMatrixByZoomPos(double zoomPos) protected override double GetZoomTag(double zoomPos)
{ {
throw new NotImplementedException(); double ret = zoomPos / (128.0 / 42.0) + 1;
return ret;
} }
#endregion Implement #endregion Implement

34
Cis.Application/Core/Component/MarkSeacher/Seacher/HiKMarkSeacher.cs

@ -1,6 +1,4 @@
using System.Drawing; namespace Cis.Application.Core.Component.MarkSeacher;
namespace Cis.Application.Core.Component.MarkSeacher;
public class HiKMarkSearcher : MarkSearcherBase public class HiKMarkSearcher : MarkSearcherBase
{ {
@ -29,39 +27,17 @@ public class HiKMarkSearcher : MarkSearcherBase
return ret; return ret;
} }
protected override PointF GetFOfMatrixByZoomPos(double zoomPos) protected override double GetZoomTag(double zoomPos)
{
PointF pointF = new()
{ {
X = (float)GetFx(zoomPos), double ret = HexToDecMa(zoomPos) * 0.1;
Y = (float)GetFy(zoomPos) ret = (ret - 1) * 0.65 + 1;
}; return ret;
return pointF;
} }
#endregion Implement #endregion Implement
#region Util #region Util
protected virtual double GetFx(double zoomPos)
{
CameraCalcParams calcParams = CameraCalcParams;
return calcParams.FocusX * GetZoomTag(zoomPos);
}
protected virtual double GetFy(double zoomPos)
{
CameraCalcParams calcParams = CameraCalcParams;
return calcParams.FocusY * GetZoomTag(zoomPos);
}
protected virtual double GetZoomTag(double zoomPos)
{
double ret = HexToDecMa(zoomPos) * 0.1;
ret = (ret - 1) * 0.65 + 1;
return ret;
}
protected int HexToDecMa(double wHex) protected int HexToDecMa(double wHex)
{ {
int wHexInt = wHex.ToInt(); int wHexInt = wHex.ToInt();

14
Cis.Application/Core/Component/MarkSeacher/Seacher/MarkSearcherBase.cs

@ -201,7 +201,19 @@ public abstract class MarkSearcherBase
/// </summary> /// </summary>
/// <param name="zoomPos"></param> /// <param name="zoomPos"></param>
/// <returns></returns> /// <returns></returns>
protected abstract PointF GetFOfMatrixByZoomPos(double zoomPos); protected PointF GetFOfMatrixByZoomPos(double zoomPos)
{
CameraCalcParams calcParams = CameraCalcParams;
double zoomTag = GetZoomTag(zoomPos);
PointF pointF = new()
{
X = (float)(calcParams.FocusX * zoomTag),
Y = (float)(calcParams.FocusY * zoomTag)
};
return pointF;
}
protected abstract double GetZoomTag(double zoomPos);
#endregion Util #endregion Util

2
Cis.Application/Core/Component/MarkSeacher/Seacher/YuShiMarkSeacher.cs

@ -20,7 +20,7 @@ public class YuShiMarkSearcher : MarkSearcherBase
throw new NotImplementedException(); throw new NotImplementedException();
} }
protected override PointF GetFOfMatrixByZoomPos(double zoomPos) protected override double GetZoomTag(double zoomPos)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

Loading…
Cancel
Save