KiCad PCB EDA Suite
Loading...
Searching...
No Matches
router_preview_item.cpp
Go to the documentation of this file.
1/*
2 * KiRouter - a push-and-(sometimes-)shove PCB router
3 *
4 * Copyright (C) 2013-2014 CERN
5 * Copyright (C) 2016-2023 KiCad Developers, see AUTHORS.txt for contributors.
6 * Author: Tomasz Wlostowski <[email protected]>
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation, either version 3 of the License, or (at your
11 * option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#include <deque>
23#include <gal/color4d.h>
24
26#include <geometry/shape_rect.h>
28#include <pcb_painter.h>
29#include <trigo.h>
30
31#include "router_preview_item.h"
32
33#include "pns_arc.h"
34#include "pns_line.h"
35#include "pns_segment.h"
36#include "pns_via.h"
37#include "pns_kicad_iface.h"
38
39using namespace KIGFX;
40
41
43 KIGFX::VIEW* aView, int aFlags ) :
45 m_iface( aIface ),
46 m_view( aView ),
47 m_shape( nullptr ),
48 m_hole( nullptr ),
49 m_flags( aFlags )
50{
51 BOARD_ITEM* boardItem = aItem ? aItem->BoardItem() : nullptr;
52
53 // A PNS::SOLID for an edge-cut item must have 0 width for collision calculations, but when
54 // highlighting an edge we want to show it with its parent PCB_SHAPE's shape.
55 if( boardItem && boardItem->IsOnLayer( Edge_Cuts ) )
56 {
57 m_shape = boardItem->GetEffectiveShape()->Clone();
58 }
59 else if( aItem )
60 {
61 m_shape = aItem->Shape()->Clone();
62
63 if( aItem->Hole() )
64 m_hole = aItem->Hole()->Shape()->Clone();
65 }
66
67 m_clearance = -1;
69
70 m_showClearance = false;
71
72 // initialize variables, overwritten by Update( aItem ), if aItem != NULL
74 m_width = ( aFlags & PNS_SEMI_SOLID ) ? 1 : 0;
76
77 if( aItem )
78 Update( aItem );
79}
80
81
83 KIGFX::VIEW* aView ) :
85 m_iface( aIface ),
86 m_view( aView ),
87 m_flags( 0 )
88{
89 m_shape = aShape.Clone();
90 m_hole = nullptr;
91
92 m_clearance = -1;
94
95 m_showClearance = false;
96
97 // initialize variables, overwritten by Update( aItem ), if aItem != NULL
99 m_width = 0;
101}
102
103
105{
106 delete m_shape;
107 delete m_hole;
108}
109
110
112{
114
115 if( const PNS::LINE* l = dyn_cast<const PNS::LINE*>( aItem ) )
116 {
117 if( !l->SegmentCount() )
118 return;
119 }
120 else if( const PNS::VIA* v = dyn_cast<const PNS::VIA*>( aItem ) )
121 {
122 if( v->IsVirtual() )
123 return;
124 }
125
126 if( m_originLayer < 0 )
127 m_originLayer = 0;
128
131 m_color.a = 0.8;
132 m_depth = m_originDepth - ( ( aItem->Layers().Start() + 1 ) * LayerDepthFactor );
133
134 switch( aItem->Kind() )
135 {
138 m_width = static_cast<const PNS::LINE*>( aItem )->Width();
139 break;
140
141 case PNS::ITEM::ARC_T:
143 m_width = static_cast<const PNS::ARC*>( aItem )->Width();
144 break;
145
148 m_width = static_cast<const PNS::SEGMENT*>( aItem )->Width();
149 break;
150
151 case PNS::ITEM::VIA_T:
154 m_width = 0;
155 m_color = COLOR4D( 0.7, 0.7, 0.7, 0.8 );
156 m_depth = m_originDepth - ( static_cast<double>( PCB_LAYER_ID_COUNT ) * LayerDepthFactor );
157
158 delete m_shape;
159 m_shape = nullptr;
160
161 if( aItem->Shape() )
162 m_shape = aItem->Shape()->Clone();
163
164 delete m_hole;
165 m_hole = nullptr;
166
167 if( aItem->Hole() )
168 m_hole = aItem->Hole()->Shape()->Clone();
169
170 break;
171
174 break;
175
176 default:
177 break;
178 }
179
180 if( aItem->Marker() & PNS::MK_VIOLATION )
182
183 if( m_flags & PNS_COLLISION )
184 m_color = COLOR4D( 0, 1, 0, 1 );
185
186 if( m_flags & PNS_HOVER_ITEM )
187 m_color = m_color.WithAlpha( 1.0 );
188}
189
190
192{
193 BOX2I bbox;
194
195 switch( m_type )
196 {
197 case PR_SHAPE:
198 if( m_shape )
199 {
200 bbox = m_shape->BBox();
201 bbox.Inflate( m_width / 2 );
202 }
203
204 if( m_hole )
205 bbox.Merge( m_hole->BBox() );
206
207 return bbox;
208
209 case PR_POINT:
210 bbox = BOX2I ( m_pos - VECTOR2I( 100000, 100000 ), VECTOR2I( 200000, 200000 ) );
211 return bbox;
212
213 default:
214 break;
215 }
216
217 return bbox;
218}
219
220
222{
223 wxCHECK( aL, /* void */ );
224
225 gal->SetIsFill( false );
226
227 for( int s = 0; s < aL->GetSegmentCount(); s++ )
228 {
229 SEG seg = aL->GetSegment( s );
230
231 if( seg.A == seg.B )
232 {
233 gal->SetIsFill( true );
234 gal->SetIsStroke( false );
235 gal->DrawCircle( seg.A, gal->GetLineWidth() / 2 );
236 gal->SetIsFill( false );
237 gal->SetIsStroke( true );
238 }
239 else
240 {
241 gal->DrawLine( seg.A, seg.B );
242 }
243 }
244
245 const SHAPE_LINE_CHAIN* lineChain = dynamic_cast<const SHAPE_LINE_CHAIN*>( aL );
246
247 for( size_t s = 0; lineChain && s < lineChain->ArcCount(); s++ )
248 {
249 const SHAPE_ARC& arc = lineChain->CArcs()[s];
250 EDA_ANGLE start_angle = arc.GetStartAngle();
251 EDA_ANGLE angle = arc.GetCentralAngle();
252
253 gal->DrawArc( arc.GetCenter(), arc.GetRadius(), start_angle, angle);
254 }
255
256 if( aL->IsClosed() )
257 gal->DrawLine( aL->GetSegment( -1 ).B, aL->GetSegment( 0 ).A );
258}
259
260
261void ROUTER_PREVIEW_ITEM::drawShape( const SHAPE* aShape, KIGFX::GAL* gal ) const
262{
263 bool holeDrawn = false;
264 bool showClearance = m_showClearance;
265
266 // Always show clearance when we're in collision, even if the preference is off
267 if( ( m_flags & PNS_COLLISION ) > 0 )
268 showClearance = true;
269
270 switch( aShape->Type() )
271 {
273 {
274 const SHAPE_LINE_CHAIN_BASE* l = (const SHAPE_LINE_CHAIN_BASE*) aShape;
275
276 if( showClearance && m_clearance > 0 )
277 {
278 gal->SetLineWidth( m_width + 2 * m_clearance );
279 drawLineChain( l, gal );
280 }
281
282 gal->SetLayerDepth( m_depth );
283 gal->SetLineWidth( m_width );
284 gal->SetStrokeColor( m_color );
285 gal->SetFillColor( m_color );
286 drawLineChain( l, gal );
287 break;
288 }
289
290 case SH_LINE_CHAIN:
291 {
292 const SHAPE_LINE_CHAIN* l = (const SHAPE_LINE_CHAIN*) aShape;
293 const int w = m_width;
294
295 if( showClearance && m_clearance > 0 )
296 {
297 gal->SetLineWidth( w + 2 * m_clearance );
298 drawLineChain( l, gal );
299 }
300
301 gal->SetLayerDepth( m_depth );
302 gal->SetLineWidth( w );
303 gal->SetStrokeColor( m_color );
304 gal->SetFillColor( m_color );
305 drawLineChain( l, gal );
306 break;
307 }
308
309 case SH_SEGMENT:
310 {
311 const SHAPE_SEGMENT* s = (const SHAPE_SEGMENT*) aShape;
312 const int w = s->GetWidth();
313
314 gal->SetIsStroke( false );
315
316 if( showClearance && m_clearance > 0 )
317 {
318 gal->SetLineWidth( w + 2 * m_clearance );
319 gal->DrawSegment( s->GetSeg().A, s->GetSeg().B, s->GetWidth() + 2 * m_clearance );
320 }
321
322 gal->SetLayerDepth( m_depth );
323 gal->SetLineWidth( w );
324 gal->SetFillColor( m_color );
325 gal->DrawSegment( s->GetSeg().A, s->GetSeg().B, s->GetWidth() );
326 break;
327 }
328
329 case SH_CIRCLE:
330 {
331 const SHAPE_CIRCLE* c = static_cast<const SHAPE_CIRCLE*>( aShape );
332 gal->SetStrokeColor( m_color );
333
334 if( showClearance && m_clearance > 0 )
335 {
336 gal->SetIsStroke( false );
337 gal->DrawCircle( c->GetCenter(), c->GetRadius() + m_clearance );
338 }
339
340 gal->SetLayerDepth( m_depth );
341
342 if( m_hole && dynamic_cast<SHAPE_CIRCLE*>( m_hole ) )
343 {
344 const SHAPE_CIRCLE* h = static_cast<const SHAPE_CIRCLE*>( m_hole );
345 int halfWidth = m_width / 2;
346
347 gal->SetIsStroke( true );
348 gal->SetIsFill( false );
349 gal->SetLineWidth( halfWidth + c->GetRadius() - h->GetRadius() );
350 gal->DrawCircle( c->GetCenter(), ( halfWidth + c->GetRadius() + h->GetRadius() ) / 2 );
351
352 holeDrawn = true;
353 }
354 else
355 {
356 gal->SetIsStroke( m_width ? true : false );
357 gal->SetLineWidth( m_width );
358 gal->SetFillColor( m_color );
359 gal->DrawCircle( c->GetCenter(), c->GetRadius() );
360 }
361
362 break;
363 }
364
365 case SH_RECT:
366 {
367 const SHAPE_RECT* r = (const SHAPE_RECT*) aShape;
368 gal->SetFillColor( m_color );
369
370 if( showClearance && m_clearance > 0 )
371 {
372 VECTOR2I p0( r->GetPosition() ), s( r->GetSize() );
373 gal->SetIsStroke( true );
374 gal->SetLineWidth( 2 * m_clearance );
375 gal->DrawLine( p0, VECTOR2I( p0.x + s.x, p0.y ) );
376 gal->DrawLine( p0, VECTOR2I( p0.x, p0.y + s.y ) );
377 gal->DrawLine( p0 + s , VECTOR2I( p0.x + s.x, p0.y ) );
378 gal->DrawLine( p0 + s, VECTOR2I( p0.x, p0.y + s.y ) );
379 }
380
381 gal->SetLayerDepth( m_depth );
382 gal->SetIsStroke( m_width ? true : false );
383 gal->SetLineWidth( m_width);
384 gal->SetStrokeColor( m_color );
385 gal->DrawRectangle( r->GetPosition(), r->GetPosition() + r->GetSize() );
386
387 break;
388 }
389
390 case SH_SIMPLE:
391 {
392 const SHAPE_SIMPLE* c = (const SHAPE_SIMPLE*) aShape;
393 std::deque<VECTOR2D> polygon = std::deque<VECTOR2D>();
394
395 for( int i = 0; i < c->PointCount(); i++ )
396 {
397 polygon.push_back( c->CDPoint( i ) );
398 }
399
400 gal->SetFillColor( m_color );
401
402 if( showClearance && m_clearance > 0 )
403 {
404 gal->SetIsStroke( true );
405 gal->SetLineWidth( 2 * m_clearance );
406
407 // need the implicit last segment to be explicit for DrawPolyline
408 polygon.push_back( c->CDPoint( 0 ) );
409 gal->DrawPolyline( polygon );
410 }
411
412 gal->SetLayerDepth( m_depth );
413 gal->SetIsStroke( m_width ? true : false );
414 gal->SetLineWidth( m_width );
415 gal->SetStrokeColor( m_color );
416 gal->DrawPolygon( polygon );
417 break;
418 }
419
420 case SH_ARC:
421 {
422 const SHAPE_ARC* arc = static_cast<const SHAPE_ARC*>( aShape );
423 const int w = arc->GetWidth();
424 EDA_ANGLE start_angle = arc->GetStartAngle();
425 EDA_ANGLE angle = arc->GetCentralAngle();
426
427 gal->SetIsFill( false );
428 gal->SetIsStroke( true );
429
430 if( showClearance && m_clearance > 0 )
431 {
432 gal->SetLineWidth( w + 2 * m_clearance );
433 gal->DrawArc( arc->GetCenter(), arc->GetRadius(), start_angle, angle );
434 }
435
436 gal->SetLayerDepth( m_depth );
437 gal->SetStrokeColor( m_color );
438 gal->SetFillColor( m_color );
439 gal->SetLineWidth( w );
440 gal->DrawArc( arc->GetCenter(), arc->GetRadius(), start_angle, angle );
441 break;
442 }
443
444 case SH_COMPOUND:
445 wxFAIL_MSG( wxT( "Router preview item: nested compound shapes not supported" ) );
446 break;
447
448 case SH_POLY_SET:
449 wxFAIL_MSG( wxT( "Router preview item: SHAPE_POLY_SET not supported" ) );
450 break;
451
452 case SH_NULL:
453 break;
454 }
455
456 if( m_hole && !holeDrawn )
457 {
458 gal->SetLayerDepth( m_depth );
459 gal->SetIsStroke( true );
460 gal->SetIsFill( false );
461 gal->SetStrokeColor( m_color );
462 gal->SetLineWidth( 1 );
463
464 SHAPE_CIRCLE* circle = dynamic_cast<SHAPE_CIRCLE*>( m_hole );
465 SHAPE_SEGMENT* slot = dynamic_cast<SHAPE_SEGMENT*>( m_hole );
466
467 if( circle )
468 gal->DrawCircle( circle->GetCenter(), circle->GetRadius() );
469 else if( slot )
470 gal->DrawSegment( slot->GetSeg().A, slot->GetSeg().B, slot->GetWidth() );
471 }
472}
473
474
475void ROUTER_PREVIEW_ITEM::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const
476{
477 GAL* gal = aView->GetGAL();
478 //col.Brighten(0.7);
479
480 if( m_type == PR_SHAPE )
481 {
482 if( !m_shape )
483 return;
484
485 // N.B. The order of draw here is important
486 // Cairo doesn't current support z-ordering, so we need
487 // to draw the clearance first to ensure it is in the background
489
490 //TODO(snh) Add configuration option for the color/alpha here
491 gal->SetStrokeColor( COLOR4D( DARKDARKGRAY ).WithAlpha( 0.9 ) );
492 gal->SetFillColor( COLOR4D( DARKDARKGRAY ).WithAlpha( 0.7 ) );
493 gal->SetIsStroke( m_width ? true : false );
494 gal->SetIsFill( true );
495
496 // Semi-solids (ie: rule areas) which are not in collision are sketched (ie: outline only)
497 if( ( m_flags & PNS_SEMI_SOLID ) > 0 && ( m_flags & PNS_COLLISION ) == 0 )
498 gal->SetIsFill( false );
499
501 {
502 std::vector<const SHAPE*> subshapes;
503 m_shape->GetIndexableSubshapes( subshapes );
504
505 for( const SHAPE* shape : subshapes )
506 drawShape( shape, gal );
507 }
508 else
509 {
510 drawShape( m_shape, gal );
511 }
512 }
513}
514
515
517{
518 auto settings = static_cast<PCB_RENDER_SETTINGS*>( m_view->GetPainter()->GetSettings() );
519
520 COLOR4D color = settings->GetLayerColor( aLayer );
521
522 if( m_flags & PNS_HEAD_TRACE )
523 return color.Saturate( 1.0 );
524 else if( m_flags & PNS_HOVER_ITEM )
525 return color.Brightened( 0.7 );
526
527 return color;
528}
int color
Definition: DXF_plotter.cpp:58
BOX2< VECTOR2I > BOX2I
Definition: box2.h:922
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition: board_item.h:80
virtual bool IsOnLayer(PCB_LAYER_ID aLayer) const
Test to see if this object is on the given layer.
Definition: board_item.h:320
virtual std::shared_ptr< SHAPE > GetEffectiveShape(PCB_LAYER_ID aLayer=UNDEFINED_LAYER, FLASHING aFlash=FLASHING::DEFAULT) const
Some pad shapes can be complex (rounded/chamfered rectangle), even without considering custom shapes.
Definition: board_item.cpp:279
constexpr BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Inflates the rectangle horizontally by dx and vertically by dy.
Definition: box2.h:558
constexpr BOX2< Vec > & Merge(const BOX2< Vec > &aRect)
Modify the position and size of the rectangle in order to contain aRect.
Definition: box2.h:658
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:89
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:104
COLOR4D WithAlpha(double aAlpha) const
Return a color with the same color, but the given alpha.
Definition: color4d.h:311
double a
Alpha component.
Definition: color4d.h:395
Abstract interface for drawing on a 2D-surface.
virtual void DrawPolygon(const std::deque< VECTOR2D > &aPointList)
Draw a polygon.
virtual void SetLayerDepth(double aLayerDepth)
Set the depth of the layer (position on the z-axis)
virtual void SetIsFill(bool aIsFillEnabled)
Enable/disable fill.
virtual void DrawRectangle(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint)
Draw a rectangle.
virtual void SetFillColor(const COLOR4D &aColor)
Set the fill color.
virtual void DrawCircle(const VECTOR2D &aCenterPoint, double aRadius)
Draw a circle using world coordinates.
virtual void SetLineWidth(float aLineWidth)
Set the line width.
virtual void DrawPolyline(const std::deque< VECTOR2D > &aPointList)
Draw a polyline.
virtual void SetStrokeColor(const COLOR4D &aColor)
Set the stroke color.
virtual void SetIsStroke(bool aIsStrokeEnabled)
Enable/disable stroked outlines.
virtual void DrawLine(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint)
Draw a line.
virtual void DrawArc(const VECTOR2D &aCenterPoint, double aRadius, const EDA_ANGLE &aStartAngle, const EDA_ANGLE &aAngle)
Draw an arc.
virtual void DrawSegment(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint, double aWidth)
Draw a rounded segment.
float GetLineWidth() const
Get the line width.
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
PCB specific render settings.
Definition: pcb_painter.h:78
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
Definition: view.h:68
int GetLayerOrder(int aLayer) const
Return rendering order of a particular layer.
Definition: view.cpp:681
GAL * GetGAL() const
Return the #GAL this view is using to draw graphical primitives.
Definition: view.h:203
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
Definition: view.h:221
const SHAPE * Shape() const override
Return the geometrical shape of the item.
Definition: pns_hole.h:69
Base class for PNS router board items.
Definition: pns_item.h:97
const PNS_LAYER_RANGE & Layers() const
Definition: pns_item.h:196
PnsKind Kind() const
Return the type (kind) of the item.
Definition: pns_item.h:167
virtual const SHAPE * Shape() const
Return the geometrical shape of the item.
Definition: pns_item.h:225
@ SEGMENT_T
Definition: pns_item.h:106
virtual HOLE * Hole() const
Definition: pns_item.h:273
virtual BOARD_ITEM * BoardItem() const
Definition: pns_item.h:191
virtual int Marker() const
Definition: pns_item.h:232
Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads,...
Definition: pns_line.h:61
virtual PCB_LAYER_ID GetBoardLayerFromPNSLayer(int aLayer) const =0
int Start() const
Definition: pns_layerset.h:82
ROUTER_PREVIEW_ITEM(const SHAPE &aShape, PNS::ROUTER_IFACE *aIface, KIGFX::VIEW *aView)
static constexpr double LayerDepthFactor
We draw this item on a single layer, but we stack up all the layers from the various components that ...
void Update(const PNS::ITEM *aItem)
const KIGFX::COLOR4D getLayerColor(int aLayer) const
virtual void ViewDraw(int aLayer, KIGFX::VIEW *aView) const override
Draw the parts of the object belonging to layer aLayer.
void drawLineChain(const SHAPE_LINE_CHAIN_BASE *aL, KIGFX::GAL *aGal) const
const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
void drawShape(const SHAPE *aShape, KIGFX::GAL *aGal) const
PNS::ROUTER_IFACE * m_iface
Definition: seg.h:42
VECTOR2I A
Definition: seg.h:49
VECTOR2I B
Definition: seg.h:50
EDA_ANGLE GetCentralAngle() const
Definition: shape_arc.cpp:538
int GetWidth() const
Definition: shape_arc.h:168
double GetRadius() const
Definition: shape_arc.cpp:554
EDA_ANGLE GetStartAngle() const
Definition: shape_arc.cpp:507
const VECTOR2I & GetCenter() const
Definition: shape_arc.cpp:523
virtual void GetIndexableSubshapes(std::vector< const SHAPE * > &aSubshapes) const
Definition: shape.h:115
virtual bool HasIndexableSubshapes() const
Definition: shape.h:108
SHAPE_TYPE Type() const
Return the type of the shape.
Definition: shape.h:98
int GetRadius() const
Definition: shape_circle.h:118
const VECTOR2I GetCenter() const
Definition: shape_circle.h:123
virtual size_t GetSegmentCount() const =0
virtual bool IsClosed() const =0
virtual const SEG GetSegment(int aIndex) const =0
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
const std::vector< SHAPE_ARC > & CArcs() const
size_t ArcCount() const
const VECTOR2I & GetPosition() const
Definition: shape_rect.h:160
const VECTOR2I GetSize() const
Definition: shape_rect.h:168
const SEG & GetSeg() const
int GetWidth() const
Represent a simple polygon consisting of a zero-thickness closed chain of connected line segments.
Definition: shape_simple.h:42
int PointCount() const
Return the number of points (vertices) in this polygon.
Definition: shape_simple.h:88
const VECTOR2D CDPoint(int aIndex) const
Return a given point as a vector with elements of type double.
Definition: shape_simple.h:113
An abstract shape on 2D plane.
Definition: shape.h:126
virtual SHAPE * Clone() const
Return a dynamically allocated copy of the shape.
Definition: shape.h:148
virtual const BOX2I BBox(int aClearance=0) const =0
Compute a bounding box of the shape, with a margin of aClearance a collision.
@ DARKDARKGRAY
Definition: color4d.h:45
@ LAYER_SELECT_OVERLAY
currently selected items overlay
Definition: layer_ids.h:221
@ LAYER_VIAS
Meta control for all vias opacity/visibility.
Definition: layer_ids.h:195
@ Edge_Cuts
Definition: layer_ids.h:112
@ PCB_LAYER_ID_COUNT
Definition: layer_ids.h:135
The Cairo implementation of the graphics abstraction layer.
Definition: color4d.cpp:247
@ MK_VIOLATION
Definition: pns_item.h:43
#define PNS_HEAD_TRACE
#define PNS_SEMI_SOLID
#define PNS_HOVER_ITEM
#define PNS_COLLISION
@ SH_POLY_SET
set of polygons (with holes, etc.)
Definition: shape.h:52
@ SH_RECT
axis-aligned rectangle
Definition: shape.h:47
@ SH_CIRCLE
circle
Definition: shape.h:50
@ SH_SIMPLE
simple polygon
Definition: shape.h:51
@ SH_NULL
empty shape (no shape...),
Definition: shape.h:55
@ SH_SEGMENT
line segment
Definition: shape.h:48
@ SH_ARC
circular arc
Definition: shape.h:54
@ SH_POLY_SET_TRIANGLE
a single triangle belonging to a POLY_SET triangulation
Definition: shape.h:56
@ SH_LINE_CHAIN
line chain (polyline)
Definition: shape.h:49
@ SH_COMPOUND
compound shape, consisting of multiple simple shapes
Definition: shape.h:53
@ NOT_USED
the 3d code uses this value
Definition: typeinfo.h:79
VECTOR2< int32_t > VECTOR2I
Definition: vector2d.h:691