/*
* vim: ts=4 sw=4 et tw=0 wm=0
*
* libavoid - Fast, Incremental, Object-avoiding Line Router
*
* Copyright (C) 2004-2008 Monash University
*
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* See the file LICENSE.LGPL distributed with the library.
*
* Licensees holding a valid commercial license may use this file in
* accordance with the commercial license agreement provided with the
* library.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* Author(s): Michael Wybrow <mjwybrow@users.sourceforge.net>
*/
#include "libavoid/vertices.h"
#include "libavoid/assertions.h"
namespace Avoid {
, _active(false)
, _inMoveList(false)
, _firstVert(NULL)
{
bool isShape = true;
const bool addToRouterNow = false;
{
if (!_firstVert)
{
_firstVert = node;
}
else
{
//node->lstPrev = last;
//last->lstNext = node;
}
i++;
}
}
{
if (_active)
{
// Destroying a shape without calling removeShape(), so do it now.
_router->removeShape(this);
}
do
{
delete tmp;
}
while (it != _firstVert);
}
{
{
// Reset with the new polygon point.
}
}
{
// Add to shapeRefs list.
// Add points to vertex list.
do
{
}
while (it != _firstVert);
_active = true;
}
{
// Remove from shapeRefs list.
// Remove points from vertex list.
do
{
}
while (it != _firstVert);
_active = false;
}
{
return _active;
}
{
return _firstVert;
}
{
return _lastVert;
}
{
return _id;
}
{
return _poly;
}
{
return _router;
}
{
{
}
}
{
{
// For each vertex.
{
// Remove each visibility edge
(*edge)->alertConns();
delete (*edge);
}
{
// Remove each invisibility edge
delete (*edge);
}
{
// Remove each orthogonal visibility edge
(*edge)->alertConns();
delete (*edge);
}
}
}
{
if (!_inMoveList)
{
_inMoveList = true;
}
else
{
db_printf("WARNING: two moves queued for same shape prior to rerouting."
"\n This is not safe.\n");
}
}
{
_inMoveList = false;
}
{
do
{
{
return curr;
}
}
while (curr != _firstVert);
return NULL;
}
}