[add] 替换3d模型,注释划线逻辑

This commit is contained in:
liujing
2021-12-01 11:43:36 +08:00
parent db9abdb4e7
commit b2aef26e16
4 changed files with 17 additions and 8 deletions

View File

@@ -216,7 +216,7 @@ public class BaseDrawer {
} else if (recognizedType == AdasRecognizedType.classIdStopLine) {
return R.raw.stopline;
} else if (recognizedType == AdasRecognizedType.classIdWarningArrows) {
return R.raw.stopline;
return R.raw.jiantou;
} else if (recognizedType == AdasRecognizedType.classIdUnKnow) {
return R.raw.special_vehicle;
} else if (recognizedType == AdasRecognizedType.classIdBicycle) {

View File

@@ -33,7 +33,7 @@ import static com.mogo.module.v2x.V2XServiceManager.getContext;
/**
* @author liujing
* @description 前方预警marker打点 绘制安全线和预警线
* @description 前方预警marker打点 绘制安全线和预警线 衡阳交付-取消划线需求,只渲染识别物红色模型移动过程,代码保留
* @since: 2021/3/30
*/
public class V2XWarningMarker implements IV2XMarker{
@@ -86,20 +86,26 @@ public class V2XWarningMarker implements IV2XMarker{
WorkThreadHandler.getInstance().postDelayed(() -> {
if (carLocation.lat != 0 && carLocation.lon != 0) {
//在自车与停止线直线绘制蓝色预警线
drawSelfCarLine(carLocation.lon, carLocation.lat, bearing);
//衡阳交付-取消划线需求,只渲染识别物红色模型移动过程
//drawSelfCarLine(carLocation.lon, carLocation.lat, bearing);
} else {
}
//二轮车和行人的渲染和移动
V2XServiceManager.getMarkerManager().removeMarkers(TYPE_MARKER_CLOUD_WARN_DATA);
/* 衡阳交付-取消划线需求,只渲染识别物红色模型移动过程
//获取停止线前方50m坐标点
MogoLatLng warningLocation = Trigonometric.getNewLocation(middleLocationInStopLine,
50, angleForCarMoveDirection());
//停止线向前方50m绘制红色预警线
drawRedWarningLineFrontOfStopLine(mCloundWarningInfo, middleLocationInStopLine,
warningLocation);
*/
V2XWarnDataDrawer.getInstance().renderWarnData(mCloundWarningInfo);
//添加停止线marker
handleStopLine();
//衡阳交付-取消划线需求,只渲染识别物红色模型移动过程
//handleStopLine();
}, 0);
Log.d(TAG, "显示时间为++" + String.valueOf(showTime) + "识别物类型:" +
String.valueOf(mCloundWarningInfo.getType()));
@@ -108,6 +114,7 @@ public class V2XWarningMarker implements IV2XMarker{
} else { //无停止线
Log.d(TAG, "无停止线");
WorkThreadHandler.getInstance().postDelayed(() -> {
/* 衡阳交付-取消划线需求,只渲染识别物红色模型移动过程
Log.d(TAG, "无停止线" + mCloundWarningInfo.toString());
//绘制识别物与交汇点连线,并且更新连线数据
drawOtherObjectLine(mCloundWarningInfo);
@@ -118,6 +125,7 @@ public class V2XWarningMarker implements IV2XMarker{
} else {
Log.d(TAG, "数据为空carLocation == null");
}
*/
V2XWarnDataDrawer.getInstance().renderWarnData(mCloundWarningInfo);
}, 0);
@@ -390,7 +398,8 @@ public class V2XWarningMarker implements IV2XMarker{
if (mCloundWarningInfo != null) {
mCloundWarningInfo.setCarLocation(new MogoLatLng(latLng.getLatitude(), latLng.getLongitude()));
}
drawSelfCarLine(latLng.getLongitude(), latLng.getLatitude(), latLng.getBearing());
//衡阳交付-取消划线需求,只渲染识别物红色模型移动过程
//drawSelfCarLine(latLng.getLongitude(), latLng.getLatitude(), latLng.getBearing());
}
Log.d(TAG, "车辆行驶轨迹" + String.valueOf(latLng.getLongitude()) + "," + String.valueOf(latLng.getLatitude()));
}

View File

@@ -1,8 +1,8 @@
{
"type": 1,
"lat": 26.851993861219782,
"lon": 112.57065318116094,
"distance": 5.89,
"lat": 26.851909,
"lon": 112.571751,
"distance": 40.119,
"collisionLat": 26.85198163866211,
"collisionLon": 112.57059540184451,
"stopLines": [