|
@@ -621,7 +621,7 @@ void MainWindow::AddPedObj(double x,double y, double fhdg)
|
|
pitem->setPos(mfViewMoveX +VIEW_WIDTH/2,-mfViewMoveY+VIEW_HEIGHT/2);
|
|
pitem->setPos(mfViewMoveX +VIEW_WIDTH/2,-mfViewMoveY+VIEW_HEIGHT/2);
|
|
mpscene->addItem(pitem);
|
|
mpscene->addItem(pitem);
|
|
|
|
|
|
- AddObjToVector(x,y,0,fhdg,fpedlen,fpedwidth,fpedheight,pitem);
|
|
|
|
|
|
+ AddObjToVector(x,y,0,fhdg,fpedlen,fpedwidth,fpedheight,pitem,1);
|
|
}
|
|
}
|
|
|
|
|
|
void MainWindow::AddCarObj(double x,double y, double fhdg)
|
|
void MainWindow::AddCarObj(double x,double y, double fhdg)
|
|
@@ -656,7 +656,7 @@ void MainWindow::AddCarObj(double x,double y, double fhdg)
|
|
pitem->setPos(mfViewMoveX +VIEW_WIDTH/2,-mfViewMoveY+VIEW_HEIGHT/2);
|
|
pitem->setPos(mfViewMoveX +VIEW_WIDTH/2,-mfViewMoveY+VIEW_HEIGHT/2);
|
|
mpscene->addItem(pitem);
|
|
mpscene->addItem(pitem);
|
|
|
|
|
|
- AddObjToVector(x,y,0,fhdg,fcarlen,fcarwidth,fcarheight,pitem);
|
|
|
|
|
|
+ AddObjToVector(x,y,0,fhdg,fcarlen,fcarwidth,fcarheight,pitem,0);
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -698,7 +698,7 @@ void MainWindow::AddCustomObj(double x,double y, double z,double fhdg,double fle
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-void MainWindow::AddObjToVector(double x,double y, double z,double fhdg,double flen,double fwidth,double fheight,QGraphicsPathItem * pitem)
|
|
|
|
|
|
+void MainWindow::AddObjToVector(double x,double y, double z,double fhdg,double flen,double fwidth,double fheight,QGraphicsPathItem * pitem,int ntype)
|
|
{
|
|
{
|
|
iv::simobj xsimobj;
|
|
iv::simobj xsimobj;
|
|
xsimobj.mfx = x;
|
|
xsimobj.mfx = x;
|
|
@@ -710,6 +710,7 @@ void MainWindow::AddObjToVector(double x,double y, double z,double fhdg,double f
|
|
xsimobj.mfheight = fheight;
|
|
xsimobj.mfheight = fheight;
|
|
xsimobj.mpobjitem = pitem;
|
|
xsimobj.mpobjitem = pitem;
|
|
xsimobj.nshowid = mnshowidindex;
|
|
xsimobj.nshowid = mnshowidindex;
|
|
|
|
+ xsimobj.mtype = ntype;
|
|
mnshowidindex++;
|
|
mnshowidindex++;
|
|
mvectorsimobj.push_back(xsimobj);
|
|
mvectorsimobj.push_back(xsimobj);
|
|
mpCBObj->addItem(QString("Obj")+ QString::number(xsimobj.nshowid));
|
|
mpCBObj->addItem(QString("Obj")+ QString::number(xsimobj.nshowid));
|