|
@@ -2,6 +2,149 @@
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
+Object_outlines_outline_cornerLocal::Object_outlines_outline_cornerLocal(double u,
|
|
|
+ double v,double z,double height)
|
|
|
+{
|
|
|
+ mu = u;
|
|
|
+ mv = v;
|
|
|
+ mz = z;
|
|
|
+ mheight = height;
|
|
|
+}
|
|
|
+
|
|
|
+double Object_outlines_outline_cornerLocal::Getu()
|
|
|
+{
|
|
|
+ return mu;
|
|
|
+}
|
|
|
+
|
|
|
+double Object_outlines_outline_cornerLocal::Getv()
|
|
|
+{
|
|
|
+ return mv;
|
|
|
+}
|
|
|
+
|
|
|
+double Object_outlines_outline_cornerLocal::Getz()
|
|
|
+{
|
|
|
+ return mz;
|
|
|
+}
|
|
|
+
|
|
|
+double Object_outlines_outline_cornerLocal::Getheight()
|
|
|
+{
|
|
|
+ return mheight;
|
|
|
+}
|
|
|
+
|
|
|
+int Object_outlines_outline_cornerLocal::Getid(int & id)
|
|
|
+{
|
|
|
+ if(mvectorid.size() == 0)return 0;
|
|
|
+ id = mvectorid[0];
|
|
|
+ return 1;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+void Object_outlines_outline_cornerLocal::Setu(double u)
|
|
|
+{
|
|
|
+ mu = u;
|
|
|
+}
|
|
|
+
|
|
|
+void Object_outlines_outline_cornerLocal::Setv(double v)
|
|
|
+{
|
|
|
+ mv = v;
|
|
|
+}
|
|
|
+
|
|
|
+void Object_outlines_outline_cornerLocal::Setz(double z)
|
|
|
+{
|
|
|
+ mz = z;
|
|
|
+}
|
|
|
+
|
|
|
+void Object_outlines_outline_cornerLocal::Setheight(double height)
|
|
|
+{
|
|
|
+ mheight = height;
|
|
|
+}
|
|
|
+
|
|
|
+void Object_outlines_outline_cornerLocal::Setid(int id)
|
|
|
+{
|
|
|
+ if(mvectorid.size() > 0)mvectorid.clear();
|
|
|
+ mvectorid.push_back(id);
|
|
|
+}
|
|
|
+
|
|
|
+void Object_outlines_outline_cornerLocal::Clearid()
|
|
|
+{
|
|
|
+ if(mvectorid.size() > 0)mvectorid.clear();
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+Object_outlines_outline_cornerRoad::Object_outlines_outline_cornerRoad(double s,
|
|
|
+ double t,double dz,double height)
|
|
|
+{
|
|
|
+ ms = s;
|
|
|
+ mt = t;
|
|
|
+ mdz = dz;
|
|
|
+ mheight = height;
|
|
|
+}
|
|
|
+
|
|
|
+double Object_outlines_outline_cornerRoad::Gets()
|
|
|
+{
|
|
|
+ return ms;
|
|
|
+}
|
|
|
+
|
|
|
+double Object_outlines_outline_cornerRoad::Gett()
|
|
|
+{
|
|
|
+ return mt;
|
|
|
+}
|
|
|
+
|
|
|
+double Object_outlines_outline_cornerRoad::Getdz()
|
|
|
+{
|
|
|
+ return mdz;
|
|
|
+}
|
|
|
+
|
|
|
+double Object_outlines_outline_cornerRoad::Getheight()
|
|
|
+{
|
|
|
+ return mheight;
|
|
|
+}
|
|
|
+
|
|
|
+int Object_outlines_outline_cornerRoad::Getid(int & id)
|
|
|
+{
|
|
|
+ if(mvectorid.size() == 0)return 0;
|
|
|
+ id = mvectorid[0];
|
|
|
+ return 1;
|
|
|
+}
|
|
|
+
|
|
|
+void Object_outlines_outline_cornerRoad::Sets(double s)
|
|
|
+{
|
|
|
+ ms = s;
|
|
|
+}
|
|
|
+
|
|
|
+void Object_outlines_outline_cornerRoad::Sett(double t)
|
|
|
+{
|
|
|
+ mt = t;
|
|
|
+}
|
|
|
+
|
|
|
+void Object_outlines_outline_cornerRoad::Setdz(double dz)
|
|
|
+{
|
|
|
+ mdz = dz;
|
|
|
+}
|
|
|
+
|
|
|
+void Object_outlines_outline_cornerRoad::Setheight(double height)
|
|
|
+{
|
|
|
+ mheight = height;
|
|
|
+}
|
|
|
+
|
|
|
+void Object_outlines_outline_cornerRoad::Setid(int id)
|
|
|
+{
|
|
|
+ if(mvectorid.size() > 0)mvectorid.clear();
|
|
|
+ mvectorid.push_back(id);
|
|
|
+}
|
|
|
+
|
|
|
+void Object_outlines_outline_cornerRoad::Clearid()
|
|
|
+{
|
|
|
+ if(mvectorid.size() > 0)mvectorid.clear();
|
|
|
+}
|
|
|
+
|
|
|
+bool Object_outlines_outline_cornerRoad::CheckInterval(double s_check)
|
|
|
+{
|
|
|
+ if (s_check>=ms)
|
|
|
+ return true;
|
|
|
+ else
|
|
|
+ return false;
|
|
|
+}
|
|
|
|
|
|
Object_outlines_outline::Object_outlines_outline()
|
|
|
{
|
|
@@ -99,6 +242,136 @@ void Object_outlines_outline::ClearlaneType()
|
|
|
if(mlaneType.size() > 0)mlaneType.clear();
|
|
|
}
|
|
|
|
|
|
+vector<Object_outlines_outline_cornerRoad> * Object_outlines_outline::GetcornerRoadVector()
|
|
|
+{
|
|
|
+ return &mcornerRoad;
|
|
|
+}
|
|
|
+
|
|
|
+Object_outlines_outline_cornerRoad* Object_outlines_outline::GetcornerRoad(unsigned int i)
|
|
|
+{
|
|
|
+ if ((mcornerRoad.size()>0)&&(i<(mcornerRoad.size())))
|
|
|
+ return &(mcornerRoad.at(i));
|
|
|
+ else
|
|
|
+ return NULL;
|
|
|
+}
|
|
|
+
|
|
|
+unsigned int Object_outlines_outline::GetcornerRoadCount()
|
|
|
+{
|
|
|
+ return mcornerRoad.size();
|
|
|
+}
|
|
|
+
|
|
|
+Object_outlines_outline_cornerRoad* Object_outlines_outline::GetLastcornerRoad()
|
|
|
+{
|
|
|
+ if (mcornerRoad.size()>0)
|
|
|
+ return &mcornerRoad.at(mcornerRoad.size()-1);
|
|
|
+ else
|
|
|
+ return NULL;
|
|
|
+}
|
|
|
+
|
|
|
+Object_outlines_outline_cornerRoad* Object_outlines_outline::GetLastAddedcornerRoad()
|
|
|
+{
|
|
|
+ if(mnLastAddedcornerRoad<mcornerRoad.size())
|
|
|
+ return &mcornerRoad.at(mnLastAddedcornerRoad);
|
|
|
+ else
|
|
|
+ return NULL;
|
|
|
+}
|
|
|
+
|
|
|
+unsigned int Object_outlines_outline::AddcornerRoad(double s,double t,double dz,double height)
|
|
|
+{
|
|
|
+ unsigned int index = CheckcornerRoadInterval(s)+1;
|
|
|
+ mcornerRoad.push_back(Object_outlines_outline_cornerRoad(s,t,dz,height));
|
|
|
+ mnLastAddedcornerRoad = index;
|
|
|
+ return index;
|
|
|
+}
|
|
|
+
|
|
|
+unsigned int Object_outlines_outline::ClonecornerRoad(unsigned int index)
|
|
|
+{
|
|
|
+ if(index<(mcornerRoad.size()-1))
|
|
|
+ mcornerRoad.insert(mcornerRoad.begin()+index+1, mcornerRoad[index]);
|
|
|
+ else if(index==mcornerRoad.size()-1)
|
|
|
+ mcornerRoad.push_back(mcornerRoad[index]);
|
|
|
+ mnLastAddedcornerRoad=index+1;
|
|
|
+ return mnLastAddedcornerRoad;
|
|
|
+}
|
|
|
+
|
|
|
+void Object_outlines_outline::DeletecornerRoad(unsigned int index)
|
|
|
+{
|
|
|
+ mcornerRoad.erase(mcornerRoad.begin()+index);
|
|
|
+}
|
|
|
+
|
|
|
+int Object_outlines_outline::CheckcornerRoadInterval(double s_check)
|
|
|
+{
|
|
|
+ int res=-1;
|
|
|
+
|
|
|
+ for (unsigned int i=0;i<mcornerRoad.size();i++)
|
|
|
+ {
|
|
|
+
|
|
|
+ if (mcornerRoad.at(i).CheckInterval(s_check))
|
|
|
+ res=i;
|
|
|
+ else
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+vector<Object_outlines_outline_cornerLocal> * Object_outlines_outline::GetcornerLocalVector()
|
|
|
+{
|
|
|
+ return &mcornerLocal;
|
|
|
+}
|
|
|
+
|
|
|
+Object_outlines_outline_cornerLocal* Object_outlines_outline::GetcornerLocal(unsigned int i)
|
|
|
+{
|
|
|
+ if ((mcornerLocal.size()>0)&&(i<(mcornerLocal.size())))
|
|
|
+ return &(mcornerLocal.at(i));
|
|
|
+ else
|
|
|
+ return NULL;
|
|
|
+}
|
|
|
+
|
|
|
+unsigned int Object_outlines_outline::GetcornerLocalCount()
|
|
|
+{
|
|
|
+ return mcornerLocal.size();
|
|
|
+}
|
|
|
+
|
|
|
+Object_outlines_outline_cornerLocal* Object_outlines_outline::GetLastcornerLocal()
|
|
|
+{
|
|
|
+ if (mcornerLocal.size()>0)
|
|
|
+ return &mcornerLocal.at(mcornerLocal.size()-1);
|
|
|
+ else
|
|
|
+ return NULL;
|
|
|
+}
|
|
|
+
|
|
|
+Object_outlines_outline_cornerLocal* Object_outlines_outline::GetLastAddedcornerLocal()
|
|
|
+{
|
|
|
+ if(mnLastAddedcornerLocal<mcornerLocal.size())
|
|
|
+ return &mcornerLocal.at(mnLastAddedcornerLocal);
|
|
|
+ else
|
|
|
+ return NULL;
|
|
|
+}
|
|
|
+
|
|
|
+unsigned int Object_outlines_outline::AddcornerLocal(double u,double v,double z,double height)
|
|
|
+{
|
|
|
+ unsigned int index = mcornerLocal.size();
|
|
|
+ mcornerLocal.push_back(Object_outlines_outline_cornerLocal(u,v,z,height));
|
|
|
+ mnLastAddedcornerLocal = index;
|
|
|
+ return index;
|
|
|
+}
|
|
|
+
|
|
|
+unsigned int Object_outlines_outline::ClonecornerLocal(unsigned int index)
|
|
|
+{
|
|
|
+ if(index<(mcornerLocal.size()-1))
|
|
|
+ mcornerLocal.insert(mcornerLocal.begin()+index+1, mcornerLocal[index]);
|
|
|
+ else if(index==mcornerLocal.size()-1)
|
|
|
+ mcornerLocal.push_back(mcornerLocal[index]);
|
|
|
+ mnLastAddedcornerLocal=index+1;
|
|
|
+ return mnLastAddedcornerLocal;
|
|
|
+}
|
|
|
+
|
|
|
+void Object_outlines_outline::DeletecornerLocal(unsigned int index)
|
|
|
+{
|
|
|
+ mcornerLocal.erase(mcornerLocal.begin()+index);
|
|
|
+}
|
|
|
+
|
|
|
Object_outlines::Object_outlines()
|
|
|
{
|
|
|
|
|
@@ -752,6 +1025,7 @@ void Object::DeleteObjectrepeat(unsigned int index)
|
|
|
mObject_repeat.erase(mObject_repeat.begin()+index);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
int Object::CheckObjectrepeatInterval(double s_check)
|
|
|
{
|
|
|
int res=-1;
|