KiCad PCB EDA Suite
SEG Class Reference

#include <seg.h>

Public Types

using ecoord = VECTOR2I::extended_type
 

Public Member Functions

 SEG ()
 Create an empty (0, 0) segment. More...
 
 SEG (int aX1, int aY1, int aX2, int aY2)
 Create a segment between (aX1, aY1) and (aX2, aY2). More...
 
 SEG (const VECTOR2I &aA, const VECTOR2I &aB)
 Create a segment between (aA) and (aB). More...
 
 SEG (const VECTOR2I &aA, const VECTOR2I &aB, int aIndex)
 Create a segment between (aA) and (aB), referenced to a multi-segment shape. More...
 
 SEG (const SEG &aSeg)
 Copy constructor. More...
 
SEGoperator= (const SEG &aSeg)
 
bool operator== (const SEG &aSeg) const
 
bool operator!= (const SEG &aSeg) const
 
VECTOR2I LineProject (const VECTOR2I &aP) const
 Compute the perpendicular projection point of aP on a line passing through ends of the segment. More...
 
int Side (const VECTOR2I &aP) const
 Determine on which side of directed line passing via segment ends point aP lies. More...
 
int LineDistance (const VECTOR2I &aP, bool aDetermineSide=false) const
 Return the closest Euclidean distance between point aP and the line defined by the ends of segment (this). More...
 
double AngleDegrees (const SEG &aOther) const
 Determine the smallest angle between two segments (result in degrees) More...
 
const VECTOR2I NearestPoint (const VECTOR2I &aP) const
 Compute a point on the segment (this) that is closest to point aP. More...
 
const VECTOR2I NearestPoint (const SEG &aSeg) const
 Compute a point on the segment (this) that is closest to any point on aSeg. More...
 
const VECTOR2I ReflectPoint (const VECTOR2I &aP) const
 Reflect a point using this segment as axis. More...
 
OPT_VECTOR2I Intersect (const SEG &aSeg, bool aIgnoreEndpoints=false, bool aLines=false) const
 Compute intersection point of segment (this) with segment aSeg. More...
 
OPT_VECTOR2I IntersectLines (const SEG &aSeg) const
 Compute the intersection point of lines passing through ends of (this) and aSeg. More...
 
SEG PerpendicularSeg (const VECTOR2I &aP) const
 Compute a segment perpendicular to this one, passing through point aP. More...
 
SEG ParallelSeg (const VECTOR2I &aP) const
 Compute a segment parallel to this one, passing through point aP. More...
 
bool Collide (const SEG &aSeg, int aClearance, int *aActual=nullptr) const
 
ecoord SquaredDistance (const SEG &aSeg) const
 
int Distance (const SEG &aSeg) const
 Compute minimum Euclidean distance to segment aSeg. More...
 
ecoord SquaredDistance (const VECTOR2I &aP) const
 
int Distance (const VECTOR2I &aP) const
 Compute minimum Euclidean distance to point aP. More...
 
void CanonicalCoefs (ecoord &qA, ecoord &qB, ecoord &qC) const
 
bool Collinear (const SEG &aSeg) const
 Check if segment aSeg lies on the same line as (this). More...
 
bool ApproxCollinear (const SEG &aSeg) const
 
bool ApproxParallel (const SEG &aSeg) const
 
bool ApproxPerpendicular (const SEG &aSeg) const
 
bool Overlaps (const SEG &aSeg) const
 
bool Contains (const SEG &aSeg) const
 
int Length () const
 Return the length (this). More...
 
ecoord SquaredLength () const
 
ecoord TCoef (const VECTOR2I &aP) const
 
int Index () const
 Return the index of this segment in its parent shape (applicable only to non-local segments). More...
 
bool Contains (const VECTOR2I &aP) const
 
void Reverse ()
 
SEG Reversed () const
 Returns the center point of the line. More...
 
VECTOR2I Center () const
 

Static Public Member Functions

static SEG::ecoord Square (int a)
 

Public Attributes

VECTOR2I A
 
VECTOR2I B
 

Private Member Functions

bool ccw (const VECTOR2I &aA, const VECTOR2I &aB, const VECTOR2I &aC) const
 

Private Attributes

int m_index
 < index withing the parent shape (used when m_is_local == false) More...
 

Friends

std::ostream & operator<< (std::ostream &aStream, const SEG &aSeg)
 

Detailed Description

Definition at line 41 of file seg.h.

Member Typedef Documentation

◆ ecoord

Definition at line 44 of file seg.h.

Constructor & Destructor Documentation

◆ SEG() [1/5]

SEG::SEG ( )
inline

Create an empty (0, 0) segment.

Definition at line 55 of file seg.h.

56  {
57  m_index = -1;
58  }
int m_index
< index withing the parent shape (used when m_is_local == false)
Definition: seg.h:401

References m_index.

Referenced by ParallelSeg(), PerpendicularSeg(), and Reversed().

◆ SEG() [2/5]

SEG::SEG ( int  aX1,
int  aY1,
int  aX2,
int  aY2 
)
inline

Create a segment between (aX1, aY1) and (aX2, aY2).

Definition at line 63 of file seg.h.

63  :
64  A( VECTOR2I( aX1, aY1 ) ),
65  B( VECTOR2I( aX2, aY2 ) )
66  {
67  m_index = -1;
68  }
VECTOR2< int > VECTOR2I
Definition: vector2d.h:623
VECTOR2I A
Definition: seg.h:49
int m_index
< index withing the parent shape (used when m_is_local == false)
Definition: seg.h:401
VECTOR2I B
Definition: seg.h:50

References m_index.

◆ SEG() [3/5]

SEG::SEG ( const VECTOR2I aA,
const VECTOR2I aB 
)
inline

Create a segment between (aA) and (aB).

Definition at line 73 of file seg.h.

73  :
74  A( aA ),
75  B( aB )
76  {
77  m_index = -1;
78  }
VECTOR2I A
Definition: seg.h:49
int m_index
< index withing the parent shape (used when m_is_local == false)
Definition: seg.h:401
VECTOR2I B
Definition: seg.h:50

References m_index.

◆ SEG() [4/5]

SEG::SEG ( const VECTOR2I aA,
const VECTOR2I aB,
int  aIndex 
)
inline

Create a segment between (aA) and (aB), referenced to a multi-segment shape.

