Commit 7632226e authored by Ulrich Kemloh's avatar Ulrich Kemloh

remove the confusing _closed attributes in subroom (which was not used)

parent 93a713e2
......@@ -83,7 +83,6 @@ BOOST_AUTO_TEST_CASE(JTol_WallGap_test)
std::vector<Line*> goal; // (Line(Point(10, 5), Point(10, 0)));
goal.push_back(&exit);
sub1.SetClosed(1);
if (sub1.ConvertLineToPoly(goal) == true) {
std::vector<Point> poly = sub1.GetPolygon();
......@@ -124,7 +123,6 @@ BOOST_AUTO_TEST_CASE(small_Wall_test)
std::vector<Line*> door; // (Line(Point(10, 5), Point(10, 0)));
door.push_back(&exit);
sub.SetClosed(1);
if (sub.ConvertLineToPoly(door) == true) {
std::vector<Point> poly = sub.GetPolygon();
for (auto it:poly)
......@@ -161,7 +159,6 @@ BOOST_AUTO_TEST_CASE(overlap_Wall_test)
std::vector<Line*> door; // door overlaps with the wall
door.push_back(&exit);
sub.SetClosed(1);
if (sub.ConvertLineToPoly(door) == true) {
std::vector<Point> poly = sub.GetPolygon();
for (auto it:poly)
......@@ -174,4 +171,4 @@ BOOST_AUTO_TEST_CASE(overlap_Wall_test)
BOOST_MESSAGE("Leaving overlap wall test");
}
BOOST_AUTO_TEST_SUITE_END()
\ No newline at end of file
BOOST_AUTO_TEST_SUITE_END()
......@@ -1304,7 +1304,7 @@ bool Building::SaveGeometry(const std::string &filename)
auto&& sub=itr_sub.second;
const double* plane=sub->GetPlaneEquation();
geometry<<"\t\t<subroom id =\""<<sub->GetSubRoomID()
<<"\" closed=\""<<sub->GetClosed()
<<"\" closed=\""<<0
<<"\" class=\""<<sub->GetType()
<<"\" A_x=\""<<plane[0]
<<"\" B_y=\""<<plane[1]
......
......@@ -68,7 +68,6 @@ SubRoom::SubRoom()
_goalIDs = vector<int> ();
_area = 0.0;
_closed=false;
_uid = _static_uid++;
}
......@@ -86,10 +85,6 @@ void SubRoom::SetSubRoomID(int ID)
{
_id = ID;
}
void SubRoom::SetClosed(double closed)
{
_closed = closed;
}
void SubRoom::SetRoomID(int ID)
{
......@@ -101,11 +96,6 @@ int SubRoom::GetSubRoomID() const
return _id;
}
double SubRoom::GetClosed() const
{
return _closed;
}
// unique identifier for this subroom
int SubRoom::GetUID() const
{
......@@ -830,24 +820,27 @@ bool NormalSubRoom::ConvertLineToPoly(const vector<Line*>& goals)
//check if all walls and goals were used in the polygon
for (const auto& w: _walls)
{
if( ! ( IsElementInVector(_poly,w.GetPoint1()) and
IsElementInVector(_poly,w.GetPoint2())) )
{
if( ! ( IsElementInVector(_poly,w.GetPoint1()) and
IsElementInVector(_poly,w.GetPoint2())) )
{
Log->Write("ERROR:\t Wall was not used during polygon creation for subroom: %s",w.toString().c_str());
return false;
}
//maybe the point was too closed to other points and got replaced
//check that eventuality
Log->Write("ERROR:\t Wall was not used during polygon creation for subroom: %s",w.toString().c_str());
return false;
}
}
for (const auto& g: goals)
for (const auto& g: goals)
{
if( ! ( IsElementInVector(_poly,g->GetPoint1()) and
IsElementInVector(_poly,g->GetPoint2())) )
{
if( ! ( IsElementInVector(_poly,g->GetPoint1()) and
IsElementInVector(_poly,g->GetPoint2())) )
{
Log->Write("ERROR:\t goal was not used during polygon creation for subroom: %s",g->toString().c_str());
//return false;
}
Log->Write("ERROR:\t goal was not used during polygon creation for subroom: %s",g->toString().c_str());
//return false;
}
}
return true;
}
......
......@@ -62,7 +62,6 @@ private:
int _roomID;
std::vector<int> _goalIDs; // all navigation lines contained in this subroom
double _area;
double _closed;
//defined by: Z = Ax + By + C
double _planeEquation[3];
double _cosAngleWithHorizontalPlane;
......@@ -105,8 +104,6 @@ public:
*/
void SetRoomID(int ID);
void SetClosed(double c);
/**
* Set the plane equation for this subroom.
* defined by: Z = Ax + By + C
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment