Skip to content

Commit

Permalink
Removed unused function. Refs #13894
Browse files Browse the repository at this point in the history
  • Loading branch information
palvarezlopez committed Dec 19, 2023
1 parent e2a5cc4 commit 4585731
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
26 changes: 0 additions & 26 deletions src/utils/gui/globjects/GUIGlObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,32 +460,6 @@ GUIGlObject::positionWithinGeometry(const Position &pos, const PositionVector sh
}


bool
GUIGlObject::positionWithinGeometry(const Position &pos, const Position& center, const double width, const double height,
const double offsetX, const double offsetY, const double rot) const {
// create shape
PositionVector shape;
// make rectangle
shape.push_back(Position(0 + width, 0 + height));
shape.push_back(Position(0 + width, 0 - height));
shape.push_back(Position(0 - width, 0 - height));
shape.push_back(Position(0 - width, 0 + height));
// move shape
shape.add(offsetX, offsetY, 0);
// rotate shape
shape.rotate2D(DEG2RAD((rot * -1) + 90));
// move to center
shape.add(center);
// check if mouse is within new geometry
if (shape.around(pos)) {
gPostDrawing.addElementUnderCursor(this);
return true;
} else {
return false;
}
}


std::string
GUIGlObject::createFullName() const {
return TypeNames.getString(myGLObjectType) + ":" + getMicrosimID();
Expand Down
5 changes: 1 addition & 4 deletions src/utils/gui/globjects/GUIGlObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ class GUIGlObject {
/// @brief build basic additional popup options. Used to unify pop-ups menu in netedit and SUMO-GUI
void buildAdditionalsPopupOptions(GUIMainWindow& app, GUIGLObjectPopupMenu* ret, const std::string& type);

public:
/// @brief check if mouse is within elements geometry (for circles)
bool positionWithinGeometry(const Position &pos, const Position center, const double radius) const;

Expand All @@ -309,10 +310,6 @@ class GUIGlObject {
/// @brief check if mouse is within elements geometry (for edges)
bool positionWithinGeometry(const Position &pos, const PositionVector shape, const double width, GUIGlObject* parent) const;

/// @brief check if mouse is within elements geometry (for rectangles)
bool positionWithinGeometry(const Position &pos, const Position& center, const double width, const double height,
const double offsetX, const double offsetY, const double rot) const;

private:
/// @brief The numerical id of the object
const GUIGlID myGlID;
Expand Down

0 comments on commit 4585731

Please sign in to comment.