|
@@ -169,7 +169,7 @@ public class VideoService {
|
|
|
Attribute vehicleCategory = node3.attribute("vehicleCategory");
|
|
|
vehicleCategory.setText(po.getVehicleCategory());
|
|
|
//node3.addAttribute("model3d", po.getModel3d());//自车渲染
|
|
|
- if(po.getModel3d()==null||po.getModel3d().equals("")){
|
|
|
+ if(null==po.getModel3d()||po.getModel3d().equals("")){
|
|
|
node3.addAttribute("model3d", "/root/disk1/simulation-cloud/esmini/resources/models/car_red.osgb");//自车渲染
|
|
|
}else{
|
|
|
log.info(" 车辆类型为 为:"+po.getVehicleCategory()+" 渲染文件为:" + po.getModel3d());
|
|
@@ -298,7 +298,7 @@ public class VideoService {
|
|
|
log.info("VideoService--vehicleById 车辆信息为:" + vehicleInfo);
|
|
|
|
|
|
//自车模型
|
|
|
- String car = vehicleInfo.getVehicleType().substring(0, vehicleInfo.getVehicleType().indexOf(","));
|
|
|
+ /* String car = vehicleInfo.getVehicleType().substring(0, vehicleInfo.getVehicleType().indexOf(","));
|
|
|
car = car.substring(0, 1).toLowerCase() + car.substring(1);
|
|
|
if (car.contains("truck")) {
|
|
|
po.setVehicleCategory("truck");
|
|
@@ -322,10 +322,18 @@ public class VideoService {
|
|
|
}else {
|
|
|
po.setVehicleCategory("car");
|
|
|
// po.setModel3d("/root/disk1/simulation-cloud/esmini/resources/models/audia8.osgb");
|
|
|
- }
|
|
|
+ }*/
|
|
|
//从字段取自车渲染osgb
|
|
|
- String carPath=dictMapper.getCarPath(po.getVehicleCategory());
|
|
|
- po.setModel3d(carPath);
|
|
|
+ String vehicleType=vehicleInfo.getVehicleType();
|
|
|
+ String car = vehicleType.substring( vehicleType.indexOf(",")+1,vehicleType.lastIndexOf(","));
|
|
|
+ log.info("VideoService--vehicleById 车辆类型为:" + car);
|
|
|
+ String carPath=dictMapper.getCarPath(car);
|
|
|
+ if(null!=carPath&&!carPath.equals("")){
|
|
|
+ po.setVehicleCategory(car);
|
|
|
+ po.setModel3d(carPath);
|
|
|
+ }else{
|
|
|
+ po.setVehicleCategory("car");
|
|
|
+ }
|
|
|
//车前距
|
|
|
BigDecimal frontDistance = vehicleInfo.getFrontDistance();
|
|
|
//车后距
|