Parameters
aAreference to the start point in the parent shape
aBreference to the end point in the parent shape
aIndexindex of the segment within the parent shape

Definition at line 87 of file seg.h.

87  :
88  A( aA ),
89  B( aB )
90  {
91  m_index = aIndex;
92  }
VECTOR2I A
Definition: seg.h:49
int m_index
< index withing the parent shape (used when m_is_local == false)
Definition: seg.h:401
VECTOR2I B
Definition: seg.h:50

References m_index.

◆ SEG() [5/5]

SEG::SEG ( const SEG aSeg)
inline

Copy constructor.

Definition at line 97 of file seg.h.

97  :
98  A( aSeg.A ),
99  B( aSeg.B ),
100  m_index( aSeg.m_index )
101  {
102  }
VECTOR2I A
Definition: seg.h:49
int m_index
< index withing the parent shape (used when m_is_local == false)
Definition: seg.h:401
VECTOR2I B
Definition: seg.h:50

Member Function Documentation

◆ AngleDegrees()

double SEG::AngleDegrees ( const SEG aOther) const

Determine the smallest angle between two segments (result in degrees)

Parameters
aOtherpoint to determine the orientation wrs to self
Returns
smallest angle between this and aOther (degrees)

Definition at line 64 of file seg.cpp.

65 {
66  VECTOR2I thisVec = A - B;
67  VECTOR2I otherVec = aOther.A - aOther.B;
68 
69  double thisVecAngle = NormalizeAngle180( RAD2DECIDEG( thisVec.Angle() ) );
70  double otherVecAngle = NormalizeAngle180( RAD2DECIDEG( otherVec.Angle() ) );
71  double angleDegrees = std::abs( NormalizeAngle180( thisVecAngle - otherVecAngle ) ) / 10.0;
72 
73  return std::min( 180.0 - angleDegrees, angleDegrees );
74 }
Define a general 2D-vector/point.
Definition: vector2d.h:61
double RAD2DECIDEG(double rad)
Definition: trigo.h:236
T NormalizeAngle180(T Angle)
Normalize angle to be in the -180.0 .. 180.0 range.
Definition: trigo.h:376
double Angle() const
Compute the angle of the vector.
Definition: vector2d.h:307
VECTOR2I A
Definition: seg.h:49
VECTOR2I B
Definition: seg.h:50

References A, VECTOR2< T >::Angle(), B, NormalizeAngle180(), and RAD2DECIDEG().

◆ ApproxCollinear()

bool SEG::ApproxCollinear ( const SEG aSeg) const
inline

Definition at line 284 of file seg.h.

285  {
286  ecoord p, q, r;
287  CanonicalCoefs( p, q, r );
288 
289  ecoord dist1 = ( p * aSeg.A.x + q * aSeg.A.y + r ) / sqrt( p * p + q * q );
290  ecoord dist2 = ( p * aSeg.B.x + q * aSeg.B.y + r ) / sqrt( p * p + q * q );
291 
292  return std::abs( dist1 ) <= 1 && std::abs( dist2 ) <= 1;
293  }
void CanonicalCoefs(ecoord &qA, ecoord &qB, ecoord &qC) const
Definition: seg.h:260
VECTOR2I::extended_type ecoord
VECTOR2I A
Definition: seg.h:49
VECTOR2I B
Definition: seg.h:50

