54 lines
1.6 KiB
C#
54 lines
1.6 KiB
C#
using ActiveProtect.Utility;
|
|
using System;
|
|
namespace ActiveProtect.Models
|
|
{
|
|
/// <summary>
|
|
/// 红外探测器类
|
|
/// </summary>
|
|
public class InfraredDetector : Sensor
|
|
{
|
|
/// <summary>
|
|
/// 探测范围
|
|
/// </summary>
|
|
public double DetectionRange { get; set; }
|
|
|
|
/// <summary>
|
|
/// 视场角
|
|
/// </summary>
|
|
public double FieldOfView { get; set; }
|
|
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
/// <param name="position">探测器的位置</param>
|
|
/// <param name="orientation">探测器的朝向</param>
|
|
/// <param name="detectionRange">探测范围</param>
|
|
/// <param name="fieldOfView">视场角</param>
|
|
public InfraredDetector(Vector3D position, Orientation orientation, double detectionRange, double fieldOfView)
|
|
: base(position, orientation)
|
|
{
|
|
DetectionRange = detectionRange;
|
|
FieldOfView = fieldOfView;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 更新红外探测器的状态
|
|
/// </summary>
|
|
/// <param name="deltaTime">自上次更新以来的时间间隔</param>
|
|
public override void Update(double deltaTime)
|
|
{
|
|
// 实现红外探测器的更新逻辑
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取红外探测器的数据
|
|
/// </summary>
|
|
/// <returns>红外探测器采集的数据</returns>
|
|
public override SensorData GetSensorData()
|
|
{
|
|
// 返回红外探测器的数据
|
|
return new InfraredSensorData();
|
|
}
|
|
}
|
|
|
|
} |