Ejemplo n.º 1
0
wxPoint
Group::GetTopLeft(List<Shape *> *shapes) const
{
	int min_x = 0, min_y = 0;
	List<Shape *>::Iterator i = shapes == NULL ? ChildIterator() : shapes->Iterate();
	if (!i)
	{
		wxPoint pos = (*i)->GetPosition();
		min_x = pos.x, min_y = pos.y;
		for (i++; !i; i++)
		{
			wxPoint pos = (*i)->GetPosition();
			if (pos.x < min_x)
			{
				min_x = pos.x;
			}
			if (pos.y < min_y)
			{
				min_y = pos.y;
			}
		}
	}
	return wxPoint(min_x, min_y);
}
Ejemplo n.º 2
0
 //---------------------------------------------------------------------
 OverlayContainer::ChildIterator OverlayContainer::getChildIterator(void)
 {
     return ChildIterator(mChildren.begin(), mChildren.end());
 }
Ejemplo n.º 3
0
Archivo: tree.hpp Proyecto: Awilg/go-ai
 ChildIterator childEnd(Node* n) {
     assert(getIndexOf(n) < max_nodes);
     return ChildIterator(*this, *n, n->num_children);
 }
Ejemplo n.º 4
0
Archivo: tree.hpp Proyecto: Awilg/go-ai
 ChildIterator childBegin(Node* n) {
     assert(getIndexOf(n) < max_nodes);
     return ChildIterator(*this, *n, 0);
 }
Ejemplo n.º 5
0
Bone::ChildIterator Bone::getChildIterator()
{
	return ChildIterator(mChildrenById);
}
Ejemplo n.º 6
0
 static ChildIteratorType child_end(NodeType *T) {
   return ChildIterator(T->getEdges().end(), true);
 }
Ejemplo n.º 7
0
 static ChildIteratorType child_begin(NodeType *T) {
   return ChildIterator(T->getEdges().begin(), false);
 }