[3.4.0][视角] 视角切换逻辑优化

This commit is contained in:
renwj
2023-07-12 14:27:55 +08:00
parent 494a3e51db
commit ff9c7f438b
12 changed files with 61 additions and 162 deletions

View File

@@ -34,53 +34,17 @@ class Default(val delay: Long = 2, val unit: TimeUnit = SECONDS): Scene() {
}
/**
* 变道-接收到转向灯信息号
*/
class Turning(var open: Boolean = false): Scene() {
override val angle: VisualAngleMode = VisualAngleMode.MAP_STYLE_VR_ANGLE_TOP
override val priority: Int = 3
override val displayThreshold: Long
get() = -1
override fun toString(): String {
return "Turning(open: ${open}, priority=$priority, displayThreshold: $displayThreshold, priority=$priority)"
}
}
/**
* 后方车辆离自车过近
*/
object TooClose: Scene() {
override val angle: VisualAngleMode = VisualAngleMode.MAP_STYLE_VR_ANGLE_300
override val priority: Int = 2
override val displayThreshold: Long
get() = SECONDS.toMillis(8)
override fun toString(): String {
return "TooClose(priority=$priority, displayThreshold: $displayThreshold, priority=$priority)"
}
}
/**
* 道路事件
*/
object RoadEvent: Scene() {
class RoadEvent(val poi_lon: Double, val poi_lat: Double, val poi_angle: Double): Scene() {
override val angle: VisualAngleMode = VisualAngleMode.MODE_LONG_SIGHT
override val priority: Int = 5
override val displayThreshold: Long
get() = SECONDS.toMillis(8)
get() = SECONDS.toMillis(5)
override fun toString(): String {
return "RoadEvent(priority=${priority}, displayThreshold: ${displayThreshold}, priority=${priority})"