beginning new convention for methods

This commit is contained in:
Christophe Alexandre 2008-01-04 15:28:35 +00:00
parent bc11b86deb
commit b9a119320a
22 changed files with 3112 additions and 3117 deletions

View File

@ -18,57 +18,51 @@ namespace Hurricane {
Box::Box() Box::Box()
// ******* // *******
: _xMin(1), : _xMin(1),
_yMin(1), _yMin(1),
_xMax(-1), _xMax(-1),
_yMax(-1) _yMax(-1)
{ {}
}
Box::Box(const Unit& x, const Unit& y) Box::Box(const Unit& x, const Unit& y)
// *********************************** // ***********************************
: _xMin(x), : _xMin(x),
_yMin(y), _yMin(y),
_xMax(x), _xMax(x),
_yMax(y) _yMax(y)
{ {}
}
Box::Box(const Point& point) Box::Box(const Point& point)
// ************************* // *************************
: _xMin(point.GetX()), : _xMin(point.getX()),
_yMin(point.GetY()), _yMin(point.getY()),
_xMax(point.GetX()), _xMax(point.getX()),
_yMax(point.GetY()) _yMax(point.getY())
{ {}
}
Box::Box(const Unit& x1, const Unit& y1, const Unit& x2, const Unit& y2) Box::Box(const Unit& x1, const Unit& y1, const Unit& x2, const Unit& y2)
// ********************************************************************* // *********************************************************************
: _xMin(min(x1, x2)), : _xMin(min(x1, x2)),
_yMin(min(y1, y2)), _yMin(min(y1, y2)),
_xMax(max(x1, x2)), _xMax(max(x1, x2)),
_yMax(max(y1, y2)) _yMax(max(y1, y2))
{ {}
}
Box::Box(const Point& point1, const Point& point2) Box::Box(const Point& point1, const Point& point2)
// *********************************************** // ***********************************************
: _xMin(min(point1.GetX(), point2.GetX())), : _xMin(min(point1.getX(), point2.getX())),
_yMin(min(point1.GetY(), point2.GetY())), _yMin(min(point1.getY(), point2.getY())),
_xMax(max(point1.GetX(), point2.GetX())), _xMax(max(point1.getX(), point2.getX())),
_yMax(max(point1.GetY(), point2.GetY())) _yMax(max(point1.getY(), point2.getY()))
{ {}
}
Box::Box(const Box& box) Box::Box(const Box& box)
// ********************* // *********************
: _xMin(box._xMin), : _xMin(box._xMin),
_yMin(box._yMin), _yMin(box._yMin),
_xMax(box._xMax), _xMax(box._xMax),
_yMax(box._yMax) _yMax(box._yMax)
{ {}
}
Box& Box::operator=(const Box& box) Box& Box::operator=(const Box& box)
// ******************************** // ********************************
@ -83,8 +77,8 @@ Box& Box::operator=(const Box& box)
bool Box::operator==(const Box& box) const bool Box::operator==(const Box& box) const
// *************************************** // ***************************************
{ {
return (!IsEmpty() && return (!isEmpty() &&
!box.IsEmpty() && !box.isEmpty() &&
(_xMin == box._xMin) && (_xMin == box._xMin) &&
(_yMin == box._yMin) && (_yMin == box._yMin) &&
(_xMax == box._xMax) && (_xMax == box._xMax) &&
@ -94,132 +88,132 @@ bool Box::operator==(const Box& box) const
bool Box::operator!=(const Box& box) const bool Box::operator!=(const Box& box) const
// *************************************** // ***************************************
{ {
return (IsEmpty() || return (isEmpty() ||
box.IsEmpty() || box.isEmpty() ||
(_xMin != box._xMin) || (_xMin != box._xMin) ||
(_yMin != box._yMin) || (_yMin != box._yMin) ||
(_xMax != box._xMax) || (_xMax != box._xMax) ||
(_yMax != box._yMax)); (_yMax != box._yMax));
} }
Box Box::GetUnion(const Box& box) const Box Box::getUnion(const Box& box) const
// ************************************ // ************************************
{ {
if (IsEmpty() && box.IsEmpty()) return Box(); if (isEmpty() && box.isEmpty()) return Box();
return Box(min(_xMin, box._xMin), return Box(min(_xMin, box._xMin),
min(_yMin, box._yMin), min(_yMin, box._yMin),
max(_xMax, box._xMax), max(_xMax, box._xMax),
max(_yMax, box._yMax)); max(_yMax, box._yMax));
} }
Box Box::GetIntersection(const Box& box) const Box Box::getIntersection(const Box& box) const
// ******************************************* // *******************************************
{ {
if (!Intersect(box)) return Box(); if (!intersect(box)) return Box();
return Box(max(_xMin, box._xMin), return Box(max(_xMin, box._xMin),
max(_yMin, box._yMin), max(_yMin, box._yMin),
min(_xMax, box._xMax), min(_xMax, box._xMax),
min(_yMax, box._yMax)); min(_yMax, box._yMax));
} }
Unit Box::ManhattanDistance(const Point& pt) const Unit Box::manhattanDistance(const Point& pt) const
// *********************************************** // ***********************************************
{ {
Unit dist = 0; Unit dist = 0;
if (IsEmpty()) if (isEmpty())
throw Error("Can't compute distance to an empty Box"); throw Error("Can't compute distance to an empty Box");
if (pt.GetX() < _xMin) dist = _xMin - pt.GetX(); if (pt.getX() < _xMin) dist = _xMin - pt.getX();
else if (pt.GetX() > _xMax) dist = pt.GetX() - _xMax; else if (pt.getX() > _xMax) dist = pt.getX() - _xMax;
// else dist = 0; // else dist = 0;
if (pt.GetY() < _yMin) dist += _yMin - pt.GetY(); if (pt.getY() < _yMin) dist += _yMin - pt.getY();
else if (pt.GetY() > _yMax) dist += pt.GetY() - _yMax; else if (pt.getY() > _yMax) dist += pt.getY() - _yMax;
// else dist += 0; // else dist += 0;
return dist; return dist;
} }
Unit Box::ManhattanDistance(const Box& box) const Unit Box::manhattanDistance(const Box& box) const
// ********************************************** // **********************************************
{ {
if (IsEmpty() || box.IsEmpty()) if (isEmpty() || box.isEmpty())
throw Error("Can't compute distance to an empty Box"); throw Error("Can't compute distance to an empty Box");
Unit dx, dy; Unit dx, dy;
if ((dx=box.GetXMin() - _xMax) < 0) if ((dx=box.getXMin() - _xMax) < 0)
if ((dx=_xMin-box.GetXMax()) < 0) dx=0; if ((dx=_xMin-box.getXMax()) < 0) dx=0;
if ((dy=box.GetYMin() - _yMax) < 0) if ((dy=box.getYMin() - _yMax) < 0)
if ((dy=_yMin-box.GetYMax()) < 0) dy=0; if ((dy=_yMin-box.getYMax()) < 0) dy=0;
return dx+dy; return dx+dy;
} }
bool Box::IsEmpty() const bool Box::isEmpty() const
// ********************** // **********************
{ {
return ((_xMax < _xMin) || (_yMax < _yMin)); return ((_xMax < _xMin) || (_yMax < _yMin));
} }
bool Box::IsFlat() const bool Box::isFlat() const
// ********************* // *********************
{ {
return (!IsEmpty() && return (!isEmpty() &&
(((_xMin == _xMax) && (_yMin < _yMax)) || (((_xMin == _xMax) && (_yMin < _yMax)) ||
((_xMin < _xMax) && (_yMin == _yMax)))); ((_xMin < _xMax) && (_yMin == _yMax))));
} }
bool Box::IsPonctual() const bool Box::isPonctual() const
// ************************* // *************************
{ {
return (!IsEmpty() && (_xMax == _xMin) && (_yMax == _yMin)); return (!isEmpty() && (_xMax == _xMin) && (_yMax == _yMin));
} }
bool Box::Contains(const Unit& x, const Unit& y) const bool Box::contains(const Unit& x, const Unit& y) const
// *************************************************** // ***************************************************
{ {
return (!IsEmpty() && return (!isEmpty() &&
(_xMin <= x) && (_xMin <= x) &&
(_yMin <= y) && (_yMin <= y) &&
(x <= _xMax) && (x <= _xMax) &&
(y <= _yMax)); (y <= _yMax));
} }
bool Box::Contains(const Point& point) const bool Box::contains(const Point& point) const
// ***************************************** // *****************************************
{ {
return Contains(point.GetX(), point.GetY()); return contains(point.getX(), point.getY());
} }
bool Box::Contains(const Box& box) const bool Box::contains(const Box& box) const
// ************************************* // *************************************
{ {
return (!IsEmpty() && return (!isEmpty() &&
!box.IsEmpty() && !box.isEmpty() &&
(_xMin <= box._xMin) && (_xMin <= box._xMin) &&
(box._xMax <= _xMax) && (box._xMax <= _xMax) &&
(_yMin <= box._yMin) && (_yMin <= box._yMin) &&
(box._yMax <= _yMax)); (box._yMax <= _yMax));
} }
bool Box::Intersect(const Box& box) const bool Box::intersect(const Box& box) const
// ************************************** // **************************************
{ {
return (!IsEmpty() && return (!isEmpty() &&
!box.IsEmpty() && !box.isEmpty() &&
!((_xMax < box._xMin) || !((_xMax < box._xMin) ||
(box._xMax < _xMin) || (box._xMax < _xMin) ||
(_yMax < box._yMin) || (_yMax < box._yMin) ||
(box._yMax < _yMin))); (box._yMax < _yMin)));
} }
bool Box::IsConstrainedBy(const Box& box) const bool Box::isConstrainedBy(const Box& box) const
// ******************************************** // ********************************************
{ {
return (!IsEmpty() && return (!isEmpty() &&
!box.IsEmpty() && !box.isEmpty() &&
((_xMin == box.GetXMin()) || ((_xMin == box.getXMin()) ||
(_yMin == box.GetYMin()) || (_yMin == box.getYMin()) ||
(_xMax == box.GetXMax()) || (_xMax == box.getXMax()) ||
(_yMax == box.GetYMax()))); (_yMax == box.getYMax())));
} }
Box& Box::MakeEmpty() Box& Box::makeEmpty()
// ****************** // ******************
{ {
_xMin = 1; _xMin = 1;
@ -229,22 +223,22 @@ Box& Box::MakeEmpty()
return *this; return *this;
} }
Box& Box::Inflate(const Unit& d) Box& Box::inflate(const Unit& d)
// ***************************** // *****************************
{ {
return Inflate(d, d, d, d); return inflate(d, d, d, d);
} }
Box& Box::Inflate(const Unit& dx, const Unit& dy) Box& Box::inflate(const Unit& dx, const Unit& dy)
// ********************************************** // **********************************************
{ {
return Inflate(dx, dy, dx, dy); return inflate(dx, dy, dx, dy);
} }
Box& Box::Inflate(const Unit& dxMin, const Unit& dyMin, const Unit& dxMax, const Unit& dyMax) Box& Box::inflate(const Unit& dxMin, const Unit& dyMin, const Unit& dxMax, const Unit& dyMax)
// ****************************************************************************************** // ******************************************************************************************
{ {
if (!IsEmpty()) { if (!isEmpty()) {
_xMin -= dxMin; _xMin -= dxMin;
_yMin -= dyMin; _yMin -= dyMin;
_xMax += dxMax; _xMax += dxMax;
@ -253,19 +247,19 @@ Box& Box::Inflate(const Unit& dxMin, const Unit& dyMin, const Unit& dxMax, const
return *this; return *this;
} }
Box& Box::ShrinkByFactor(double factor) Box& Box::shrinkByFactor(double factor)
// ************************************** // **************************************
{ {
assert((0 <= factor) && (factor <= 1)); assert((0 <= factor) && (factor <= 1));
Unit dx=GetUnit(0.5*(1- factor) * (GetValue(_xMax) - GetValue(_xMin))); Unit dx=GetUnit(0.5*(1- factor) * (GetValue(_xMax) - GetValue(_xMin)));
Unit dy=GetUnit(0.5*(1- factor) * (GetValue(_yMax) - GetValue(_yMin))); Unit dy=GetUnit(0.5*(1- factor) * (GetValue(_yMax) - GetValue(_yMin)));
return Inflate(-dx, -dy); return inflate(-dx, -dy);
} }
Box& Box::Merge(const Unit& x, const Unit& y) Box& Box::merge(const Unit& x, const Unit& y)
// ****************************************** // ******************************************
{ {
if (IsEmpty()) { if (isEmpty()) {
_xMin = x; _xMin = x;
_yMin = y; _yMin = y;
_xMax = x; _xMax = x;
@ -280,34 +274,34 @@ Box& Box::Merge(const Unit& x, const Unit& y)
return *this; return *this;
} }
Box& Box::Merge(const Point& point) Box& Box::merge(const Point& point)
// ******************************** // ********************************
{ {
return Merge(point.GetX(), point.GetY()); return merge(point.getX(), point.getY());
} }
Box& Box::Merge(const Unit& x1, const Unit& y1, const Unit& x2, const Unit& y2) Box& Box::merge(const Unit& x1, const Unit& y1, const Unit& x2, const Unit& y2)
// **************************************************************************** // ****************************************************************************
{ {
Merge(x1, y1); merge(x1, y1);
Merge(x2, y2); merge(x2, y2);
return *this; return *this;
} }
Box& Box::Merge(const Box& box) Box& Box::merge(const Box& box)
// **************************** // ****************************
{ {
if (!box.IsEmpty()) { if (!box.isEmpty()) {
Merge(box.GetXMin(), box.GetYMin()); merge(box.getXMin(), box.getYMin());
Merge(box.GetXMax(), box.GetYMax()); merge(box.getXMax(), box.getYMax());
} }
return *this; return *this;
} }
Box& Box::Translate(const Unit& dx, const Unit& dy) Box& Box::translate(const Unit& dx, const Unit& dy)
// ************************************************ // ************************************************
{ {
if (!IsEmpty()) { if (!isEmpty()) {
_xMin += dx; _xMin += dx;
_yMin += dy; _yMin += dy;
_xMax += dx; _xMax += dx;
@ -319,7 +313,7 @@ Box& Box::Translate(const Unit& dx, const Unit& dy)
string Box::_GetString() const string Box::_GetString() const
// *************************** // ***************************
{ {
if (IsEmpty()) if (isEmpty())
return "<" + _TName("Box") + " empty>"; return "<" + _TName("Box") + " empty>";
else else
return "<" + _TName("Box") + " " + return "<" + _TName("Box") + " " +
@ -331,7 +325,7 @@ string Box::_GetString() const
Record* Box::_GetRecord() const Record* Box::_GetRecord() const
// ********************** // **********************
{ {
if (IsEmpty()) return NULL; if (isEmpty()) return NULL;
Record* record = new Record(GetString(this)); Record* record = new Record(GetString(this));
record->Add(GetSlot("XMin", &_xMin)); record->Add(GetSlot("XMin", &_xMin));

View File

@ -24,6 +24,7 @@ class Box {
// Attributes // Attributes
// ********** // **********
private: Unit _xMin; private: Unit _xMin;
private: Unit _yMin; private: Unit _yMin;
private: Unit _xMax; private: Unit _xMax;
@ -52,61 +53,62 @@ class Box {
// Accessors // Accessors
// ********* // *********
public: const Unit& GetXMin() const {return _xMin;}; public: const Unit& getXMin() const {return _xMin;};
public: const Unit& GetYMin() const {return _yMin;}; public: const Unit& getYMin() const {return _yMin;};
public: const Unit& GetXMax() const {return _xMax;}; public: const Unit& getXMax() const {return _xMax;};
public: const Unit& GetYMax() const {return _yMax;}; public: const Unit& getYMax() const {return _yMax;};
public: Unit GetXCenter() const {return ((_xMin + _xMax) / 2);}; public: Unit getXCenter() const {return ((_xMin + _xMax) / 2);};
public: Unit GetYCenter() const {return ((_yMin + _yMax) / 2);}; public: Unit getYCenter() const {return ((_yMin + _yMax) / 2);};
public: Point GetCenter() const {return Point(GetXCenter(), GetYCenter());}; public: Point getCenter() const {return Point(getXCenter(), getYCenter());};
public: Unit GetWidth() const {return (_xMax - _xMin);}; public: Unit getWidth() const {return (_xMax - _xMin);};
public: Unit GetHalfWidth() const {return (GetWidth() / 2);}; public: Unit getHalfWidth() const {return (getWidth() / 2);};
public: Unit GetHeight() const {return (_yMax - _yMin);}; public: Unit getHeight() const {return (_yMax - _yMin);};
public: Unit GetHalfHeight() const {return (GetHeight() / 2);}; public: Unit getHalfHeight() const {return (getHeight() / 2);};
public: Box GetUnion(const Box& box) const; public: Box getUnion(const Box& box) const;
public: Box GetIntersection(const Box& box) const; public: Box getIntersection(const Box& box) const;
public: Unit ManhattanDistance(const Point& pt) const; public: Unit manhattanDistance(const Point& pt) const;
public: Unit ManhattanDistance(const Box& box) const; public: Unit manhattanDistance(const Box& box) const;
// Predicates // Predicates
// ********** // **********
public: bool IsEmpty() const; public: bool isEmpty() const;
public: bool IsFlat() const; public: bool isFlat() const;
public: bool IsPonctual() const; public: bool isPonctual() const;
public: bool Contains(const Unit& x, const Unit& y) const; public: bool contains(const Unit& x, const Unit& y) const;
public: bool Contains(const Point& point) const; public: bool contains(const Point& point) const;
public: bool Contains(const Box& box) const; public: bool contains(const Box& box) const;
public: bool Intersect(const Box& box) const; public: bool intersect(const Box& box) const;
public: bool IsConstrainedBy(const Box& box) const; public: bool isConstrainedBy(const Box& box) const;
// Updators // Updators
// ******** // ********
public: Box& MakeEmpty(); public: Box& makeEmpty();
public: Box& Inflate(const Unit& d); public: Box& inflate(const Unit& d);
public: Box& Inflate(const Unit& dx, const Unit& dy); public: Box& inflate(const Unit& dx, const Unit& dy);
public: Box& Inflate(const Unit& dxMin, const Unit& dyMin, const Unit& dxMax, const Unit& dyMax); public: Box& inflate(const Unit& dxMin, const Unit& dyMin, const Unit& dxMax, const Unit& dyMax);
public: Box& ShrinkByFactor(double factor); // 0 <= factor <= 1 public: Box& shrinkByFactor(double factor); // 0 <= factor <= 1
public: Box& Merge(const Unit& x, const Unit& y); public: Box& merge(const Unit& x, const Unit& y);
public: Box& Merge(const Point& point); public: Box& merge(const Point& point);
public: Box& Merge(const Unit& x1, const Unit& y1, const Unit& x2, const Unit& y2); public: Box& merge(const Unit& x1, const Unit& y1, const Unit& x2, const Unit& y2);
public: Box& Merge(const Box& box); public: Box& merge(const Box& box);
public: Box& Translate(const Unit& dx, const Unit& dy); public: Box& translate(const Unit& dx, const Unit& dy);
// Others // Others
// ****** // ******
public: string _GetTypeName() const { return _TName("Box"); }; public: string _GetTypeName() const { return _TName("Box"); };
public: string _GetString() const; public: string _GetString() const;
public: Record* _GetRecord() const; public: Record* _GetRecord() const;

View File

@ -68,12 +68,12 @@ Cell* Cell::Create(Library* library, const Name& name)
Box Cell::GetBoundingBox() const Box Cell::GetBoundingBox() const
// ***************************** // *****************************
{ {
if (_boundingBox.IsEmpty()) { if (_boundingBox.isEmpty()) {
Box& boundingBox = (Box&)_boundingBox; Box& boundingBox = (Box&)_boundingBox;
boundingBox = _abutmentBox; boundingBox = _abutmentBox;
boundingBox.Merge(_quadTree.GetBoundingBox()); boundingBox.merge(_quadTree.GetBoundingBox());
for_each_slice(slice, GetSlices()) { for_each_slice(slice, GetSlices()) {
boundingBox.Merge(slice->GetBoundingBox()); boundingBox.merge(slice->GetBoundingBox());
end_for; end_for;
} }
} }
@ -119,8 +119,8 @@ void Cell::SetAbutmentBox(const Box& abutmentBox)
// ********************************************** // **********************************************
{ {
if (abutmentBox != _abutmentBox) { if (abutmentBox != _abutmentBox) {
if (!_abutmentBox.IsEmpty() && if (!_abutmentBox.isEmpty() &&
(abutmentBox.IsEmpty() || !abutmentBox.Contains(_abutmentBox))) (abutmentBox.isEmpty() || !abutmentBox.contains(_abutmentBox)))
_Unfit(_abutmentBox); _Unfit(_abutmentBox);
_abutmentBox = abutmentBox; _abutmentBox = abutmentBox;
_Fit(_abutmentBox); _Fit(_abutmentBox);
@ -274,10 +274,10 @@ Record* Cell::_GetRecord() const
void Cell::_Fit(const Box& box) void Cell::_Fit(const Box& box)
// **************************** // ****************************
{ {
if (box.IsEmpty()) return; if (box.isEmpty()) return;
if (_boundingBox.IsEmpty()) return; if (_boundingBox.isEmpty()) return;
if (_boundingBox.Contains(box)) return; if (_boundingBox.contains(box)) return;
_boundingBox.Merge(box); _boundingBox.merge(box);
for_each_instance(instance, GetSlaveInstances()) { for_each_instance(instance, GetSlaveInstances()) {
instance->GetCell()->_Fit(instance->GetTransformation().GetBox(box)); instance->GetCell()->_Fit(instance->GetTransformation().GetBox(box));
end_for; end_for;
@ -287,10 +287,10 @@ void Cell::_Fit(const Box& box)
void Cell::_Unfit(const Box& box) void Cell::_Unfit(const Box& box)
// ****************************** // ******************************
{ {
if (box.IsEmpty()) return; if (box.isEmpty()) return;
if (_boundingBox.IsEmpty()) return; if (_boundingBox.isEmpty()) return;
if (!_boundingBox.IsConstrainedBy(box)) return; if (!_boundingBox.isConstrainedBy(box)) return;
_boundingBox.MakeEmpty(); _boundingBox.makeEmpty();
for_each_instance(instance, GetSlaveInstances()) { for_each_instance(instance, GetSlaveInstances()) {
instance->GetCell()->_Unfit(instance->GetTransformation().GetBox(box)); instance->GetCell()->_Unfit(instance->GetTransformation().GetBox(box));
end_for; end_for;

View File

@ -1272,14 +1272,14 @@ Rubbers Cell::GetRubbers() const
Rubbers Cell::GetRubbersUnder(const Box& area) const Rubbers Cell::GetRubbersUnder(const Box& area) const
// ************************************************* // *************************************************
{ {
// return (area.IsEmpty()) ? Rubbers() : _quadTree.GetGosUnder(area).GetSubSet<Rubber*>(); // return (area.isEmpty()) ? Rubbers() : _quadTree.GetGosUnder(area).GetSubSet<Rubber*>();
return SubTypeCollection<Go*, Rubber*>(_quadTree.GetGosUnder(area)); return SubTypeCollection<Go*, Rubber*>(_quadTree.GetGosUnder(area));
} }
Markers Cell::GetMarkersUnder(const Box& area) const Markers Cell::GetMarkersUnder(const Box& area) const
// ************************************************* // *************************************************
{ {
// return (area.IsEmpty()) ? Markers() : _quadTree.GetGosUnder(area).GetSubSet<Marker*>(); // return (area.isEmpty()) ? Markers() : _quadTree.GetGosUnder(area).GetSubSet<Marker*>();
return SubTypeCollection<Go*, Marker*>(_quadTree.GetGosUnder(area)); return SubTypeCollection<Go*, Marker*>(_quadTree.GetGosUnder(area));
} }
@ -1793,7 +1793,7 @@ Cell_ComponentsUnder::Locator::Locator(const Cell* cell, const Box& area, const
_componentLocator(), _componentLocator(),
_component(NULL) _component(NULL)
{ {
if (_cell && !_area.IsEmpty()) { if (_cell && !_area.isEmpty()) {
_sliceLocator = _cell->GetSlices(_mask).GetLocator(); _sliceLocator = _cell->GetSlices(_mask).GetLocator();
while (!_component && _sliceLocator.IsValid()) { while (!_component && _sliceLocator.IsValid()) {
Slice* slice = _sliceLocator.GetElement(); Slice* slice = _sliceLocator.GetElement();
@ -2260,7 +2260,7 @@ Cell_OccurrencesUnder::Locator::Locator(const Cell* cell, const Box& area, unsig
_instanceLocator(), _instanceLocator(),
_occurrenceLocator() _occurrenceLocator()
{ {
if (_cell && !_area.IsEmpty()) { if (_cell && !_area.isEmpty()) {
_componentLocator = _cell->GetComponentsUnder(_area).GetLocator(); _componentLocator = _cell->GetComponentsUnder(_area).GetLocator();
if (_componentLocator.IsValid()) if (_componentLocator.IsValid())
_state = 1; _state = 1;
@ -2718,7 +2718,7 @@ Cell_LeafInstanceOccurrencesUnder::Locator::Locator(const Cell* cell, const Box&
_nonLeafInstanceLocator(), _nonLeafInstanceLocator(),
_occurrenceLocator() _occurrenceLocator()
{ {
if (_cell && !_area.IsEmpty()) { if (_cell && !_area.isEmpty()) {
_leafInstanceLocator = _cell->GetLeafInstancesUnder(_area).GetLocator(); _leafInstanceLocator = _cell->GetLeafInstancesUnder(_area).GetLocator();
if (_leafInstanceLocator.IsValid()) if (_leafInstanceLocator.IsValid())
_state = 1; _state = 1;
@ -3127,7 +3127,7 @@ Cell_TerminalInstanceOccurrencesUnder::Locator::Locator(const Cell* cell, const
_nonTerminalInstanceLocator(), _nonTerminalInstanceLocator(),
_occurrenceLocator() _occurrenceLocator()
{ {
if (_cell && !_area.IsEmpty()) { if (_cell && !_area.isEmpty()) {
_terminalInstanceLocator = _cell->GetTerminalInstancesUnder(_area).GetLocator(); _terminalInstanceLocator = _cell->GetTerminalInstancesUnder(_area).GetLocator();
if (_terminalInstanceLocator.IsValid()) if (_terminalInstanceLocator.IsValid())
_state = 1; _state = 1;
@ -3574,7 +3574,7 @@ Cell_ComponentOccurrencesUnder::Locator::Locator(const Cell* cell, const Box& ar
_instanceLocator(), _instanceLocator(),
_occurrenceLocator() _occurrenceLocator()
{ {
if (_cell && !_area.IsEmpty() && (_mask != 0)) { if (_cell && !_area.isEmpty() && (_mask != 0)) {
_componentLocator = _cell->GetComponentsUnder(_area, _mask).GetLocator(); _componentLocator = _cell->GetComponentsUnder(_area, _mask).GetLocator();
if (_componentLocator.IsValid()) if (_componentLocator.IsValid())
_state = 1; _state = 1;

View File

@ -53,7 +53,7 @@ class Component_IsUnderFilter : public Filter<Component*> {
public: virtual bool Accept(Component* component) const public: virtual bool Accept(Component* component) const
// **************************************************** // ****************************************************
{ {
return _area.Intersect(component->GetBoundingBox()); return _area.intersect(component->GetBoundingBox());
}; };
public: virtual string _GetString() const public: virtual string _GetString() const
@ -490,7 +490,7 @@ void Component::_SetRubber(Rubber* rubber)
// Box area(point); // Box area(point);
// area.Inflate(aperture); // area.Inflate(aperture);
// for_each_basic_layer(basicLayer, GetLayer()->GetBasicLayers()) { // for_each_basic_layer(basicLayer, GetLayer()->GetBasicLayers()) {
// if (view->IsVisible(basicLayer) && GetBoundingBox(basicLayer).Intersect(area)) // if (view->IsVisible(basicLayer) && GetBoundingBox(basicLayer).intersect(area))
// return true; // return true;
// end_for; // end_for;
// } // }
@ -933,7 +933,7 @@ double GetArea ( Component* component )
{ {
Box bb = component->GetBoundingBox (); Box bb = component->GetBoundingBox ();
return GetValue(bb.GetWidth()) * GetValue(bb.GetHeight()); return GetValue(bb.getWidth()) * GetValue(bb.getHeight());
} }

View File

@ -172,7 +172,7 @@ Point Contact::GetPosition() const
// ******************************* // *******************************
{ {
Component* anchor = GetAnchor(); Component* anchor = GetAnchor();
return (!anchor) ? Point(_dx, _dy) : anchor->GetPosition().Translate(_dx, _dy); return (!anchor) ? Point(_dx, _dy) : anchor->GetPosition().translate(_dx, _dy);
} }
Box Contact::GetBoundingBox() const Box Contact::GetBoundingBox() const
@ -180,7 +180,7 @@ Box Contact::GetBoundingBox() const
{ {
Unit size = _GetSize(); Unit size = _GetSize();
return Box(GetPosition()).Inflate(GetHalfWidth() + size, GetHalfHeight() + size); return Box(GetPosition()).inflate(GetHalfWidth() + size, GetHalfHeight() + size);
} }
Box Contact::GetBoundingBox(BasicLayer* basicLayer) const Box Contact::GetBoundingBox(BasicLayer* basicLayer) const
@ -190,7 +190,7 @@ Box Contact::GetBoundingBox(BasicLayer* basicLayer) const
Unit size = _GetSize(basicLayer); Unit size = _GetSize(basicLayer);
return Box(GetPosition()).Inflate(GetHalfWidth() + size, GetHalfHeight() + size); return Box(GetPosition()).inflate(GetHalfWidth() + size, GetHalfHeight() + size);
} }
Component* Contact::GetAnchor() const Component* Contact::GetAnchor() const
@ -275,7 +275,7 @@ void Contact::SetPosition(const Unit& x, const Unit& y)
void Contact::SetPosition(const Point& position) void Contact::SetPosition(const Point& position)
// ********************************************* // *********************************************
{ {
SetPosition(position.GetX(), position.GetY()); SetPosition(position.getX(), position.getY());
} }
void Contact::SetDx(const Unit& dx) void Contact::SetDx(const Unit& dx)

View File

@ -26,7 +26,7 @@ DRCError::DRCError(Cell* cell, const Name& name, const Box& boundingBox)
if (_name.IsEmpty()) if (_name.IsEmpty())
throw Error("Can't create " + _TName("DRCError") + " : empty name"); throw Error("Can't create " + _TName("DRCError") + " : empty name");
if (_boundingBox.IsEmpty()) if (_boundingBox.isEmpty())
throw Error("Can't create " + _TName("DRCError") + " : empty bounding box"); throw Error("Can't create " + _TName("DRCError") + " : empty bounding box");
} }
@ -45,7 +45,7 @@ void DRCError::Translate(const Unit& dx, const Unit& dy)
{ {
if ((dx != 0) || (dy != 0)) { if ((dx != 0) || (dy != 0)) {
Invalidate(false); Invalidate(false);
_boundingBox.Translate(dx, dy); _boundingBox.translate(dx, dy);
} }
} }

View File

@ -64,7 +64,7 @@ Box Horizontal::GetBoundingBox() const
Unit size = GetHalfWidth() + _GetSize(); Unit size = GetHalfWidth() + _GetSize();
Unit extention = _GetExtention(); Unit extention = _GetExtention();
return Box(GetSourceX(), _y, GetTargetX(), _y).Inflate(extention, size); return Box(GetSourceX(), _y, GetTargetX(), _y).inflate(extention, size);
} }
Box Horizontal::GetBoundingBox(BasicLayer* basicLayer) const Box Horizontal::GetBoundingBox(BasicLayer* basicLayer) const
@ -75,7 +75,7 @@ Box Horizontal::GetBoundingBox(BasicLayer* basicLayer) const
Unit size = GetHalfWidth() + _GetSize(basicLayer); Unit size = GetHalfWidth() + _GetSize(basicLayer);
Unit extention = _GetExtention(basicLayer); Unit extention = _GetExtention(basicLayer);
return Box(GetSourceX(), _y, GetTargetX(), _y).Inflate(extention, size); return Box(GetSourceX(), _y, GetTargetX(), _y).inflate(extention, size);
} }
Unit Horizontal::GetSourceX() const Unit Horizontal::GetSourceX() const

View File

@ -511,7 +511,7 @@ static bool IsConnex(const Occurrence& componentOccurrence1, const Occurrence& c
for_each_basic_layer(basicLayer2, layer2->GetBasicLayers()) { for_each_basic_layer(basicLayer2, layer2->GetBasicLayers()) {
if (basicLayer1->GetExtractMask() & basicLayer2->GetExtractMask()) { if (basicLayer1->GetExtractMask() & basicLayer2->GetExtractMask()) {
Box box2 = transformation2.GetBox(component2->GetBoundingBox(basicLayer2)); Box box2 = transformation2.GetBox(component2->GetBoundingBox(basicLayer2));
if (box1.Intersect(box2)) return true; if (box1.intersect(box2)) return true;
} }
end_for; end_for;
} }
@ -766,7 +766,7 @@ void HyperNet_NetOccurrencesUnder::Locator::Progress()
for_each_component(component, net->GetComponents()) { for_each_component(component, net->GetComponents()) {
Occurrence occurrence = Occurrence(component, path); Occurrence occurrence = Occurrence(component, path);
Box area = occurrence.GetBoundingBox(); Box area = occurrence.GetBoundingBox();
if (! area.Intersect (_area)) { if (! area.intersect (_area)) {
// Outside useful area // Outside useful area
} else if (is_a<Plug*>(component)) { } else if (is_a<Plug*>(component)) {
// Will be processed below // Will be processed below
@ -774,7 +774,7 @@ void HyperNet_NetOccurrencesUnder::Locator::Progress()
// Don't go through the Rubbers (go only trough connecting layers) // Don't go through the Rubbers (go only trough connecting layers)
} else { } else {
//if (_allowInterruption && !((i++) % 200)) gtk_check_for_interruption(); //if (_allowInterruption && !((i++) % 200)) gtk_check_for_interruption();
Box under = area.GetIntersection (_area); Box under = area.getIntersection (_area);
for_each_occurrence(occurrence2, cell->GetOccurrencesUnder(under)) { for_each_occurrence(occurrence2, cell->GetOccurrencesUnder(under)) {
if (is_a<Component*>(occurrence2.GetEntity())) { if (is_a<Component*>(occurrence2.GetEntity())) {
Component* component2 = (Component*)occurrence2.GetEntity(); Component* component2 = (Component*)occurrence2.GetEntity();

View File

@ -53,7 +53,7 @@ class Instance_IsUnderFilter : public Filter<Instance*> {
public: virtual bool Accept(Instance* instance) const public: virtual bool Accept(Instance* instance) const
// ************************************************** // **************************************************
{ {
return _area.Intersect(instance->GetBoundingBox()); return _area.intersect(instance->GetBoundingBox());
}; };
public: virtual string _GetString() const public: virtual string _GetString() const
@ -293,7 +293,7 @@ void Instance::Materialize()
{ {
if (!IsMaterialized()) { if (!IsMaterialized()) {
Box boundingBox = GetBoundingBox(); Box boundingBox = GetBoundingBox();
if (!boundingBox.IsEmpty()) { if (!boundingBox.isEmpty()) {
QuadTree* quadTree = _cell->_GetQuadTree(); QuadTree* quadTree = _cell->_GetQuadTree();
quadTree->Insert(this); quadTree->Insert(this);
_cell->_Fit(quadTree->GetBoundingBox()); _cell->_Fit(quadTree->GetBoundingBox());
@ -328,8 +328,8 @@ void Instance::Translate(const Unit& dx, const Unit& dy)
{ {
if ((dx != 0) || (dy !=0)) { if ((dx != 0) || (dy !=0)) {
Point translation = _transformation.GetTranslation(); Point translation = _transformation.GetTranslation();
Unit x = translation.GetX() + dx; Unit x = translation.getX() + dx;
Unit y = translation.GetY() + dy; Unit y = translation.getY() + dy;
Transformation::Orientation orientation = _transformation.GetOrientation(); Transformation::Orientation orientation = _transformation.GetOrientation();
SetTransformation(Transformation(x, y, orientation)); SetTransformation(Transformation(x, y, orientation));
} }
@ -472,8 +472,8 @@ Record* Instance::_GetRecord() const
record->Add(GetSlot("MasterCell", _masterCell)); record->Add(GetSlot("MasterCell", _masterCell));
record->Add(GetSlot("Transformation", &_transformation)); record->Add(GetSlot("Transformation", &_transformation));
record->Add(GetSlot("PlacementStatus", _placementStatus)); record->Add(GetSlot("PlacementStatus", _placementStatus));
record->Add(GetSlot("XCenter", GetValue(GetAbutmentBox().GetXCenter()))); record->Add(GetSlot("XCenter", GetValue(GetAbutmentBox().getXCenter())));
record->Add(GetSlot("YCenter", GetValue(GetAbutmentBox().GetYCenter()))); record->Add(GetSlot("YCenter", GetValue(GetAbutmentBox().getYCenter())));
record->Add(GetSlot("Plugs", &_plugMap)); record->Add(GetSlot("Plugs", &_plugMap));
record->Add(GetSlot("SharedPathes", &_sharedPathMap)); record->Add(GetSlot("SharedPathes", &_sharedPathMap));
} }
@ -543,7 +543,7 @@ Record* Instance::_GetRecord() const
// Symbol* symbol = _masterCell->GetSymbol(); // Symbol* symbol = _masterCell->GetSymbol();
// if (!symbol) // if (!symbol)
// return (view->PhantomsAreVisible() || view->BoundariesAreVisible()) && // return (view->PhantomsAreVisible() || view->BoundariesAreVisible()) &&
// GetAbutmentBox().Intersect(Box(point).Inflate(aperture)); // GetAbutmentBox().intersect(Box(point).Inflate(aperture));
// else { // else {
// Point masterPoint = point; // Point masterPoint = point;
// _transformation.GetInvert().ApplyOn(masterPoint); // _transformation.GetInvert().ApplyOn(masterPoint);

View File

@ -276,7 +276,7 @@ Box Net::GetBoundingBox() const
{ {
Box boundingBox; Box boundingBox;
for_each_component(component, GetComponents()) { for_each_component(component, GetComponents()) {
boundingBox.Merge(component->GetBoundingBox()); boundingBox.merge(component->GetBoundingBox());
end_for; end_for;
} }
return boundingBox; return boundingBox;

View File

@ -143,8 +143,8 @@ class Net : public Entity {
public: const Type& GetType() const {return _type;}; public: const Type& GetType() const {return _type;};
public: const Direction& GetDirection() const {return _direction;}; public: const Direction& GetDirection() const {return _direction;};
public: const Point& GetPosition() const {return _position;}; public: const Point& GetPosition() const {return _position;};
public: const Unit& GetX() const {return _position.GetX();}; public: const Unit& GetX() const {return _position.getX();};
public: const Unit& GetY() const {return _position.GetY();}; public: const Unit& GetY() const {return _position.getY();};
public: Components GetComponents() const {return _componentSet.GetElements();}; public: Components GetComponents() const {return _componentSet.GetElements();};
public: Rubbers GetRubbers() const {return _rubberSet.GetElements();}; public: Rubbers GetRubbers() const {return _rubberSet.GetElements();};
public: RoutingPads GetRoutingPads() const; public: RoutingPads GetRoutingPads() const;

View File

@ -28,7 +28,7 @@ Pad::Pad(Net* net, Layer* layer, const Box& boundingBox)
if (!_layer) if (!_layer)
throw Error("Can't create " + _TName("Pad") + " : null layer"); throw Error("Can't create " + _TName("Pad") + " : null layer");
if (_boundingBox.IsEmpty()) if (_boundingBox.isEmpty())
throw Error("Can't create " + _TName("Pad") + " : empty bounding box"); throw Error("Can't create " + _TName("Pad") + " : empty bounding box");
} }
@ -60,7 +60,7 @@ Box Pad::GetBoundingBox() const
Box boundingBox = _boundingBox; Box boundingBox = _boundingBox;
if (is_a<CompositeLayer*>(_layer)) if (is_a<CompositeLayer*>(_layer))
boundingBox.Inflate(((CompositeLayer*)_layer)->GetMaximalPadSize()); boundingBox.inflate(((CompositeLayer*)_layer)->GetMaximalPadSize());
return boundingBox; return boundingBox;
} }
@ -73,7 +73,7 @@ Box Pad::GetBoundingBox(BasicLayer* basicLayer) const
Box boundingBox = _boundingBox; Box boundingBox = _boundingBox;
if (is_a<CompositeLayer*>(_layer)) if (is_a<CompositeLayer*>(_layer))
boundingBox.Inflate(((CompositeLayer*)_layer)->GetPadSize(basicLayer)); boundingBox.inflate(((CompositeLayer*)_layer)->GetPadSize(basicLayer));
return boundingBox; return boundingBox;
} }
@ -83,14 +83,14 @@ void Pad::Translate(const Unit& dx, const Unit& dy)
{ {
if ((dx != 0) || (dy != 0)) { if ((dx != 0) || (dy != 0)) {
Invalidate(true); Invalidate(true);
_boundingBox.Translate(dx, dy); _boundingBox.translate(dx, dy);
} }
} }
void Pad::SetBoundingBox(const Box& boundingBox) void Pad::SetBoundingBox(const Box& boundingBox)
// ********************************************* // *********************************************
{ {
if (_boundingBox.IsEmpty()) if (_boundingBox.isEmpty())
throw Error("Can't set bounding box : empty bounding box"); throw Error("Can't set bounding box : empty bounding box");
if (boundingBox != _boundingBox) { if (boundingBox != _boundingBox) {

View File

@ -84,7 +84,7 @@ Point& Point::operator-=(const Point &point)
return *this; return *this;
} }
Point& Point::Translate(const Unit& dx, const Unit& dy) Point& Point::translate(const Unit& dx, const Unit& dy)
// **************************************************** // ****************************************************
{ {
_x += dx; _x += dx;

View File

@ -52,18 +52,17 @@ class Point {
// Accessors // Accessors
// ********* // *********
public: const Unit& GetX() const {return _x;}; public: const Unit& getX() const {return _x;};
public: const Unit& GetY() const {return _y;}; public: const Unit& getY() const {return _y;};
public: Unit manhattanDistance(const Point pt) const
public: Unit ManhattanDistance(const Point pt) const { return abs(_x - pt.getX()) + abs(_y - pt.getY()); }
{return abs(_x - pt.GetX()) + abs(_y - pt.GetY());};
// Updators // Updators
// ******** // ********
public: void SetX(const Unit& x) {_x = x;}; public: void setX(const Unit& x) {_x = x;};
public: void SetY(const Unit& y) {_y = y;}; public: void setY(const Unit& y) {_y = y;};
public: Point& Translate(const Unit& dx, const Unit& dy); public: Point& translate(const Unit& dx, const Unit& dy);
// Others // Others
// ****** // ******

View File

@ -207,14 +207,14 @@ QuadTree::~QuadTree()
const Box& QuadTree::GetBoundingBox() const const Box& QuadTree::GetBoundingBox() const
// **************************************** // ****************************************
{ {
if (_boundingBox.IsEmpty()) { if (_boundingBox.isEmpty()) {
Box& boundingBox = ((QuadTree*)this)->_boundingBox; Box& boundingBox = ((QuadTree*)this)->_boundingBox;
if (_ulChild) boundingBox.Merge(_ulChild->GetBoundingBox()); if (_ulChild) boundingBox.merge(_ulChild->GetBoundingBox());
if (_urChild) boundingBox.Merge(_urChild->GetBoundingBox()); if (_urChild) boundingBox.merge(_urChild->GetBoundingBox());
if (_llChild) boundingBox.Merge(_llChild->GetBoundingBox()); if (_llChild) boundingBox.merge(_llChild->GetBoundingBox());
if (_lrChild) boundingBox.Merge(_lrChild->GetBoundingBox()); if (_lrChild) boundingBox.merge(_lrChild->GetBoundingBox());
for_each_go(go, _goSet.GetElements()) { for_each_go(go, _goSet.GetElements()) {
boundingBox.Merge(go->GetBoundingBox()); boundingBox.merge(go->GetBoundingBox());
end_for; end_for;
} }
} }
@ -247,8 +247,8 @@ void QuadTree::Insert(Go* go)
QuadTree* parent = child; QuadTree* parent = child;
while (parent) { while (parent) {
parent->_size++; parent->_size++;
if (parent->IsEmpty() || !parent->_boundingBox.IsEmpty()) if (parent->IsEmpty() || !parent->_boundingBox.isEmpty())
parent->_boundingBox.Merge(boundingBox); parent->_boundingBox.merge(boundingBox);
parent = parent->_parent; parent = parent->_parent;
} }
if (QUAD_TREE_EXPLODE_THRESHOLD <= child->_size) if (QUAD_TREE_EXPLODE_THRESHOLD <= child->_size)
@ -270,7 +270,7 @@ void QuadTree::Remove(Go* go)
QuadTree* parent = child; QuadTree* parent = child;
while (parent) { while (parent) {
parent->_size--; parent->_size--;
if (parent->_boundingBox.IsConstrainedBy(boundingBox)) if (parent->_boundingBox.isConstrainedBy(boundingBox))
parent->_boundingBox = Box(); parent->_boundingBox = Box();
parent = parent->_parent; parent = parent->_parent;
} }
@ -320,16 +320,16 @@ QuadTree* QuadTree::_GetDeepestChild(const Box& box)
// ************************************************ // ************************************************
{ {
if (_HasBeenExploded()) { if (_HasBeenExploded()) {
if (box.GetXMax() < _x) { if (box.getXMax() < _x) {
if (box.GetYMax() < _y) if (box.getYMax() < _y)
return _llChild->_GetDeepestChild(box); return _llChild->_GetDeepestChild(box);
if (_y < box.GetYMin()) if (_y < box.getYMin())
return _ulChild->_GetDeepestChild(box); return _ulChild->_GetDeepestChild(box);
} }
if (_x < box.GetXMin()) { if (_x < box.getXMin()) {
if (box.GetYMax() < _y) if (box.getYMax() < _y)
return _lrChild->_GetDeepestChild(box); return _lrChild->_GetDeepestChild(box);
if (_y < box.GetYMin()) if (_y < box.getYMin())
return _urChild->_GetDeepestChild(box); return _urChild->_GetDeepestChild(box);
} }
} }
@ -353,7 +353,7 @@ QuadTree* QuadTree::_GetFirstQuadTree() const
QuadTree* QuadTree::_GetFirstQuadTree(const Box& area) const QuadTree* QuadTree::_GetFirstQuadTree(const Box& area) const
// ********************************************************* // *********************************************************
{ {
if (GetBoundingBox().Intersect(area)) { if (GetBoundingBox().intersect(area)) {
if (!_goSet.IsEmpty()) return (QuadTree*)this; if (!_goSet.IsEmpty()) return (QuadTree*)this;
QuadTree* quadTree = NULL; QuadTree* quadTree = NULL;
if (_HasBeenExploded()) { if (_HasBeenExploded()) {
@ -433,8 +433,8 @@ void QuadTree::_Explode()
// ********************** // **********************
{ {
if (!_HasBeenExploded()) { if (!_HasBeenExploded()) {
_x = GetBoundingBox().GetXCenter(); _x = GetBoundingBox().getXCenter();
_y = GetBoundingBox().GetYCenter(); _y = GetBoundingBox().getYCenter();
_ulChild = new QuadTree(this); _ulChild = new QuadTree(this);
_urChild = new QuadTree(this); _urChild = new QuadTree(this);
_llChild = new QuadTree(this); _llChild = new QuadTree(this);
@ -741,11 +741,11 @@ QuadTree_GosUnder::Locator::Locator(const QuadTree* quadTree, const Box& area)
_currentQuadTree(NULL), _currentQuadTree(NULL),
_goLocator() _goLocator()
{ {
if (_quadTree && !_area.IsEmpty()) { if (_quadTree && !_area.isEmpty()) {
_currentQuadTree = _quadTree->_GetFirstQuadTree(_area); _currentQuadTree = _quadTree->_GetFirstQuadTree(_area);
if (_currentQuadTree) { if (_currentQuadTree) {
_goLocator = _currentQuadTree->_GetGoSet().GetElements().GetLocator(); _goLocator = _currentQuadTree->_GetGoSet().GetElements().GetLocator();
if (!GetElement()->GetBoundingBox().Intersect(_area)) Progress(); if (!GetElement()->GetBoundingBox().intersect(_area)) Progress();
} }
} }
} }
@ -799,7 +799,7 @@ void QuadTree_GosUnder::Locator::Progress()
if (_currentQuadTree) if (_currentQuadTree)
_goLocator = _currentQuadTree->_GetGoSet().GetElements().GetLocator(); _goLocator = _currentQuadTree->_GetGoSet().GetElements().GetLocator();
} }
} while (IsValid() && !GetElement()->GetBoundingBox().Intersect(_area)); } while (IsValid() && !GetElement()->GetBoundingBox().intersect(_area));
} }
} }

View File

@ -49,13 +49,13 @@ Reference* Reference::Create(Cell* cell, const Name& name, Unit x, Unit y)
Reference* Reference::Create(Cell* cell, const Name& name, const Point& point) Reference* Reference::Create(Cell* cell, const Name& name, const Point& point)
// *************************************************************************** // ***************************************************************************
{ {
return Create(cell,name,point.GetX(),point.GetY()); return Create(cell,name,point.getX(),point.getY());
} }
Box Reference::GetBoundingBox() const Box Reference::GetBoundingBox() const
// *********************************** // ***********************************
{ {
return Box(_point).Inflate(_extend); return Box(_point).inflate(_extend);
} }
void Reference::Translate(const Unit& dx, const Unit& dy) void Reference::Translate(const Unit& dx, const Unit& dy)
@ -63,7 +63,7 @@ void Reference::Translate(const Unit& dx, const Unit& dy)
{ {
if ((dx != 0) || (dy != 0)) { if ((dx != 0) || (dy != 0)) {
Invalidate(false); Invalidate(false);
_point.Translate(dx, dy); _point.translate(dx, dy);
} }
} }

View File

@ -84,10 +84,10 @@ class Region_Tile {
public: const Box& GetBoundingBox() const {return _boundingBox;}; public: const Box& GetBoundingBox() const {return _boundingBox;};
public: const Unit& GetXMin() const {return _boundingBox.GetXMin();}; public: const Unit& GetXMin() const {return _boundingBox.getXMin();};
public: const Unit& GetYMin() const {return _boundingBox.GetYMin();}; public: const Unit& GetYMin() const {return _boundingBox.getYMin();};
public: const Unit& GetXMax() const {return _boundingBox.GetXMax();}; public: const Unit& GetXMax() const {return _boundingBox.getXMax();};
public: const Unit& GetYMax() const {return _boundingBox.GetYMax();}; public: const Unit& GetYMax() const {return _boundingBox.getYMax();};
public: Region_Tile* GetTileAt(const Point& point) const; public: Region_Tile* GetTileAt(const Point& point) const;
public: Region_Tile* GetNonVoidTileAt(const Point& point) const; public: Region_Tile* GetNonVoidTileAt(const Point& point) const;
@ -106,7 +106,7 @@ class Region_Tile {
// ********** // **********
public: bool IsVoid() const {return _isVoid;}; public: bool IsVoid() const {return _isVoid;};
public: bool Contains(const Point& point) const; public: bool contains(const Point& point) const;
// Updators // Updators
// ******** // ********
@ -163,7 +163,7 @@ Region_Tile::Region_Tile(const Box& boundingBox, bool isVoid)
_topTile(NULL), _topTile(NULL),
_rightTile(NULL) _rightTile(NULL)
{ {
if (boundingBox.IsEmpty()) if (boundingBox.isEmpty())
throw Error("Can't create " + _TName("Region::Tile") + " : empty bounding box"); throw Error("Can't create " + _TName("Region::Tile") + " : empty bounding box");
} }
@ -172,23 +172,23 @@ Region_Tile::~Region_Tile()
{ {
} }
bool Region_Tile::Contains(const Point& point) const bool Region_Tile::contains(const Point& point) const
// ************************************************* // *************************************************
{ {
return ((GetXMin() <= point.GetX()) && return ((GetXMin() <= point.getX()) &&
(GetYMin() <= point.GetY()) && (GetYMin() <= point.getY()) &&
((point.GetX() < GetXMax()) || (!_rightTile && (point.GetX() == GetXMax()))) && ((point.getX() < GetXMax()) || (!_rightTile && (point.getX() == GetXMax()))) &&
((point.GetY() < GetYMax()) || (!_topTile && (point.GetY() == GetYMax())))); ((point.getY() < GetYMax()) || (!_topTile && (point.getY() == GetYMax()))));
} }
Region_Tile* Region_Tile::GetTileAt(const Point& point) const Region_Tile* Region_Tile::GetTileAt(const Point& point) const
// ********************************************************** // **********************************************************
{ {
if (Contains(point)) return (Region_Tile*)this; if (contains(point)) return (Region_Tile*)this;
if (_topTile && (GetYMax() <= point.GetY())) return _topTile->GetTileAt(point); if (_topTile && (GetYMax() <= point.getY())) return _topTile->GetTileAt(point);
if (_leftTile && (point.GetX() < GetXMin())) return _leftTile->GetTileAt(point); if (_leftTile && (point.getX() < GetXMin())) return _leftTile->GetTileAt(point);
return NULL; return NULL;
} }
@ -196,14 +196,14 @@ Region_Tile* Region_Tile::GetTileAt(const Point& point) const
Region_Tile* Region_Tile::GetNonVoidTileAt(const Point& point) const Region_Tile* Region_Tile::GetNonVoidTileAt(const Point& point) const
// ***************************************************************** // *****************************************************************
{ {
if (Contains(point)) { if (contains(point)) {
if (!_isVoid) return (Region_Tile*)this; if (!_isVoid) return (Region_Tile*)this;
if ((GetXMin() < point.GetX()) && (GetYMin() < point.GetY())) return NULL; if ((GetXMin() < point.getX()) && (GetYMin() < point.getY())) return NULL;
} }
if (_topTile && (GetYMax() <= point.GetY())) return _topTile->GetNonVoidTileAt(point); if (_topTile && (GetYMax() <= point.getY())) return _topTile->GetNonVoidTileAt(point);
if (_leftTile && (point.GetX() <= GetXMin())) return _leftTile->GetNonVoidTileAt(point); if (_leftTile && (point.getX() <= GetXMin())) return _leftTile->GetNonVoidTileAt(point);
return NULL; return NULL;
} }
@ -361,7 +361,7 @@ bool Region_Tile::MergeLeftTile(Region* region)
_leftTile = uselessTile->_leftTile; _leftTile = uselessTile->_leftTile;
_bottomTile = uselessTile->_bottomTile; _bottomTile = uselessTile->_bottomTile;
_boundingBox.Merge(uselessTile->_boundingBox); _boundingBox.merge(uselessTile->_boundingBox);
if (region->_GetTopLeftTile() == uselessTile) region->_SetTopLeftTile(this); if (region->_GetTopLeftTile() == uselessTile) region->_SetTopLeftTile(this);
@ -403,7 +403,7 @@ bool Region_Tile::MergeBottomTile(Region* region)
_leftTile = uselessTile->_leftTile; _leftTile = uselessTile->_leftTile;
_bottomTile = uselessTile->_bottomTile; _bottomTile = uselessTile->_bottomTile;
_boundingBox.Merge(uselessTile->_boundingBox); _boundingBox.merge(uselessTile->_boundingBox);
if (region->_GetBottomRightTile() == uselessTile) region->_SetBottomRightTile(this); if (region->_GetBottomRightTile() == uselessTile) region->_SetBottomRightTile(this);
@ -445,7 +445,7 @@ bool Region_Tile::MergeTopTile(Region* region)
_topTile = uselessTile->_topTile; _topTile = uselessTile->_topTile;
_rightTile = uselessTile->_rightTile; _rightTile = uselessTile->_rightTile;
_boundingBox.Merge(uselessTile->_boundingBox); _boundingBox.merge(uselessTile->_boundingBox);
if (region->_GetTopLeftTile() == uselessTile) region->_SetTopLeftTile(this); if (region->_GetTopLeftTile() == uselessTile) region->_SetTopLeftTile(this);
@ -487,7 +487,7 @@ bool Region_Tile::MergeRightTile(Region* region)
_topTile = uselessTile->_topTile; _topTile = uselessTile->_topTile;
_rightTile = uselessTile->_rightTile; _rightTile = uselessTile->_rightTile;
_boundingBox.Merge(uselessTile->_boundingBox); _boundingBox.merge(uselessTile->_boundingBox);
if (region->_GetBottomRightTile() == uselessTile) region->_SetBottomRightTile(this); if (region->_GetBottomRightTile() == uselessTile) region->_SetBottomRightTile(this);
@ -1285,7 +1285,7 @@ Region_TilesUnder::Region_TilesUnder(const Region* region, const Box& area, Regi
_region(region), _region(region),
_startTile(startTile) _startTile(startTile)
{ {
_area = area.GetIntersection(region->GetBoundingBox()); _area = area.getIntersection(region->GetBoundingBox());
} }
Region_TilesUnder::Region_TilesUnder(const Region_TilesUnder& tiles) Region_TilesUnder::Region_TilesUnder(const Region_TilesUnder& tiles)
@ -1355,10 +1355,10 @@ Region_TilesUnder::Locator::Locator(const Region* region, const Box& area, Regio
_startTile(startTile), _startTile(startTile),
_tileStack() _tileStack()
{ {
if (_region && !_area.IsEmpty()) { if (_region && !_area.isEmpty()) {
Region_Tile* tile = _region->_GetTileAt(Point(_area.GetXMax(), _area.GetYMin()), _startTile); Region_Tile* tile = _region->_GetTileAt(Point(_area.getXMax(), _area.getYMin()), _startTile);
while (tile && (_area.GetXMin() < tile->GetXMax())) { while (tile && (_area.getXMin() < tile->GetXMax())) {
while (tile && (tile->GetYMax() <= _area.GetYMin())) tile = tile->_topTile; while (tile && (tile->GetYMax() <= _area.getYMin())) tile = tile->_topTile;
if (tile) { if (tile) {
if (_tileSet.find(tile) == _tileSet.end()) { if (_tileSet.find(tile) == _tileSet.end()) {
_tileSet.insert(tile); _tileSet.insert(tile);
@ -1414,13 +1414,13 @@ void Region_TilesUnder::Locator::Progress()
if (!_tileStack.empty()) { if (!_tileStack.empty()) {
Region_Tile* tile = _tileStack.top(); Region_Tile* tile = _tileStack.top();
_tileStack.pop(); _tileStack.pop();
Unit xMin = max(tile->GetXMin(), _area.GetXMin()); Unit xMin = max(tile->GetXMin(), _area.getXMin());
Unit xMax = tile->GetXMax(); Unit xMax = tile->GetXMax();
Region_Tile* topTile = tile->_topTile; Region_Tile* topTile = tile->_topTile;
while (topTile && (xMin < topTile->GetXMax())) { while (topTile && (xMin < topTile->GetXMax())) {
if ((topTile->GetXMin() <= _area.GetXMax()) && if ((topTile->GetXMin() <= _area.getXMax()) &&
(topTile->GetYMin() <= _area.GetYMax()) && (topTile->GetYMin() <= _area.getYMax()) &&
(min(topTile->GetXMax(), _area.GetXMax()) <= xMax)) { (min(topTile->GetXMax(), _area.getXMax()) <= xMax)) {
if (_tileSet.find(topTile) == _tileSet.end()) { if (_tileSet.find(topTile) == _tileSet.end()) {
_tileSet.insert(topTile); _tileSet.insert(topTile);
_tileStack.push(topTile); _tileStack.push(topTile);
@ -1601,7 +1601,7 @@ Region_BoxesUnder::Locator::Locator(const Region* region, const Box& area)
{ {
if (_region) { if (_region) {
_tileLocator = _tileLocator =
(_area.IsEmpty()) ? (_area.isEmpty()) ?
_region->_GetTiles().GetSubSet(!Region_Tile::GetIsVoidFilter()).GetLocator() : _region->_GetTiles().GetSubSet(!Region_Tile::GetIsVoidFilter()).GetLocator() :
_region->_GetTilesUnder(_area).GetSubSet(!Region_Tile::GetIsVoidFilter()).GetLocator(); _region->_GetTilesUnder(_area).GetSubSet(!Region_Tile::GetIsVoidFilter()).GetLocator();
} }
@ -1818,7 +1818,7 @@ Region_VoidBoxesUnder::Locator::Locator(const Region* region, const Box& area)
{ {
if (_region) { if (_region) {
_tileLocator = _tileLocator =
(_area.IsEmpty()) ? (_area.isEmpty()) ?
_region->_GetTiles().GetSubSet(Region_Tile::GetIsVoidFilter()).GetLocator() : _region->_GetTiles().GetSubSet(Region_Tile::GetIsVoidFilter()).GetLocator() :
_region->_GetTilesUnder(_area).GetSubSet(Region_Tile::GetIsVoidFilter()).GetLocator(); _region->_GetTilesUnder(_area).GetSubSet(Region_Tile::GetIsVoidFilter()).GetLocator();
} }
@ -2443,7 +2443,7 @@ Region::Region(const Region& region)
{ {
// keep trace (as void tile) of the initial bounding box // keep trace (as void tile) of the initial bounding box
Box initialBoundingBox = region.GetBoundingBox(); Box initialBoundingBox = region.GetBoundingBox();
if (! initialBoundingBox.IsEmpty()) { if (! initialBoundingBox.isEmpty()) {
_bottomRightTile = new Tile(region.GetBoundingBox(), true); _bottomRightTile = new Tile(region.GetBoundingBox(), true);
_topLeftTile = _bottomRightTile; _topLeftTile = _bottomRightTile;
for_each_box(box, region.GetBoxes()) { for_each_box(box, region.GetBoxes()) {
@ -2465,7 +2465,7 @@ Region& Region::operator=(const Region& region)
Clear(); Clear();
// keep trace (as void tile) of the initial bounding box // keep trace (as void tile) of the initial bounding box
Box initialBoundingBox = region.GetBoundingBox(); Box initialBoundingBox = region.GetBoundingBox();
if (! initialBoundingBox.IsEmpty()) { if (! initialBoundingBox.isEmpty()) {
_bottomRightTile = new Tile (initialBoundingBox, true); _bottomRightTile = new Tile (initialBoundingBox, true);
_topLeftTile = _bottomRightTile; _topLeftTile = _bottomRightTile;
for_each_box(box, region.GetBoxes()) { for_each_box(box, region.GetBoxes()) {
@ -2481,7 +2481,7 @@ Box Region::GetBoundingBox() const
{ {
Box boundingBox; Box boundingBox;
if (_bottomRightTile) boundingBox = _bottomRightTile->GetBoundingBox(); if (_bottomRightTile) boundingBox = _bottomRightTile->GetBoundingBox();
if (_topLeftTile) boundingBox.Merge(_topLeftTile->GetBoundingBox()); if (_topLeftTile) boundingBox.merge(_topLeftTile->GetBoundingBox());
return boundingBox; return boundingBox;
} }
@ -2566,15 +2566,15 @@ bool Region::IsEmpty() const
bool Region::Contains(const Point& point) const bool Region::Contains(const Point& point) const
// ******************************************** // ********************************************
{ {
return GetBoundingBox().Contains(point) && _GetNonVoidTileAt(point); return GetBoundingBox().contains(point) && _GetNonVoidTileAt(point);
} }
bool Region::Contains(const Box& box) const bool Region::Contains(const Box& box) const
// **************************************** // ****************************************
{ {
if (box.IsPonctual()) return Contains(box.GetCenter()); if (box.isPonctual()) return Contains(box.getCenter());
return GetBoundingBox().Contains(box) && return GetBoundingBox().contains(box) &&
Region_TilesUnder (this, Box(box).Inflate(-1)) Region_TilesUnder (this, Box(box).inflate(-1))
.GetSubSet(Tile::GetIsVoidFilter()).IsEmpty(); .GetSubSet(Tile::GetIsVoidFilter()).IsEmpty();
} }
@ -2592,9 +2592,9 @@ bool Region::Contains(const Region& region) const
bool Region::Intersect(const Box& box) const bool Region::Intersect(const Box& box) const
// ***************************************** // *****************************************
{ {
if (box.IsPonctual()) return Contains(box.GetCenter()); if (box.isPonctual()) return contains(box.getCenter());
if (! GetBoundingBox().Intersect(box)) return false; if (! GetBoundingBox().Intersect(box)) return false;
if (! Region_TilesUnder (this, Box(box).Inflate(1)) if (! Region_TilesUnder (this, Box(box).inflate(1))
.GetSubSet(! Tile::GetIsVoidFilter()).IsEmpty()) return true; .GetSubSet(! Tile::GetIsVoidFilter()).IsEmpty()) return true;
return false; return false;
} }
@ -2651,7 +2651,7 @@ Region& Region::Clear()
Region& Region::Fill(const Box& box) Region& Region::Fill(const Box& box)
// ********************************* // *********************************
{ {
if (box.IsEmpty() || !box.GetWidth() || !box.GetHeight()) return *this; if (box.isEmpty() || !box.getWidth() || !box.getHeight()) return *this;
if (!_bottomRightTile) { if (!_bottomRightTile) {
_bottomRightTile = new Tile(box); _bottomRightTile = new Tile(box);
@ -2659,11 +2659,11 @@ Region& Region::Fill(const Box& box)
return *this; return *this;
} }
if (!GetBoundingBox().Contains(box)) if (!GetBoundingBox().contains(box))
_Update(box, false); _Update(box, false);
else { else {
Tile* startTile = _GetStartTile(_GetTileAt(Point(box.GetXMax(), box.GetYMin()))); Tile* startTile = _GetStartTile(_GetTileAt(Point(box.getXMax(), box.getYMin())));
GenericCollection<Tile*> tiles = _GetTilesUnder(Box(box).Inflate(0, 0, -1, -1), startTile); GenericCollection<Tile*> tiles = _GetTilesUnder(Box(box).inflate(0, 0, -1, -1), startTile);
if (!tiles.GetSubSet(Tile::GetIsVoidFilter()).IsEmpty()) _Update(box, false, startTile); if (!tiles.GetSubSet(Tile::GetIsVoidFilter()).IsEmpty()) _Update(box, false, startTile);
} }
@ -2691,12 +2691,12 @@ Region& Region::Groove(const Box& box)
{ {
if (!_bottomRightTile) return *this; if (!_bottomRightTile) return *this;
Box correctedBox = GetBoundingBox().GetIntersection(box); Box correctedBox = GetBoundingBox().getIntersection(box);
if (correctedBox.IsEmpty() || !correctedBox.GetWidth() || !correctedBox.GetHeight()) return *this; if (correctedBox.isEmpty() || !correctedBox.getWidth() || !correctedBox.getHeight()) return *this;
Tile* startTile = _GetStartTile(_GetTileAt(Point(correctedBox.GetXMax(), correctedBox.GetYMin()))); Tile* startTile = _GetStartTile(_GetTileAt(Point(correctedBox.getXMax(), correctedBox.getYMin())));
GenericCollection<Tile*> tiles = _GetTilesUnder(Box(correctedBox).Inflate(0, 0, -1, -1), startTile); GenericCollection<Tile*> tiles = _GetTilesUnder(Box(correctedBox).inflate(0, 0, -1, -1), startTile);
if (!tiles.GetSubSet(!Tile::GetIsVoidFilter()).IsEmpty()) _Update(box, true, startTile); if (!tiles.GetSubSet(!Tile::GetIsVoidFilter()).IsEmpty()) _Update(box, true, startTile);
return *this; return *this;
@ -2737,19 +2737,19 @@ Region& Region::Inflate(const Unit& quantity)
end_for; end_for;
} }
for_each_box(box, GetCollection(boxList)) { for_each_box(box, GetCollection(boxList)) {
Fill(box.Inflate(quantity)); Fill(box.inflate(quantity));
end_for; end_for;
} }
} }
else if (quantity < 0) { else if (quantity < 0) {
_GrowthToFit(GetBoundingBox().Inflate(GetUnit(1))); _GrowthToFit(GetBoundingBox().inflate(GetUnit(1)));
list<Box> boxList; list<Box> boxList;
for_each_object(Tile*, tile, Region_Tiles(this).GetSubSet(Tile::GetIsVoidFilter())) { for_each_object(Tile*, tile, Region_Tiles(this).GetSubSet(Tile::GetIsVoidFilter())) {
boxList.push_back(tile->GetBoundingBox()); boxList.push_back(tile->GetBoundingBox());
end_for; end_for;
} }
for_each_box(box, GetCollection(boxList)) { for_each_box(box, GetCollection(boxList)) {
Groove(box.Inflate(-quantity)); Groove(box.inflate(-quantity));
end_for; end_for;
} }
} }
@ -2765,7 +2765,7 @@ Region& Region::Translate(const Unit& dx, const Unit& dy)
set<Tile*> tileSet; set<Tile*> tileSet;
_GetTiles().Fill(tileSet); _GetTiles().Fill(tileSet);
for_each_object(Tile*, tile, GetCollection(tileSet)) { for_each_object(Tile*, tile, GetCollection(tileSet)) {
tile->_boundingBox.Translate(dx, dy); tile->_boundingBox.translate(dx, dy);
end_for; end_for;
} }
} }
@ -2793,7 +2793,7 @@ Record* Region::_GetRecord() const
Region_Tile* Region::_GetTileAt(const Point& point, Tile* startTile) const Region_Tile* Region::_GetTileAt(const Point& point, Tile* startTile) const
// *********************************************************************** // ***********************************************************************
{ {
if (!GetBoundingBox().Contains(point)) return NULL; if (!GetBoundingBox().contains(point)) return NULL;
return (startTile) ? startTile->GetTileAt(point) : _bottomRightTile->GetTileAt(point); return (startTile) ? startTile->GetTileAt(point) : _bottomRightTile->GetTileAt(point);
} }
@ -2801,7 +2801,7 @@ Region_Tile* Region::_GetTileAt(const Point& point, Tile* startTile) const
Region_Tile* Region::_GetNonVoidTileAt(const Point& point, Tile* startTile) const Region_Tile* Region::_GetNonVoidTileAt(const Point& point, Tile* startTile) const
// ****************************************************************************** // ******************************************************************************
{ {
if (!GetBoundingBox().Contains(point)) return NULL; if (!GetBoundingBox().contains(point)) return NULL;
return (startTile) ? startTile->GetNonVoidTileAt(point) : _bottomRightTile->GetNonVoidTileAt(point); return (startTile) ? startTile->GetNonVoidTileAt(point) : _bottomRightTile->GetNonVoidTileAt(point);
} }
@ -2842,39 +2842,39 @@ GenericCollection<Region_Tile*> Region::_GetTilesUnder(const Box& area, Tile* st
void Region::_Split(const Box& box) void Region::_Split(const Box& box)
// ******************************** // ********************************
{ {
if (GetBoundingBox().Intersect(box)) { if (GetBoundingBox().intersect(box)) {
Tile* startTile = _GetStartTile(_GetTileAt(Point(box.GetXMax(), box.GetYMin()))); Tile* startTile = _GetStartTile(_GetTileAt(Point(box.getXMax(), box.getYMin())));
list<Tile*> tileList; list<Tile*> tileList;
Box line = Box(box.GetXMin(), box.GetYMin(), box.GetXMax() - 1, box.GetYMin()); Box line = Box(box.getXMin(), box.getYMin(), box.getXMax() - 1, box.getYMin());
_GetTilesUnder(line, startTile).Fill(tileList); _GetTilesUnder(line, startTile).Fill(tileList);
for_each_object(Tile*, tile, GetCollection(tileList)) { for_each_object(Tile*, tile, GetCollection(tileList)) {
tile->SplitHorizontal(this, box.GetYMin()); tile->SplitHorizontal(this, box.getYMin());
end_for; end_for;
} }
tileList.clear(); tileList.clear();
line = Box(box.GetXMin(), box.GetYMax(), box.GetXMax() - 1, box.GetYMax()); line = Box(box.getXMin(), box.getYMax(), box.getXMax() - 1, box.getYMax());
_GetTilesUnder(line, startTile).Fill(tileList); _GetTilesUnder(line, startTile).Fill(tileList);
for_each_object(Tile*, tile, GetCollection(tileList)) { for_each_object(Tile*, tile, GetCollection(tileList)) {
tile->SplitHorizontal(this, box.GetYMax()); tile->SplitHorizontal(this, box.getYMax());
end_for; end_for;
} }
tileList.clear(); tileList.clear();
line = Box(box.GetXMin(), box.GetYMin(), box.GetXMin(), box.GetYMax() - 1); line = Box(box.getXMin(), box.getYMin(), box.getXMin(), box.getYMax() - 1);
_GetTilesUnder(line, startTile).Fill(tileList); _GetTilesUnder(line, startTile).Fill(tileList);
for_each_object(Tile*, tile, GetCollection(tileList)) { for_each_object(Tile*, tile, GetCollection(tileList)) {
tile->SplitVertical(this, box.GetXMin()); tile->SplitVertical(this, box.getXMin());
end_for; end_for;
} }
tileList.clear(); tileList.clear();
line = Box(box.GetXMax(), box.GetYMin(), box.GetXMax(), box.GetYMax() - 1); line = Box(box.getXMax(), box.getYMin(), box.getXMax(), box.getYMax() - 1);
_GetTilesUnder(line, startTile).Fill(tileList); _GetTilesUnder(line, startTile).Fill(tileList);
for_each_object(Tile*, tile, GetCollection(tileList)) { for_each_object(Tile*, tile, GetCollection(tileList)) {
tile->SplitVertical(this, box.GetXMax()); tile->SplitVertical(this, box.getXMax());
end_for; end_for;
} }
} }
@ -2883,7 +2883,7 @@ void Region::_Split(const Box& box)
void Region::_GrowthToFit(const Box& box) void Region::_GrowthToFit(const Box& box)
// ************************************** // **************************************
{ {
if (box.IsEmpty()) return; if (box.isEmpty()) return;
if (!_bottomRightTile) { if (!_bottomRightTile) {
_bottomRightTile = new Tile(box, true); _bottomRightTile = new Tile(box, true);
@ -2891,10 +2891,10 @@ void Region::_GrowthToFit(const Box& box)
return; return;
} }
if (GetBoundingBox().Contains(box)) return; if (GetBoundingBox().contains(box)) return;
if (box.GetYMin() < GetYMin()) { if (box.getYMin() < GetYMin()) {
Tile* newTile = new Tile(Box(GetXMin(), box.GetYMin(), GetXMax(), GetYMin()), true); Tile* newTile = new Tile(Box(GetXMin(), box.getYMin(), GetXMax(), GetYMin()), true);
Tile* tile = _bottomRightTile; Tile* tile = _bottomRightTile;
while (tile) { while (tile) {
tile->_bottomTile = newTile; tile->_bottomTile = newTile;
@ -2904,8 +2904,8 @@ void Region::_GrowthToFit(const Box& box)
_bottomRightTile = newTile; _bottomRightTile = newTile;
} }
if (GetYMax() < box.GetYMax()) { if (GetYMax() < box.getYMax()) {
Tile* newTile = new Tile(Box(GetXMin(), GetYMax(), GetXMax(), box.GetYMax()), true); Tile* newTile = new Tile(Box(GetXMin(), GetYMax(), GetXMax(), box.getYMax()), true);
Tile* tile = _topLeftTile; Tile* tile = _topLeftTile;
while (tile) { while (tile) {
tile->_topTile = newTile; tile->_topTile = newTile;
@ -2915,8 +2915,8 @@ void Region::_GrowthToFit(const Box& box)
_topLeftTile = newTile; _topLeftTile = newTile;
} }
if (box.GetXMin() < GetXMin()) { if (box.getXMin() < GetXMin()) {
Tile* newTile = new Tile(Box(box.GetXMin(), GetYMin(), GetXMin(), GetYMax()), true); Tile* newTile = new Tile(Box(box.getXMin(), GetYMin(), GetXMin(), GetYMax()), true);
Tile* tile = _topLeftTile; Tile* tile = _topLeftTile;
while (tile) { while (tile) {
tile->_leftTile = newTile; tile->_leftTile = newTile;
@ -2926,8 +2926,8 @@ void Region::_GrowthToFit(const Box& box)
_topLeftTile = newTile; _topLeftTile = newTile;
} }
if (GetXMax() < box.GetXMax()) { if (GetXMax() < box.getXMax()) {
Tile* newTile = new Tile(Box(GetXMax(), GetYMin(), box.GetXMax(), GetYMax()), true); Tile* newTile = new Tile(Box(GetXMax(), GetYMin(), box.getXMax(), GetYMax()), true);
Tile* tile = _bottomRightTile; Tile* tile = _bottomRightTile;
while (tile) { while (tile) {
tile->_rightTile = newTile; tile->_rightTile = newTile;
@ -2941,21 +2941,21 @@ void Region::_GrowthToFit(const Box& box)
void Region::_Update(const Box& box, bool isVoid, Tile* startTile) void Region::_Update(const Box& box, bool isVoid, Tile* startTile)
// ************************************************************** // **************************************************************
{ {
if (box.IsEmpty() || !_bottomRightTile || !box.GetWidth() || !box.GetHeight()) return; if (box.isEmpty() || !_bottomRightTile || !box.getWidth() || !box.getHeight()) return;
if (!GetBoundingBox().Contains(box)) _GrowthToFit(box); if (!GetBoundingBox().contains(box)) _GrowthToFit(box);
_Split(box); _Split(box);
Tile* newTile = new Tile(box, isVoid); Tile* newTile = new Tile(box, isVoid);
list<Tile*> tileList; list<Tile*> tileList;
_GetTilesUnder(Box(box).Inflate(0, 0, -1, -1), startTile).Fill(tileList); _GetTilesUnder(Box(box).inflate(0, 0, -1, -1), startTile).Fill(tileList);
for_each_object(Tile*, tile, GetCollection(tileList)) { for_each_object(Tile*, tile, GetCollection(tileList)) {
if (_topLeftTile == tile) _topLeftTile = newTile; if (_topLeftTile == tile) _topLeftTile = newTile;
if (_bottomRightTile == tile) _bottomRightTile = newTile; if (_bottomRightTile == tile) _bottomRightTile = newTile;
if (tile->GetXMin() == box.GetXMin()) { if (tile->GetXMin() == box.getXMin()) {
if (tile->GetYMin() == box.GetYMin()) { if (tile->GetYMin() == box.getYMin()) {
newTile->_leftTile = tile->_leftTile; newTile->_leftTile = tile->_leftTile;
newTile->_bottomTile = tile->_bottomTile; newTile->_bottomTile = tile->_bottomTile;
} }
@ -2965,15 +2965,15 @@ void Region::_Update(const Box& box, bool isVoid, Tile* startTile)
leftTile = leftTile->_topTile; leftTile = leftTile->_topTile;
} }
} }
if (tile->GetYMin() == box.GetYMin()) { if (tile->GetYMin() == box.getYMin()) {
Tile* bottomTile = tile->_bottomTile; Tile* bottomTile = tile->_bottomTile;
while (bottomTile && (bottomTile->_topTile == tile)) { while (bottomTile && (bottomTile->_topTile == tile)) {
bottomTile->_topTile = newTile; bottomTile->_topTile = newTile;
bottomTile = bottomTile->_rightTile; bottomTile = bottomTile->_rightTile;
} }
} }
if (tile->GetYMax() == box.GetYMax()) { if (tile->GetYMax() == box.getYMax()) {
if (tile->GetXMax() == box.GetXMax()) { if (tile->GetXMax() == box.getXMax()) {
newTile->_topTile = tile->_topTile; newTile->_topTile = tile->_topTile;
newTile->_rightTile = tile->_rightTile; newTile->_rightTile = tile->_rightTile;
} }
@ -2983,7 +2983,7 @@ void Region::_Update(const Box& box, bool isVoid, Tile* startTile)
topTile = topTile->_leftTile; topTile = topTile->_leftTile;
} }
} }
if (tile->GetXMax() == box.GetXMax()) { if (tile->GetXMax() == box.getXMax()) {
Tile* rightTile = tile->_rightTile; Tile* rightTile = tile->_rightTile;
while (rightTile && (rightTile->_leftTile == tile)) { while (rightTile && (rightTile->_leftTile == tile)) {
rightTile->_leftTile = newTile; rightTile->_leftTile = newTile;
@ -3013,8 +3013,8 @@ Region::VerticalEnhancement()
Box maxBox = Box(); Box maxBox = Box();
double area = minArea; double area = minArea;
for_each_box (box, GetBoxes()) { for_each_box (box, GetBoxes()) {
if (! box.IsEmpty()) { if (! box.isEmpty()) {
double a = 1. * box.GetWidth() * box.GetHeight(); double a = 1. * box.getWidth() * box.getHeight();
if (area < a) { if (area < a) {
area = a; area = a;
maxBox = box; maxBox = box;
@ -3022,9 +3022,9 @@ Region::VerticalEnhancement()
} }
end_for; end_for;
} }
if (maxBox.IsEmpty()) break; if (maxBox.isEmpty()) break;
Tile* tile = _GetTileAt (maxBox.GetCenter()); Tile* tile = _GetTileAt (maxBox.getCenter());
if (maxBox.GetWidth() >= GetUnit(2)) { if (maxBox.getWidth() >= GetUnit(2)) {
modif = tile->VerticalEnhancement (this); modif = tile->VerticalEnhancement (this);
} }
result.Fill (tile->GetBoundingBox()); result.Fill (tile->GetBoundingBox());
@ -3059,8 +3059,8 @@ Region::HorizontalEnhancement()
Box maxBox = Box(); Box maxBox = Box();
double area = minArea; double area = minArea;
for_each_box (box, GetBoxes()) { for_each_box (box, GetBoxes()) {
if (! box.IsEmpty()) { if (! box.isEmpty()) {
double a = 1. * box.GetWidth() * box.GetHeight(); double a = 1. * box.getWidth() * box.getHeight();
if (area < a) { if (area < a) {
area = a; area = a;
maxBox = box; maxBox = box;
@ -3068,9 +3068,9 @@ Region::HorizontalEnhancement()
} }
end_for; end_for;
} }
if (maxBox.IsEmpty()) break; if (maxBox.isEmpty()) break;
Tile* tile = _GetTileAt (maxBox.GetCenter()); Tile* tile = _GetTileAt (maxBox.getCenter());
if (maxBox.GetWidth() >= GetUnit(2)) { if (maxBox.getWidth() >= GetUnit(2)) {
modif = tile->HorizontalEnhancement (this); modif = tile->HorizontalEnhancement (this);
} }
result.Fill (tile->GetBoundingBox()); result.Fill (tile->GetBoundingBox());
@ -3099,8 +3099,8 @@ Region::TopBottomFacing (const Box box) const
// dessus et dessous de box // dessus et dessous de box
{ {
Interval result = Interval(); Interval result = Interval();
if (box.IsEmpty()) return result; if (box.isEmpty()) return result;
Tile* tile = _GetTileAt (box.GetCenter()); Tile* tile = _GetTileAt (box.getCenter());
Interval it1 = tile->_GetTopNeighbour (); Interval it1 = tile->_GetTopNeighbour ();
Interval it2 = tile->_GetBottomNeighbour (); Interval it2 = tile->_GetBottomNeighbour ();
return it1.GetIntersection (it2); return it1.GetIntersection (it2);
@ -3113,8 +3113,8 @@ Region::LeftRightFacing (const Box box) const
// a gauche et droite de box // a gauche et droite de box
{ {
Interval result = Interval(); Interval result = Interval();
if (box.IsEmpty()) return result; if (box.isEmpty()) return result;
Tile* tile = _GetTileAt (box.GetCenter()); Tile* tile = _GetTileAt (box.getCenter());
Interval it1 = tile->_GetLeftNeighbour (); Interval it1 = tile->_GetLeftNeighbour ();
Interval it2 = tile->_GetRightNeighbour (); Interval it2 = tile->_GetRightNeighbour ();
return it1.GetIntersection (it2); return it1.GetIntersection (it2);

View File

@ -30,8 +30,8 @@ namespace Hurricane {
RoutingPad::RoutingPad(Net* net, const Point& p, Occurrence occurrence ) RoutingPad::RoutingPad(Net* net, const Point& p, Occurrence occurrence )
// ********************************************************************************** // **********************************************************************************
: Inherit(net), : Inherit(net),
_x(p.GetX()), _x(p.getX()),
_y(p.GetY()), _y(p.getY()),
_occurrence(occurrence) _occurrence(occurrence)
{ {
} }
@ -143,25 +143,25 @@ Point RoutingPad::GetTargetPosition() const
Unit RoutingPad::GetSourceX() const Unit RoutingPad::GetSourceX() const
// ******************************** // ********************************
{ {
return GetSourcePosition().GetX(); return GetSourcePosition().getX();
} }
Unit RoutingPad::GetSourceY() const Unit RoutingPad::GetSourceY() const
// ******************************** // ********************************
{ {
return GetSourcePosition().GetY(); return GetSourcePosition().getY();
} }
Unit RoutingPad::GetTargetX() const Unit RoutingPad::GetTargetX() const
// ******************************** // ********************************
{ {
return GetTargetPosition().GetX(); return GetTargetPosition().getX();
} }
Unit RoutingPad::GetTargetY() const Unit RoutingPad::GetTargetY() const
// ******************************** // ********************************
{ {
return GetTargetPosition().GetY(); return GetTargetPosition().getY();
} }
Point RoutingPad::GetCenter() const Point RoutingPad::GetCenter() const
@ -206,7 +206,7 @@ void RoutingPad::SetPosition(const Unit& x, const Unit& y)
void RoutingPad::SetPosition(const Point& position) void RoutingPad::SetPosition(const Point& position)
// ********************************************* // *********************************************
{ {
SetPosition(position.GetX(), position.GetY()); SetPosition(position.getX(), position.getY());
} }
void RoutingPad::SetOffset(const Unit& x, const Unit& y) void RoutingPad::SetOffset(const Unit& x, const Unit& y)
@ -334,11 +334,11 @@ void RoutingPad::SetExternalComponent(Component* component)
Horizontal* horizontal = dynamic_cast<Horizontal*>(component); Horizontal* horizontal = dynamic_cast<Horizontal*>(component);
if ( horizontal ) { if ( horizontal ) {
SetX ( 0 ); SetX ( 0 );
SetY ( position.GetY() ); SetY ( position.getY() );
} else { } else {
Vertical* vertical = dynamic_cast<Vertical*>(component); Vertical* vertical = dynamic_cast<Vertical*>(component);
if ( vertical ) { if ( vertical ) {
SetX ( position.GetX() ); SetX ( position.getX() );
SetY ( 0 ); SetY ( 0 );
} else } else
SetPosition ( position ); SetPosition ( position );
@ -420,7 +420,7 @@ void RoutingPad::Builder::Scan(InputFile& inputFile, char*& arguments)
DBo* RoutingPad::Builder::CreateDBo() DBo* RoutingPad::Builder::CreateDBo()
// ******************************* // *******************************
{ {
return RoutingPad::Create(GetNet(), GetLayer(), GetX(), GetY(), GetWidth(), GetHeight()); return RoutingPad::Create(GetNet(), GetLayer(), getX(), getY(), GetWidth(), GetHeight());
} }
RoutingPad::Builder ROUTINGPAD_BUILDER("RP"); RoutingPad::Builder ROUTINGPAD_BUILDER("RP");

View File

@ -56,7 +56,7 @@ Cell* Rubber::GetCell() const
Point Rubber::GetCenter() const Point Rubber::GetCenter() const
// **************************** // ****************************
{ {
return GetBoundingBox().GetCenter(); return GetBoundingBox().getCenter();
} }
Point Rubber::GetBarycenter() const Point Rubber::GetBarycenter() const
@ -66,9 +66,9 @@ Point Rubber::GetBarycenter() const
Unit x = 0; Unit x = 0;
Unit y = 0; Unit y = 0;
for_each_hook(hook, GetHooks()) { for_each_hook(hook, GetHooks()) {
Point position = hook->GetComponent()->GetBoundingBox().GetCenter(); Point position = hook->GetComponent()->GetBoundingBox().getCenter();
x += position.GetX() / n; x += position.getX() / n;
y += position.GetY() / n; y += position.getY() / n;
end_for; end_for;
} }
return Point(x,y); return Point(x,y);
@ -77,13 +77,13 @@ Point Rubber::GetBarycenter() const
Box Rubber::GetBoundingBox() const Box Rubber::GetBoundingBox() const
// ******************************* // *******************************
{ {
if (_boundingBox.IsEmpty()) if (_boundingBox.isEmpty())
{ {
Rubber* rubber = const_cast<Rubber*>(this); Rubber* rubber = const_cast<Rubber*>(this);
Box& boundingBox = rubber->_boundingBox; Box& boundingBox = rubber->_boundingBox;
for_each_hook(hook, GetHooks()) { for_each_hook(hook, GetHooks()) {
Point position = hook->GetComponent()->GetBoundingBox().GetCenter(); Point position = hook->GetComponent()->GetBoundingBox().getCenter();
boundingBox.Merge(position); boundingBox.merge(position);
end_for; end_for;
} }
} }
@ -245,14 +245,14 @@ void Rubber::Invalidate(bool propagateFlag)
// **************************************** // ****************************************
{ {
Inherit::Invalidate(false); Inherit::Invalidate(false);
_boundingBox.MakeEmpty(); _boundingBox.makeEmpty();
} }
//bool Rubber::_IsInterceptedBy(View* view, const Point& point, const Unit& aperture) const //bool Rubber::_IsInterceptedBy(View* view, const Point& point, const Unit& aperture) const
//// ************************************************************************************** //// **************************************************************************************
//{ //{
// double x = GetValue(point.GetX()); // double x = GetValue(point.getX());
// double y = GetValue(point.GetY()); // double y = GetValue(point.getY());
// double a = GetValue(aperture); // double a = GetValue(aperture);
// Point origin; // Point origin;
// //
@ -277,12 +277,12 @@ void Rubber::Invalidate(bool propagateFlag)
// default: // default:
// throw Error("Unknown RubberDisplayType"); // throw Error("Unknown RubberDisplayType");
// } // }
// double xo = GetValue(origin.GetX()); // double xo = GetValue(origin.getX());
// double yo = GetValue(origin.GetY()); // double yo = GetValue(origin.getY());
// for_each_hook(hook, GetHooks()) { // for_each_hook(hook, GetHooks()) {
// Point extremity = extremity = hook->GetComponent()->GetBoundingBox().GetCenter(); // Point extremity = extremity = hook->GetComponent()->GetBoundingBox().getCenter();
// double xe = GetValue(extremity.GetX()); // double xe = GetValue(extremity.getX());
// double ye = GetValue(extremity.GetY()); // double ye = GetValue(extremity.getY());
// double xp = xo; // double xp = xo;
// double yp = yo; // double yp = yo;
// if (xo != xe) xp = (((xe - xo) / (ye - yo)) * (y - yo)) + xo; // if (xo != xe) xp = (((xe - xo) / (ye - yo)) * (y - yo)) + xo;
@ -307,7 +307,7 @@ void Rubber::Invalidate(bool propagateFlag)
// { // {
// center = transformation.GetPoint(GetCenter()); // center = transformation.GetPoint(GetCenter());
// for_each_hook(hook, GetHooks()) { // for_each_hook(hook, GetHooks()) {
// Point position = hook->GetComponent()->GetBoundingBox().GetCenter(); // Point position = hook->GetComponent()->GetBoundingBox().getCenter();
// view->DrawLine(center, transformation.GetPoint(position)); // view->DrawLine(center, transformation.GetPoint(position));
// end_for; // end_for;
// } // }
@ -317,7 +317,7 @@ void Rubber::Invalidate(bool propagateFlag)
// { // {
// center = transformation.GetPoint(GetBarycenter()); // center = transformation.GetPoint(GetBarycenter());
// for_each_hook(hook, GetHooks()) { // for_each_hook(hook, GetHooks()) {
// Point position = hook->GetComponent()->GetBoundingBox().GetCenter(); // Point position = hook->GetComponent()->GetBoundingBox().getCenter();
// view->DrawLine(center, transformation.GetPoint(position)); // view->DrawLine(center, transformation.GetPoint(position));
// end_for; // end_for;
// } // }
@ -327,8 +327,8 @@ void Rubber::Invalidate(bool propagateFlag)
// { // {
// center = transformation.GetPoint(GetBarycenter()); // center = transformation.GetPoint(GetBarycenter());
// for_each_hook(hook, GetHooks()) { // for_each_hook(hook, GetHooks()) {
// Point position = hook->GetComponent()->GetBoundingBox().GetCenter(); // Point position = hook->GetComponent()->GetBoundingBox().getCenter();
// Point crosspoint (position.GetX(), center.GetY()); // Point crosspoint (position.getX(), center.getY());
// view->DrawLine(position, crosspoint); // view->DrawLine(position, crosspoint);
// view->DrawLine(crosspoint, center); // view->DrawLine(crosspoint, center);
// end_for; // end_for;
@ -344,7 +344,7 @@ void Rubber::Invalidate(bool propagateFlag)
// //
typedef struct pcmp_s { typedef struct pcmp_s {
bool operator() (const Point& p1, const Point& p2) const { bool operator() (const Point& p1, const Point& p2) const {
return (p1.GetX() < p2.GetX()) || ( (p1.GetX() == p2.GetX()) && (p1.GetY() < p2.GetY()) ); return (p1.getX() < p2.getX()) || ( (p1.getX() == p2.getX()) && (p1.getY() < p2.getY()) );
} }
} pcmp_t; } pcmp_t;
@ -359,7 +359,7 @@ typedef struct pcmp_s {
// { // {
// center = transformation.GetPoint(GetCenter()); // center = transformation.GetPoint(GetCenter());
// for_each_hook(hook, GetHooks()) { // for_each_hook(hook, GetHooks()) {
// Point position = hook->GetComponent()->GetBoundingBox().GetCenter(); // Point position = hook->GetComponent()->GetBoundingBox().getCenter();
// view->DrawLine(center, transformation.GetPoint(position)); // view->DrawLine(center, transformation.GetPoint(position));
// end_for; // end_for;
// } // }
@ -369,7 +369,7 @@ typedef struct pcmp_s {
// { // {
// center = transformation.GetPoint(GetBarycenter()); // center = transformation.GetPoint(GetBarycenter());
// for_each_hook(hook, GetHooks()) { // for_each_hook(hook, GetHooks()) {
// Point position = hook->GetComponent()->GetBoundingBox().GetCenter(); // Point position = hook->GetComponent()->GetBoundingBox().getCenter();
// view->DrawLine(center, transformation.GetPoint(position)); // view->DrawLine(center, transformation.GetPoint(position));
// end_for; // end_for;
// } // }
@ -380,13 +380,13 @@ typedef struct pcmp_s {
// set <Point, pcmp_t> pset; // set <Point, pcmp_t> pset;
// for_each_hook (hook, GetHooks()) // for_each_hook (hook, GetHooks())
// { // {
// Point position = hook->GetComponent()->GetBoundingBox().GetCenter(); // Point position = hook->GetComponent()->GetBoundingBox().getCenter();
// pset.insert (position); // pset.insert (position);
// end_for; // end_for;
// } // }
// center = transformation.GetPoint(GetBarycenter()); // center = transformation.GetPoint(GetBarycenter());
// Unit lastXup = center.GetX(); // Unit lastXup = center.getX();
// Unit lastXlo = center.GetX(); // Unit lastXlo = center.getX();
// for ( // for (
// set<Point, pcmp_t>::iterator pit = pset.begin(); // set<Point, pcmp_t>::iterator pit = pset.begin();
// pit != pset.end(); // pit != pset.end();
@ -394,29 +394,29 @@ typedef struct pcmp_s {
// ) // )
// { // {
// Point position (*pit); // Point position (*pit);
// Point crosspoint (position.GetX(), center.GetY()); // Point crosspoint (position.getX(), center.getY());
// Point connxpoint (center); // Point connxpoint (center);
// if (position.GetY() > center.GetY()) // if (position.getY() > center.getY())
// { // {
// // en haut // // en haut
// if ( (position.GetX() - lastXup) < (position.GetY() - center.GetY()) ) // if ( (position.getX() - lastXup) < (position.getY() - center.getY()) )
// { // {
// crosspoint.SetX (lastXup); // crosspoint.SetX (lastXup);
// crosspoint.SetY (position.GetY()); // crosspoint.SetY (position.getY());
// connxpoint.SetX (lastXup); // connxpoint.SetX (lastXup);
// } // }
// else // else
// lastXup = position.GetX(); // lastXup = position.getX();
// } else { // } else {
// // en bas // // en bas
// if ( (position.GetX() - lastXlo) < (center.GetY() - position.GetY()) ) // if ( (position.getX() - lastXlo) < (center.getY() - position.getY()) )
// { // {
// crosspoint.SetX (lastXlo); // crosspoint.SetX (lastXlo);
// crosspoint.SetY (position.GetY()); // crosspoint.SetY (position.getY());
// connxpoint.SetX (lastXlo); // connxpoint.SetX (lastXlo);
// } // }
// else // else
// lastXlo = position.GetX(); // lastXlo = position.getX();
// } // }
// //
// //

View File

@ -61,8 +61,8 @@ Transformation::Transformation(const Unit& tx, const Unit& ty, const Orientation
Transformation::Transformation(const Point& translation, const Orientation& orientation) Transformation::Transformation(const Point& translation, const Orientation& orientation)
// ************************************************************************************* // *************************************************************************************
: _tx(translation.GetX()), : _tx(translation.getX()),
_ty(translation.GetY()), _ty(translation.getY()),
_orientation(orientation) _orientation(orientation)
{ {
} }
@ -115,13 +115,13 @@ Unit Transformation::GetY(const Unit& x, const Unit& y) const
Unit Transformation::GetX(const Point& point) const Unit Transformation::GetX(const Point& point) const
// ************************************************ // ************************************************
{ {
return GetX(point.GetX(), point.GetY()); return GetX(point.getX(), point.getY());
} }
Unit Transformation::GetY(const Point& point) const Unit Transformation::GetY(const Point& point) const
// ************************************************ // ************************************************
{ {
return GetY(point.GetX(), point.GetY()); return GetY(point.getX(), point.getY());
} }
Unit Transformation::GetDx(const Unit& dx, const Unit& dy) const Unit Transformation::GetDx(const Unit& dx, const Unit& dy) const
@ -145,7 +145,7 @@ Point Transformation::GetPoint(const Unit& x, const Unit& y) const
Point Transformation::GetPoint(const Point& point) const Point Transformation::GetPoint(const Point& point) const
// ***************************************************** // *****************************************************
{ {
return GetPoint(point.GetX(), point.GetY()); return GetPoint(point.getX(), point.getY());
} }
Box Transformation::GetBox(const Unit& x1, const Unit& y1, const Unit& x2, const Unit& y2) const Box Transformation::GetBox(const Unit& x1, const Unit& y1, const Unit& x2, const Unit& y2) const
@ -157,14 +157,14 @@ Box Transformation::GetBox(const Unit& x1, const Unit& y1, const Unit& x2, const
Box Transformation::GetBox(const Point& point1, const Point& point2) const Box Transformation::GetBox(const Point& point1, const Point& point2) const
// *********************************************************************** // ***********************************************************************
{ {
return GetBox(point1.GetX(), point1.GetY(), point2.GetX(), point2.GetY()); return GetBox(point1.getX(), point1.getY(), point2.getX(), point2.getY());
} }
Box Transformation::GetBox(const Box& box) const Box Transformation::GetBox(const Box& box) const
// ********************************************* // *********************************************
{ {
if (box.IsEmpty()) return box; if (box.isEmpty()) return box;
return GetBox(box.GetXMin(), box.GetYMin(), box.GetXMax(), box.GetYMax()); return GetBox(box.getXMin(), box.getYMin(), box.getXMax(), box.getYMax());
} }
Transformation Transformation::GetTransformation(const Transformation& transformation) const Transformation Transformation::GetTransformation(const Transformation& transformation) const

View File

@ -64,7 +64,7 @@ Box Vertical::GetBoundingBox() const
Unit size = GetHalfWidth() + _GetSize(); Unit size = GetHalfWidth() + _GetSize();
Unit extention = _GetExtention(); Unit extention = _GetExtention();
return Box(_x, GetSourceY(), _x, GetTargetY()).Inflate(size, extention); return Box(_x, GetSourceY(), _x, GetTargetY()).inflate(size, extention);
} }
Box Vertical::GetBoundingBox(BasicLayer* basicLayer) const Box Vertical::GetBoundingBox(BasicLayer* basicLayer) const
@ -75,7 +75,7 @@ Box Vertical::GetBoundingBox(BasicLayer* basicLayer) const
Unit size = GetHalfWidth() + _GetSize(basicLayer); Unit size = GetHalfWidth() + _GetSize(basicLayer);
Unit extention = _GetExtention(basicLayer); Unit extention = _GetExtention(basicLayer);
return Box(_x, GetSourceY(), _x, GetTargetY()).Inflate(size, extention); return Box(_x, GetSourceY(), _x, GetTargetY()).inflate(size, extention);
} }
Unit Vertical::GetSourceY() const Unit Vertical::GetSourceY() const