References A, B, CanonicalCoefs(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by TRACK::ApproxCollinear().

◆ ApproxParallel()

bool SEG::ApproxParallel ( const SEG aSeg) const
inline

Definition at line 295 of file seg.h.

296  {
297  ecoord p, q, r;
298  CanonicalCoefs( p, q, r );
299 
300  ecoord dist1 = ( p * aSeg.A.x + q * aSeg.A.y + r ) / sqrt( p * p + q * q );
301  ecoord dist2 = ( p * aSeg.B.x + q * aSeg.B.y + r ) / sqrt( p * p + q * q );
302 
303  return std::abs( dist1 - dist2 ) <= 1;
304  }
void CanonicalCoefs(ecoord &qA, ecoord &qB, ecoord &qC) const
Definition: seg.h:260
VECTOR2I::extended_type ecoord
VECTOR2I A
Definition: seg.h:49
VECTOR2I B
Definition: seg.h:50

References A, B, CanonicalCoefs(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by ApproxPerpendicular(), PNS::MEANDERED_LINE::CheckSelfIntersections(), CIRCLE::ConstructFromTanTanPt(), PNS::DIFF_PAIR::CoupledLength(), PNS::DIFF_PAIR::CoupledSegmentPairs(), PNS::DP_PRIMITIVE_PAIR::CursorOrientation(), PNS::findCoupledVertices(), and SegParallelCorrect().

◆ ApproxPerpendicular()

bool SEG::ApproxPerpendicular ( const SEG aSeg) const
inline

Definition at line 306 of file seg.h.

307  {
308  SEG perp = PerpendicularSeg( A );
309 
310  return aSeg.ApproxParallel( perp );
311  }
SEG PerpendicularSeg(const VECTOR2I &aP) const
Compute a segment perpendicular to this one, passing through point aP.
Definition: seg.cpp:148
bool ApproxParallel(const SEG &aSeg) const
Definition: seg.h:295
Definition: seg.h:41

References ApproxParallel(), and PerpendicularSeg().

Referenced by SegPerpendicularCorrect().

◆ CanonicalCoefs()

void SEG::CanonicalCoefs ( ecoord qA,
ecoord qB,
ecoord qC 
) const
inline

Definition at line 260 of file seg.h.

261  {
262  qA = ecoord{ A.y } - B.y;
263  qB = ecoord{ B.x } - A.x;
264  qC = -qA * A.x - qB * A.y;
265  }
VECTOR2I::extended_type ecoord

Referenced by ApproxCollinear(), ApproxParallel(), and Collinear().

◆ ccw()

bool SEG::ccw ( const VECTOR2I aA,
const VECTOR2I aB,
const VECTOR2I aC 
) const
private

Definition at line 166 of file seg.cpp.

167 {
168  return (ecoord) ( aC.y - aA.y ) * ( aB.x - aA.x ) > (ecoord) ( aB.y - aA.y ) * ( aC.x - aA.x );
169 }
VECTOR2I::extended_type ecoord
Definition: seg.h:44
VECTOR2I::extended_type ecoord

References VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by Collide().

◆ Center()

VECTOR2I SEG::Center ( ) const
inline

Definition at line 391 of file seg.h.

392  {
393  return A + ( B - A ) / 2;
394  }
VECTOR2I A
Definition: seg.h:49

References A.

Referenced by PCB_GRID_HELPER::computeAnchors(), SCH_EAGLE_PLUGIN::findNearestLinePoint(), and SHAPE_ARC::SHAPE_ARC().

◆ Collide()

bool SEG::Collide ( const SEG aSeg,
int  aClearance,
int *  aActual = nullptr 
) const

Definition at line 172 of file seg.cpp.

173 {
174  // check for intersection
175  // fixme: move to a method
176  if( ccw( A, aSeg.A, aSeg.B ) != ccw( B, aSeg.A, aSeg.B ) &&
177  ccw( A, B, aSeg.A ) != ccw( A, B, aSeg.B ) )
178  {
179  if( aActual )
180  *aActual = 0;
181 
182  return true;
183  }
184 
185  ecoord dist_sq = VECTOR2I::ECOORD_MAX;
186 
187  dist_sq = std::min( dist_sq, SquaredDistance( aSeg.A ) );
188  dist_sq = std::min( dist_sq, SquaredDistance( aSeg.B ) );
189  dist_sq = std::min( dist_sq, aSeg.SquaredDistance( A ) );
190  dist_sq = std::min( dist_sq, aSeg.SquaredDistance( B ) );
191 
192  if( dist_sq == 0 || dist_sq < (ecoord) aClearance * aClearance )
193  {
194  if( aActual )
195  *aActual = sqrt( dist_sq );
196 
197  return true;
198  }
199 
200  return false;
201 }
bool ccw(const VECTOR2I &aA, const VECTOR2I &aB, const VECTOR2I &aC) const
Definition: seg.cpp:166
ecoord SquaredDistance(const SEG &aSeg) const
Definition: seg.cpp:39
static constexpr extended_type ECOORD_MAX
Definition: vector2d.h:79
VECTOR2I::extended_type ecoord
VECTOR2I A
Definition: seg.h:49
VECTOR2I B
Definition: seg.h:50

References A, B, ccw(), VECTOR2< T >::ECOORD_MAX, and SquaredDistance().

Referenced by SHAPE_POLY_SET::IsPolygonSelfIntersecting(), SegCollideCorrect(), and BOARD::TestZoneIntersection().

◆ Collinear()

bool SEG::Collinear ( const SEG aSeg) const
inline

Check if segment aSeg lies on the same line as (this).

Parameters
aSegthe segment to check colinearity with
Returns
true, when segments are collinear.

Definition at line 273 of file seg.h.

274  {
275  ecoord qa, qb, qc;
276  CanonicalCoefs( qa, qb, qc );
277 
278  ecoord d1 = std::abs( aSeg.A.x * qa + aSeg.A.y * qb + qc );
279  ecoord d2 = std::abs( aSeg.B.x * qa + aSeg.B.y * qb + qc );
280 
281  return ( d1 <= 1 && d2 <= 1 );
282  }
void CanonicalCoefs(ecoord &qA, ecoord &qB, ecoord &qC) const
Definition: seg.h:260
VECTOR2I::extended_type ecoord
VECTOR2I A
Definition: seg.h:49
VECTOR2I B
Definition: seg.h:50

References A, B, CanonicalCoefs(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by PNS::DP_GATEWAYS::BuildGeneric(), Contains(), SHAPE_LINE_CHAIN::Intersect(), PNS::OPTIMIZER::mergeColinear(), Overlaps(), SegCollinearCorrect(), and POLYGON_GEOM_MANAGER::updateLeaderPoints().

◆ Contains() [1/2]

bool SEG::Contains ( const SEG aSeg) const
inline

Definition at line 336 of file seg.h.

337  {
338  if( aSeg.A == aSeg.B ) // single point corner case
339  return Contains( aSeg.A );
340 
341  if( !Collinear( aSeg ) )
342  return false;
343 
344  if( Contains( aSeg.A ) && Contains( aSeg.B ) )
345  return true;
346 
347  return false;
348  }
bool Collinear(const SEG &aSeg) const
Check if segment aSeg lies on the same line as (this).
Definition: seg.h:273
VECTOR2I A
Definition: seg.h:49
bool Contains(const SEG &aSeg) const
Definition: seg.h:336
VECTOR2I B
Definition: seg.h:50

References A, B, and Collinear().

Referenced by PNS::TOPOLOGY::AssembleTuningPath(), BuildFootprintPolygonOutlines(), PNS::LINE::ChangedArea(), findEndSegments(), SHAPE_LINE_CHAIN::Intersect(), PNS::MEANDERED_LINE::MeanderSegment(), and Overlaps().

◆ Contains() [2/2]

bool SEG::Contains ( const VECTOR2I aP) const

Definition at line 204 of file seg.cpp.

205 {
206  return SquaredDistance( aP ) <= 1; // 1 * 1 to be pedantic
207 }
ecoord SquaredDistance(const SEG &aSeg) const
Definition: seg.cpp:39

References SquaredDistance().

◆ Distance() [1/2]

◆ Distance() [2/2]

int SEG::Distance ( const VECTOR2I aP) const
inline

Compute minimum Euclidean distance to point aP.

Parameters
aPthe point
Returns
minimum distance

Definition at line 255 of file seg.h.

256  {
257  return sqrt( SquaredDistance( aP ) );
258  }
ecoord SquaredDistance(const SEG &aSeg) const
Definition: seg.cpp:39

References SquaredDistance().

◆ Index()

int SEG::Index ( ) const
inline

Return the index of this segment in its parent shape (applicable only to non-local segments).

Returns
index value

Definition at line 373 of file seg.h.

374  {
375  return m_index;
376  }
int m_index
< index withing the parent shape (used when m_is_local == false)
Definition: seg.h:401

References m_index.

Referenced by addIntersection(), PNS::OPTIMIZER::mergeDpStep(), PNS::OPTIMIZER::mergeObtuse(), and PNS::OPTIMIZER::mergeStep().

◆ Intersect()

OPT_VECTOR2I SEG::Intersect ( const SEG aSeg,
bool  aIgnoreEndpoints = false,
bool  aLines = false 
) const

Compute intersection point of segment (this) with segment aSeg.

Parameters
aSegsegment to intersect with
aIgnoreEndpointsdon't treat corner cases (i.e. end of one segment touching the other) as intersections.
aLinestreat segments as infinite lines
Returns
intersection point, if exists

Definition at line 119 of file seg.cpp.

120 {
121  const VECTOR2I e( B - A );
122  const VECTOR2I f( aSeg.B - aSeg.A );
123  const VECTOR2I ac( aSeg.A - A );
124 
125  ecoord d = f.Cross( e );
126  ecoord p = f.Cross( ac );
127  ecoord q = e.Cross( ac );
128 
129  if( d == 0 )
130  return OPT_VECTOR2I();
131 
132  if( !aLines && d > 0 && ( q < 0 || q > d || p < 0 || p > d ) )
133  return OPT_VECTOR2I();
134 
135  if( !aLines && d < 0 && ( q < d || p < d || p > 0 || q > 0 ) )
136  return OPT_VECTOR2I();
137 
138  if( !aLines && aIgnoreEndpoints && ( q == 0 || q == d ) && ( p == 0 || p == d ) )
139  return OPT_VECTOR2I();
140 
141  VECTOR2I ip( aSeg.A.x + rescale( q, (ecoord) f.x, d ),
142  aSeg.A.y + rescale( q, (ecoord) f.y, d ) );
143 
144  return ip;
145 }
Define a general 2D-vector/point.
Definition: vector2d.h:61
OPT< VECTOR2I > OPT_VECTOR2I
Definition: seg.h:39
VECTOR2I::extended_type ecoord
VECTOR2I A
Definition: seg.h:49
T rescale(T aNumerator, T aValue, T aDenominator)
Function rescale()
Definition: util.h:95
VECTOR2I B
Definition: seg.h:50

References A, B, VECTOR2< T >::Cross(), rescale(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by EC_CONVERGING::Apply(), PNS::LINE::dragSegment45(), ALTIUM_PCB::HelperParseDimensions6Linear(), SHAPE_LINE_CHAIN::Intersect(), IntersectLines(), SCH_EAGLE_PLUGIN::loadSegments(), NearestPoint(), SHAPE_LINE_CHAIN::SelfIntersecting(), SHAPE_ARC::SHAPE_ARC(), and SquaredDistance().

◆ IntersectLines()

OPT_VECTOR2I SEG::IntersectLines ( const SEG aSeg) const
inline

Compute the intersection point of lines passing through ends of (this) and aSeg.

Parameters
aSegsegment defining the line to intersect with
Returns
intersection point, if exists

Definition at line 208 of file seg.h.

209  {
210  return Intersect( aSeg, false, true );
211  }
OPT_VECTOR2I Intersect(const SEG &aSeg, bool aIgnoreEndpoints=false, bool aLines=false) const
Compute intersection point of segment (this) with segment aSeg.
Definition: seg.cpp:119

References Intersect().

Referenced by PCB_GRID_HELPER::AlignToSegment(), BuildFootprintPolygonOutlines(), PNS::DP_GATEWAYS::BuildGeneric(), CIRCLE::ConstructFromTanTanPt(), PNS::ConvexHull(), EDIT_TOOL::DragArcTrack(), PNS::OPTIMIZER::mergeObtuse(), and PNS::LINE::snapDraggedCorner().

◆ Length()

◆ LineDistance()

int SEG::LineDistance ( const VECTOR2I aP,
bool  aDetermineSide = false 
) const
inline

Return the closest Euclidean distance between point aP and the line defined by the ends of segment (this).

Parameters
aPthe point to test
aDetermineSidewhen true, the sign of the returned value indicates the side of the line at which we are (negative = left)
Returns
the distance

Definition at line 420 of file seg.h.

421 {
422  ecoord p = ecoord{ A.y } - B.y;
423  ecoord q = ecoord{ B.x } - A.x;
424  ecoord r = -p * A.x - q * A.y;
425 
426  ecoord dist = ( p * aP.x + q * aP.y + r ) / sqrt( p * p + q * q );
427 
428  return aDetermineSide ? dist : std::abs( dist );
429 }
VECTOR2I::extended_type ecoord

References VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by CIRCLE::ConstructFromTanTanPt(), SHAPE_LINE_CHAIN::NearestPoint(), and PNS::LINE::snapToNeighbourSegments().

◆ LineProject()

VECTOR2I SEG::LineProject ( const VECTOR2I aP) const
inline

Compute the perpendicular projection point of aP on a line passing through ends of the segment.

Parameters
aPpoint to project
Returns
projected point

Definition at line 404 of file seg.h.

405 {
406  VECTOR2I d = B - A;
407  ecoord l_squared = d.Dot( d );
408 
409  if( l_squared == 0 )
410  return A;
411 
412  ecoord t = d.Dot( aP - A );
413 
414  int xp = rescale( t, ecoord{ d.x }, l_squared );
415  int yp = rescale( t, ecoord{ d.y }, l_squared );
416 
417  return A + VECTOR2I( xp, yp );
418 }
Define a general 2D-vector/point.
Definition: vector2d.h:61
VECTOR2< int > VECTOR2I
Definition: vector2d.h:623
VECTOR2I::extended_type ecoord
extended_type Dot(const VECTOR2< T > &aVector) const
Compute dot product of self with aVector.
Definition: vector2d.h:521
VECTOR2I A
Definition: seg.h:49
T rescale(T aNumerator, T aValue, T aDenominator)
Function rescale()
Definition: util.h:95

References A, VECTOR2< T >::Dot(), rescale(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by PNS::LINE_PLACER::buildInitialLine(), PNS::DP_GATEWAYS::BuildOrthoProjections(), commonParallelProjection(), PNS::commonParallelProjection(), CIRCLE::ConstructFromTanTanPt(), EDIT_TOOL::DragArcTrack(), PNS::findCoupledVertices(), CIRCLE::IntersectLine(), PNS::DIFF_PAIR_PLACER::routeHead(), SHAPE_ARC::SHAPE_ARC(), and PNS::MEANDER_SHAPE::updateBaseSegment().

◆ NearestPoint() [1/2]

const VECTOR2I SEG::NearestPoint ( const VECTOR2I aP) const
inline

Compute a point on the segment (this) that is closest to point aP.

Returns
the nearest point

Definition at line 437 of file seg.h.

438 {
439  VECTOR2I d = B - A;
440  ecoord l_squared = d.Dot( d );
441 
442  if( l_squared == 0 )
443  return A;
444 
445  ecoord t = d.Dot( aP - A );
446 
447  if( t < 0 )
448  return A;
449  else if( t > l_squared )
450  return B;
451 
452  int xp = rescale( t, (ecoord)d.x, l_squared );
453  int yp = rescale( t, (ecoord)d.y, l_squared );
454 
455  return A + VECTOR2I( xp, yp );
456 }
Define a general 2D-vector/point.
Definition: vector2d.h:61
VECTOR2< int > VECTOR2I
Definition: vector2d.h:623
VECTOR2I::extended_type ecoord
extended_type Dot(const VECTOR2< T > &aVector) const
Compute dot product of self with aVector.
Definition: vector2d.h:521
VECTOR2I A
Definition: seg.h:49
T rescale(T aNumerator, T aValue, T aDenominator)
Function rescale()
Definition: util.h:95
VECTOR2I B
Definition: seg.h:50

References A, B, VECTOR2< T >::Dot(), rescale(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by PCB_POINT_EDITOR::addCorner(), PNS::closestProjectedPoint(), Collide(), SHAPE_CIRCLE::Collide(), SHAPE_SEGMENT::Collide(), SHAPE_RECT::Collide(), SHAPE_LINE_CHAIN_BASE::Collide(), EDIT_TOOL::DragArcTrack(), NearestPoint(), SHAPE_LINE_CHAIN::NearestPoint(), pushoutForce(), PNS::WALKAROUND::Route(), and SquaredDistance().

◆ NearestPoint() [2/2]

const VECTOR2I SEG::NearestPoint ( const SEG aSeg) const

Compute a point on the segment (this) that is closest to any point on aSeg.

Returns
the nearest point

Definition at line 77 of file seg.cpp.

78 {
79  if( OPT_VECTOR2I p = Intersect( aSeg ) )
80  return *p;
81 
82  const VECTOR2I pts_origin[4] =
83  {
84  aSeg.NearestPoint( A ),
85  aSeg.NearestPoint( B ),
86  NearestPoint( aSeg.A ),
87  NearestPoint( aSeg.B )
88  };
89 
90 
91  const VECTOR2I* pts_out[4] =
92  {
93  &A,
94  &B,
95  &pts_origin[2],
96  &pts_origin[3]
97  };
98 
99  const ecoord pts_dist[4] =
100  {
101  ( pts_origin[0] - A ).SquaredEuclideanNorm(),
102  ( pts_origin[1] - B ).SquaredEuclideanNorm(),
103  ( pts_origin[2] - aSeg.A ).SquaredEuclideanNorm(),
104  ( pts_origin[3] - aSeg.B ).SquaredEuclideanNorm()
105  };
106 
107  int min_i = 0;
108 
109  for( int i = 0; i < 4; i++ )
110  {
111  if( pts_dist[i] < pts_dist[min_i] )
112  min_i = i;
113  }
114 
115  return *pts_out[min_i];
116 }
OPT_VECTOR2I Intersect(const SEG &aSeg, bool aIgnoreEndpoints=false, bool aLines=false) const
Compute intersection point of segment (this) with segment aSeg.
Definition: seg.cpp:119
Define a general 2D-vector/point.
Definition: vector2d.h:61
OPT< VECTOR2I > OPT_VECTOR2I
Definition: seg.h:39
VECTOR2I::extended_type ecoord
const VECTOR2I NearestPoint(const VECTOR2I &aP) const
Compute a point on the segment (this) that is closest to point aP.
Definition: seg.h:437
VECTOR2I A
Definition: seg.h:49
VECTOR2I B
Definition: seg.h:50

References A, B, Intersect(), and NearestPoint().

◆ operator!=()

bool SEG::operator!= ( const SEG aSeg) const
inline

Definition at line 118 of file seg.h.

119  {
120  return (A != aSeg.A || B != aSeg.B);
121  }
VECTOR2I A
Definition: seg.h:49
VECTOR2I B
Definition: seg.h:50

References A, and B.

◆ operator=()

SEG& SEG::operator= ( const SEG aSeg)
inline

Definition at line 104 of file seg.h.

105  {
106  A = aSeg.A;
107  B = aSeg.B;
108  m_index = aSeg.m_index;
109 
110  return *this;
111  }
VECTOR2I A
Definition: seg.h:49
int m_index
< index withing the parent shape (used when m_is_local == false)
Definition: seg.h:401
VECTOR2I B
Definition: seg.h:50

References A, B, and m_index.

◆ operator==()

bool SEG::operator== ( const SEG aSeg) const
inline

Definition at line 113 of file seg.h.

114  {
115  return (A == aSeg.A && B == aSeg.B) ;
116  }
VECTOR2I A
Definition: seg.h:49
VECTOR2I B
Definition: seg.h:50

References A, and B.

◆ Overlaps()

bool SEG::Overlaps ( const SEG aSeg) const
inline

Definition at line 313 of file seg.h.

314  {
315  if( aSeg.A == aSeg.B ) // single point corner case
316  {
317  if( A == aSeg.A || B == aSeg.A )
318  return false;
319 
320  return Contains( aSeg.A );
321  }
322 
323  if( !Collinear( aSeg ) )
324  return false;
325 
326  if( Contains( aSeg.A ) || Contains( aSeg.B ) )
327  return true;
328 
329  if( aSeg.Contains( A ) || aSeg.Contains( B ) )
330  return true;
331 
332  return false;
333  }
bool Collinear(const SEG &aSeg) const
Check if segment aSeg lies on the same line as (this).
Definition: seg.h:273
VECTOR2I A
Definition: seg.h:49
bool Contains(const SEG &aSeg) const
Definition: seg.h:336
VECTOR2I B
Definition: seg.h:50

References A, B, Collinear(), and Contains().

◆ ParallelSeg()

SEG SEG::ParallelSeg ( const VECTOR2I aP) const

Compute a segment parallel to this one, passing through point aP.

Parameters
aPPoint through which the new segment will pass
Returns
SEG parallel to this passing through point aP

Definition at line 157 of file seg.cpp.

158 {
159  VECTOR2I slope( B - A );
160  VECTOR2I endPoint = slope + aP;
161 
162  return SEG( aP, endPoint );
163 }
SEG()
Create an empty (0, 0) segment.
Definition: seg.h:55
Define a general 2D-vector/point.
Definition: vector2d.h:61

References SEG().

Referenced by BOOST_AUTO_TEST_CASE(), and CIRCLE::ConstructFromTanTanPt().

◆ PerpendicularSeg()

SEG SEG::PerpendicularSeg ( const VECTOR2I aP) const

Compute a segment perpendicular to this one, passing through point aP.

Parameters
aPPoint through which the new segment will pass
Returns
SEG perpendicular to this passing through point aP

Definition at line 148 of file seg.cpp.

149 {
150  VECTOR2I slope( B - A );
151  VECTOR2I endPoint = slope.Perpendicular() + aP;
152 
153  return SEG( aP, endPoint );
154 }
VECTOR2< T > Perpendicular() const
Compute the perpendicular vector.
Definition: vector2d.h:314
SEG()
Create an empty (0, 0) segment.
Definition: seg.h:55
Define a general 2D-vector/point.
Definition: vector2d.h:61

References VECTOR2< T >::Perpendicular(), and SEG().

Referenced by ApproxPerpendicular(), BOOST_AUTO_TEST_CASE(), and CIRCLE::ConstructFromTanTanPt().

◆ ReflectPoint()

const VECTOR2I SEG::ReflectPoint ( const VECTOR2I aP) const
inline

Reflect a point using this segment as axis.

Returns
the reflected point

Definition at line 458 of file seg.h.

459 {
460  VECTOR2I d = B - A;
461  VECTOR2I::extended_type l_squared = d.Dot( d );
462  VECTOR2I::extended_type t = d.Dot( aP - A );
463  VECTOR2I c;
464 
465  if( !l_squared )
466  c = aP;
467  else
468  {
469  c.x = A.x + rescale( t, static_cast<VECTOR2I::extended_type>( d.x ), l_squared );
470  c.y = A.y + rescale( t, static_cast<VECTOR2I::extended_type>( d.y ), l_squared );
471  }
472 
473  return 2 * c - aP;
474 }
VECTOR2_TRAITS< int >::extended_type extended_type
Definition: vector2d.h:76
Define a general 2D-vector/point.
Definition: vector2d.h:61
extended_type Dot(const VECTOR2< T > &aVector) const
Compute dot product of self with aVector.
Definition: vector2d.h:521
VECTOR2I A
Definition: seg.h:49
T rescale(T aNumerator, T aValue, T aDenominator)
Function rescale()
Definition: util.h:95

References A, VECTOR2< T >::Dot(), rescale(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by SHAPE_ARC::Mirror(), and SHAPE_LINE_CHAIN::Mirror().

◆ Reverse()

void SEG::Reverse ( )
inline

Definition at line 380 of file seg.h.

381  {
382  std::swap( A, B );
383  }

◆ Reversed()

SEG SEG::Reversed ( ) const
inline

Returns the center point of the line.

Definition at line 385 of file seg.h.

References SEG().

Referenced by PNS::LINE_PLACER::Start().

◆ Side()

int SEG::Side ( const VECTOR2I aP) const
inline

Determine on which side of directed line passing via segment ends point aP lies.

Parameters
aPpoint to determine the orientation wrs to self
Returns
: < 0: left, 0 : on the line, > 0 : right

Definition at line 143 of file seg.h.

144  {
145  const ecoord det = ( B - A ).Cross( aP - A );
146 
147  return det < 0 ? -1 : ( det > 0 ? 1 : 0 );
148  }
VECTOR2I::extended_type ecoord
VECTOR2I A
Definition: seg.h:49

References A.

Referenced by PNS::ArcHull(), PNS::DP_GATEWAYS::buildDpContinuation(), EDIT_TOOL::DragArcTrack(), PNS::DP_MEANDER_PLACER::pairOrientation(), and PNS::SegmentHull().

◆ Square()

◆ SquaredDistance() [1/2]

SEG::ecoord SEG::SquaredDistance ( const SEG aSeg) const

Definition at line 39 of file seg.cpp.

40 {
41  // fixme: rather inefficient....
42  if( Intersect( aSeg ) )
43  return 0;
44 
45  const VECTOR2I pts[4] =
46  {
47  aSeg.NearestPoint( A ) - A,
48  aSeg.NearestPoint( B ) - B,
49  NearestPoint( aSeg.A ) - aSeg.A,
50  NearestPoint( aSeg.B ) - aSeg.B
51  };
52 
54 
55  for( int i = 0; i < 4; i++ )
56  {
57  m = std::min( m, pts[i].SquaredEuclideanNorm() );
58  }
59 
60  return m;
61 }
OPT_VECTOR2I Intersect(const SEG &aSeg, bool aIgnoreEndpoints=false, bool aLines=false) const
Compute intersection point of segment (this) with segment aSeg.
Definition: seg.cpp:119
Define a general 2D-vector/point.
Definition: vector2d.h:61
static constexpr extended_type ECOORD_MAX
Definition: vector2d.h:79
VECTOR2I::extended_type ecoord
const VECTOR2I NearestPoint(const VECTOR2I &aP) const
Compute a point on the segment (this) that is closest to point aP.
Definition: seg.h:437
VECTOR2I A
Definition: seg.h:49
VECTOR2I B
Definition: seg.h:50

References A, B, VECTOR2< T >::ECOORD_MAX, Intersect(), and NearestPoint().

Referenced by PNS::PRESERVE_VERTEX_CONSTRAINT::Check(), SHAPE_SEGMENT::Collide(), SHAPE_ARC::Collide(), SHAPE_RECT::Collide(), Collide(), SHAPE_LINE_CHAIN_BASE::Collide(), Contains(), Distance(), SHAPE_LINE_CHAIN_BASE::SquaredDistance(), and TestSegmentHit().

◆ SquaredDistance() [2/2]

ecoord SEG::SquaredDistance ( const VECTOR2I aP) const
inline

Definition at line 244 of file seg.h.

245  {
246  return ( NearestPoint( aP ) - aP ).SquaredEuclideanNorm();
247  }
const VECTOR2I NearestPoint(const VECTOR2I &aP) const
Compute a point on the segment (this) that is closest to point aP.
Definition: seg.h:437

References NearestPoint().

◆ SquaredLength()

ecoord SEG::SquaredLength ( ) const
inline

Definition at line 360 of file seg.h.

361  {
362  return ( A - B ).SquaredEuclideanNorm();
363  }

Referenced by commonParallelProjection(), PNS::commonParallelProjection(), PNS::OPTIMIZER::mergeColinear(), and POLYGON_GEOM_MANAGER::updateLeaderPoints().

◆ TCoef()

SEG::ecoord SEG::TCoef ( const VECTOR2I aP) const
inline

Definition at line 431 of file seg.h.

432 {
433  VECTOR2I d = B - A;
434  return d.Dot( aP - A);
435 }
Define a general 2D-vector/point.
Definition: vector2d.h:61
extended_type Dot(const VECTOR2< T > &aVector) const
Compute dot product of self with aVector.
Definition: vector2d.h:521
VECTOR2I A
Definition: seg.h:49

References A, and VECTOR2< T >::Dot().

Referenced by commonParallelProjection(), and PNS::commonParallelProjection().

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  aStream,
const SEG aSeg 
)
friend

Definition at line 476 of file seg.h.

477 {
478  aStream << "[ " << aSeg.A << " - " << aSeg.B << " ]";
479 
480  return aStream;
481 }
VECTOR2I A
Definition: seg.h:49
VECTOR2I B
Definition: seg.h:50

Member Data Documentation

◆ A

VECTOR2I SEG::A

Definition at line 49 of file seg.h.

Referenced by PNS::NODE::Add(), PNS_KICAD_IFACE::AddItem(), PNS_TEST_DEBUG_DECORATOR::AddSegment(), PNS::NODE::addSegment(), PNS_PCBNEW_DEBUG_DECORATOR::AddSegment(), BOARD_ADAPTER::addShapeWithClearance(), PCB_GRID_HELPER::AlignToSegment(), PNS::SEGMENT::Anchor(), AngleDegrees(), ApproxCollinear(), PNS::ApproximateSegmentAsRect(), ApproxParallel(), PNS::DP_MEANDER_PLACER::baselineSegment(), SHAPE_SEGMENT::BBox(), BOOST_AUTO_TEST_CASE(), PNS::DP_GATEWAYS::BuildFromPrimitivePair(), Center(), SHAPE_LINE_CHAIN::CheckClearance(), PNS::SEGMENT::CLine(), SHAPE_ARC::Collide(), SHAPE_RECT::Collide(), Collide(), SHAPE_LINE_CHAIN_BASE::Collide(), Collinear(), commonParallelProjection(), PNS::commonParallelProjection(), PCB_GRID_HELPER::computeAnchors(), PNS::TOPOLOGY::ConnectedJoints(), CIRCLE::ConstructFromTanTanPt(), Contains(), BOARD_ADAPTER::createPadWithClearance(), BOARD_ADAPTER::createPadWithDrill(), PNS::DP_PRIMITIVE_PAIR::CursorOrientation(), PNS::MEANDER_PLACER_BASE::cutTunedLine(), DIRECTION_45::DIRECTION_45(), PNS::MEANDER_PLACER::doMove(), EDIT_TOOL::DragArcTrack(), PNS::LINE::dragSegment45(), KIGFX::PCB_PAINTER::draw(), ROUTER_PREVIEW_ITEM::drawLineChain(), KI_TEST::DrawSegment(), ROUTER_PREVIEW_ITEM::drawShape(), SHAPE_LINE_CHAIN_BASE::EdgeContainingPoint(), extractDiffPairCoupledItems(), findEndSegments(), PNS::NODE::findRedundantSegment(), PNS::MEANDER_SHAPE::Fit(), SHAPE_SEGMENT::Format(), PNS::getDanglingAnchor(), PNS::LINE_PLACER::handlePullback(), PNS::LINE_PLACER::handleSelfIntersections(), ZONE::HatchBorder(), CIRCLE::Intersect(), Intersect(), SHAPE_LINE_CHAIN::Intersect(), CIRCLE::IntersectLine(), PNS::LINE::Is45Degree(), KIGFX::VIEW_OVERLAY::Line(), LineProject(), CADSTAR_SCH_ARCHIVE_LOADER::loadShapeVertices(), PNS::MEANDER_SHAPE::MakeCorner(), PCB_SHAPE::MakeEffectiveShapes(), PNS::MEANDER_SHAPE::MakeEmpty(), PNS::MEANDERED_LINE::MeanderSegment(), PNS::OPTIMIZER::mergeDpStep(), PNS::OPTIMIZER::mergeObtuse(), PNS::OPTIMIZER::mergeStep(), ZONE::Mirror(), SHAPE_SEGMENT::Move(), ZONE::Move(), PNS::MoveDiagonal(), NearestPoint(), operator!=(), POLY_GRID_PARTITION::segsEqual::operator()(), POLY_GRID_PARTITION::segHash::operator()(), operator<<(), operator=(), operator==(), Overlaps(), DIALOG_PAD_PROPERTIES::padValuesOK(), PNS::DP_MEANDER_PLACER::pairOrientation(), SHAPE_LINE_CHAIN::PathLength(), BRDITEMS_PLOTTER::PlotDimension(), PlotLayerOutlines(), SHAPE_LINE_CHAIN::PointAlong(), PNS::MEANDER_SHAPE::Recalculate(), PNS::LINE_PLACER::reduceTail(), ReflectPoint(), PNS::NODE::removeSegmentIndex(), ZONE::Rotate(), PNS::WALKAROUND::Route(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run(), POLY_GRID_PARTITION::scanCell(), DIMENSION_BASE::segCircleIntersection(), GEOM_TEST::SegmentCompletelyInQuadrant(), GEOM_TEST::SegmentCompletelyWithinRadius(), GEOM_TEST::SegmentEndsInQuadrant(), PNS::SegmentHull(), DIMENSION_BASE::segPolyIntersection(), SHAPE_LINE_CHAIN::SelfIntersecting(), SHAPE_ARC::SHAPE_ARC(), Side(), PNS::LINE::snapToNeighbourSegments(), SHAPE_LINE_CHAIN::Split(), PNS::LINE_PLACER::SplitAdjacentSegments(), SquaredDistance(), SHAPE_POLY_SET::SquaredDistanceToPolygon(), PNS::LINE_PLACER::Start(), PNS::DRAGGER::startDragSegment(), PNS::SEGMENT::SwapEnds(), TCoef(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZones(), PNS::tightenSegment(), TransformArcToPolygon(), PAD::TransformHoleWithClearanceToPolygon(), unfracture(), SHAPE_POLY_SET::unfractureSingle(), PNS::MEANDER_SHAPE::updateBaseSegment(), ALIGNED_DIMENSION::updateGeometry(), ORTHOGONAL_DIMENSION::updateGeometry(), and PNS_KICAD_IFACE::UpdateItem().

◆ B

VECTOR2I SEG::B

Definition at line 50 of file seg.h.

Referenced by PNS::NODE::Add(), PNS_KICAD_IFACE::AddItem(), PNS::MEANDERED_LINE::AddMeander(), PNS_TEST_DEBUG_DECORATOR::AddSegment(), PNS::NODE::addSegment(), PNS_PCBNEW_DEBUG_DECORATOR::AddSegment(), BOARD_ADAPTER::addShapeWithClearance(), PCB_GRID_HELPER::AlignToSegment(), PNS::SEGMENT::Anchor(), AngleDegrees(), ApproxCollinear(), PNS::ApproximateSegmentAsRect(), ApproxParallel(), PNS::DP_MEANDER_PLACER::baselineSegment(), SHAPE_SEGMENT::BBox(), BOOST_AUTO_TEST_CASE(), POLY_GRID_PARTITION::build(), PNS::DP_GATEWAYS::BuildFromPrimitivePair(), SHAPE_LINE_CHAIN::CheckClearance(), PNS::SEGMENT::CLine(), SHAPE_ARC::Collide(), SHAPE_RECT::Collide(), Collide(), Collinear(), commonParallelProjection(), PNS::commonParallelProjection(), PCB_GRID_HELPER::computeAnchors(), PNS::TOPOLOGY::ConnectedJoints(), CIRCLE::ConstructFromTanTanPt(), Contains(), BOARD_ADAPTER::createPadWithClearance(), BOARD_ADAPTER::createPadWithDrill(), PNS::DP_PRIMITIVE_PAIR::CursorOrientation(), PNS::MEANDER_PLACER_BASE::cutTunedLine(), DIRECTION_45::DIRECTION_45(), PNS::MEANDER_PLACER::doMove(), EDIT_TOOL::DragArcTrack(), PNS::LINE::dragSegment45(), KIGFX::PCB_PAINTER::draw(), ROUTER_PREVIEW_ITEM::drawLineChain(), KI_TEST::DrawSegment(), ROUTER_PREVIEW_ITEM::drawShape(), SHAPE_LINE_CHAIN_BASE::EdgeContainingPoint(), PNS::MEANDER_SHAPE::End(), findEndSegments(), SCH_EAGLE_PLUGIN::findNearestLinePoint(), PNS::NODE::findRedundantSegment(), PNS::MEANDER_SHAPE::Fit(), SHAPE_SEGMENT::Format(), PNS::getDanglingAnchor(), ZONE::HatchBorder(), CIRCLE::Intersect(), Intersect(), SHAPE_LINE_CHAIN::Intersect(), CIRCLE::IntersectLine(), PNS::LINE::Is45Degree(), KIGFX::VIEW_OVERLAY::Line(), CADSTAR_SCH_ARCHIVE_LOADER::loadShapeVertices(), PNS::MEANDER_SHAPE::MakeCorner(), PCB_SHAPE::MakeEffectiveShapes(), PNS::MEANDER_SHAPE::MakeEmpty(), PNS::MEANDERED_LINE::MeanderSegment(), PNS::OPTIMIZER::mergeDpStep(), PNS::LINE_PLACER::mergeHead(), PNS::OPTIMIZER::mergeObtuse(), PNS::OPTIMIZER::mergeStep(), ZONE::Mirror(), SHAPE_SEGMENT::Move(), ZONE::Move(), PNS::MoveDiagonal(), NearestPoint(), operator!=(), POLY_GRID_PARTITION::segsEqual::operator()(), POLY_GRID_PARTITION::segHash::operator()(), operator<<(), operator=(), operator==(), Overlaps(), DIALOG_PAD_PROPERTIES::padValuesOK(), BRDITEMS_PLOTTER::PlotDimension(), PlotLayerOutlines(), SHAPE_LINE_CHAIN::PointAlong(), PNS::MEANDER_SHAPE::Recalculate(), PNS::NODE::removeSegmentIndex(), ZONE::Rotate(), PNS::WALKAROUND::Route(), DRC_TEST_PROVIDER_EDGE_CLEARANCE::Run(), POLY_GRID_PARTITION::scanCell(), DIMENSION_BASE::segCircleIntersection(), GEOM_TEST::SegmentCompletelyInQuadrant(), GEOM_TEST::SegmentCompletelyWithinRadius(), GEOM_TEST::SegmentEndsInQuadrant(), PNS::SegmentHull(), DIMENSION_BASE::segPolyIntersection(), SHAPE_LINE_CHAIN::SelfIntersecting(), SHAPE_ARC::SHAPE_ARC(), SHAPE_LINE_CHAIN::Split(), PNS::LINE_PLACER::SplitAdjacentSegments(), SquaredDistance(), SHAPE_POLY_SET::SquaredDistanceToPolygon(), PNS::LINE_PLACER::Start(), PNS::DRAGGER::startDragSegment(), PNS::SEGMENT::SwapEnds(), DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZones(), PNS::tightenSegment(), TransformArcToPolygon(), PAD::TransformHoleWithClearanceToPolygon(), unfracture(), SHAPE_POLY_SET::unfractureSingle(), PNS::MEANDER_SHAPE::updateBaseSegment(), ALIGNED_DIMENSION::updateGeometry(), ORTHOGONAL_DIMENSION::updateGeometry(), PNS_KICAD_IFACE::UpdateItem(), and POLYGON_GEOM_MANAGER::updateLeaderPoints().

◆ m_index

int SEG::m_index
private

< index withing the parent shape (used when m_is_local == false)

Definition at line 401 of file seg.h.

Referenced by Index(), operator=(), and SEG().


The documentation for this class was generated from the following files: