72 static void SetRaster(
double raster ) { m_raster = raster; }
100 flag_targetwire = 0x02,
101 flag_targetpin = 0x04,
102 flag_targetapprox = 0x08,
103 flag_reachable = 0x10,
186 wxASSERT( m_costring[ m_mincostindex ] );
187 return *m_costring[ m_mincostindex ];
194 return m_costring[ m_mincostindex ] != 0;
213 m_pointsperblock = 1024
244 wxASSERT( x >= 0 && x <= m_width );
245 wxASSERT( y >= 0 && y <= m_height );
246 return m_verticaloccupation[ m_widthp1 * y + x ];
252 wxASSERT( x >= 0 && x <= m_width );
253 wxASSERT( y >= 0 && y <= m_height );
254 return m_horizontaloccupation[ m_widthp1 * y + x ];
260 wxASSERT( x >= 0 && x <= m_width );
261 wxASSERT( y >= 0 && y <= m_height );
262 return m_verticaloccupation[ m_widthp1 * y + x ] > 0;
268 wxASSERT( x >= 0 && x <= m_width );
269 wxASSERT( y >= 0 && y <= m_height );
270 return m_horizontaloccupation[ m_widthp1 * y + x ] > 0;
276 wxASSERT( x >= 0 && x <= m_width );
277 wxASSERT( y >= 0 && y <= m_height );
278 wxASSERT( dir >= dir_min && dir <= dir_max );
279 return m_routepoints[ ( m_widthp1 * y + x ) * dir_count + ( dir - dir_min ) ];
297 void SetFlagRect(
const a2dBoundingBox& bbox, RoutePointFlag flag );
309 RoutePoint* routepoints = &GetRoutePoint( x, y, dir_min );
310 routepoints[0].
m_flags |= flag;
311 routepoints[1].
m_flags |= flag;
312 routepoints[2].
m_flags |= flag;
313 routepoints[3].
m_flags |= flag;
327 inline void AddBorderPoint(
328 BorderQueue* queue, RoutePoint* current,
329 int nextx,
int nexty,
341 void DumpOccupation( FILE* file );
383 #if wxART2D_USE_CVGIO
394 #endif //wxART2D_USE_CVGIO
unsigned short * m_horizontaloccupation
occupation counts for horizontal edges ( a 2d array )
This is a priority queue for border points.
RoutePoint * m_routepoints
Routing points.
double m_rasterborder
an extra border in the raster area around the bounding box
unsigned short & GetHorizontalOccupation(int x, int y)
Get an element of the horizontal occupation array.
class to map references to objects stored in XML, in order to make the connection later on...
AllocBlock * m_memory
Current memory allocation block.
virtual void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
Load settings.
unsigned short m_x
coordinates of this point
a2dPin is used in a2dCanvasObject to add pins to it.
BorderPoint * m_next
pointer to the next point with same cost in the queue or to a free point
An entry in the border queue.
Input and output handler for the XmlSer format.
void SetFlagRoutePointAllDirs(int x, int y, RoutePointFlag flag)
Set a flag in the route points for all directions.
const BorderPoint & GetBest()
Get the best border point.
a2dCanvasObject is the base class for Canvas Objects.
vertex list of line and arc segments.
int m_widthp1
width of the routing raster array + 1
unsigned int m_cost
minimum cost to reach this point
int m_heightp1
height of the routing raster array + 1
unsigned m_mincostindex
ring index of the current minimum cost (starting point or ring buffer )
RoutePointDirection
directions for RoutePoint
int m_freememory
Number of free elements in memory allocation block.
a2dWirePolylineL is a polyline that adjusts itself when the objects it connects move ...
RoutePoint & GetRoutePoint(int x, int y, int dir)
Get an element of the route point array.
unsigned char m_prevdir
direction of the previous point
a2dCanvasObject * m_showobject
the show object given in the constructor
static void SetRaster(double raster)
the size of the raster
Class for rerouting wires.
virtual void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
Save settings.
bool IsNotEmpty()
Check if the queue is empty.
Input and output handler for the XmlSer format.
unsigned char m_direction
direction to the source
A 2x3 affine matrix class for 2D transformations.
int m_width
width of the routing raster array
unsigned char m_prevdir
direction of the previous point
static double m_raster
the size of the raster
BorderPoint * m_freelist
The starting point of the free list.
unsigned short & GetVerticalOccupation(int x, int y)
Get an element of the vertical occupation array.
the data structure holding the per point information
unsigned short m_x
coordinates of this point (only set if reachable)
bool m_ok
if true, the raster is initialized
unsigned char m_direction
direction to the source (only set if reachable)
RoutePointFlag
flags for RoutePoint
bool IsHorizontalOccupied(int x, int y)
Is an element of the horizontal occupation array.
The a2dBoundingBox class stores one a2dBoundingBox of a a2dCanvasObject.
double m_rasterinv
the inverse size of the raster
unsigned short * m_verticaloccupation
occupation counts for vertical edges ( a 2d array )
unsigned short m_flags
various flags
int m_rasterminx
the limits of the raster area
int m_height
height of the routing raster array
CloneOptions
options for cloning
unsigned int m_cost
minimum cost to reach this point
bool IsVerticalOccupied(int x, int y)
Is an element of the vertical occupation array.