OpendTect  7.0
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
ODPolygon< T > Class Template Reference

(Closed) sequence of connected 2-D coordinates. More...

Inheritance diagram for ODPolygon< T >:
[legend]

Public Member Functions

 ODPolygon ()
 
 ODPolygon (const TypeSet< Geom::Point2D< T > > &plg)
 
void add (const Geom::Point2D< T > &vtx)
 
bool anticlockwise () const
 
double area () const
 
bool clockwise () const
 
void convexHull ()
 
const TypeSet< Geom::Point2D< T > > & data () const
 
double distTo (const Geom::Point2D< T > &refpt, int *segmentidxptr=0, double *fractionptr=0) const
 
void erase ()
 
void getData (bool of_x, TypeSet< T > &) const
 
Interval< T > getRange (bool of_x) const
 
Geom::Point2D< T > getUdf () const
 
const Geom::Point2D< T > & getVertex (int idx) const
 
void insert (int idx, const Geom::Point2D< T > &vtx)
 
bool isClosed () const
 
bool isEmpty () const
 
bool isInside (const Geom::Point2D< T > &, bool inclborder, T eps) const
 
int isInside (const ODPolygon &testpoly, T eps=0) const
 
bool isSelfIntersecting () const
 
bool isUTurn (int idx) const
 
void keepBendPoints (float eps)
 
double maxDistToBorderEstimate (double maxrelerr=0.001) const
 
const Geom::Point2D< T > & nextVertex (int idx) const
 
bool operator== (const ODPolygon< T > &) const
 
bool operator> (const ODPolygon< T > &plg) const
 
const Geom::Point2D< T > & prevVertex (int idx) const
 
void remove (int idx)
 
void removeZeroLengths ()
 
void reverse ()
 
bool segmentMeetsBorder (const Geom::Point2D< T > &pt1, const Geom::Point2D< T > &pt2, T eps) const
 
void setClosed (bool yn)
 
void setEmpty ()
 
void setUdf (Geom::Point2D< T > pt)
 
int size () const
 
bool validIdx (int idx) const
 
bool windowOverlaps (const Interval< T > &xrange, const Interval< T > &yrange, T eps) const
 

Protected Member Functions

template<class ST >
ST sgnArea2 () const
 

Static Protected Member Functions

static double distToSegment (const Geom::Point2D< T > &p1, const Geom::Point2D< T > &p2, const Geom::Point2D< T > &refpt, double *fractionptr=0)
 
static bool doCoincide (const Geom::Point2D< T > &point1, const Geom::Point2D< T > &point2, T eps=mDefEps)
 
static int doSegmentsMeet (const Geom::Point2D< T > &p1, const Geom::Point2D< T > &p2, const Geom::Point2D< T > &q1, const Geom::Point2D< T > &q2, T eps)
 
static bool isEdgeCrossing (const Geom::Point2D< T > &raydir, const Geom::Point2D< T > &raysrc, const Geom::Point2D< T > &vtx1, const Geom::Point2D< T > &vtx2)
 
static bool isOnHalfLine (const Geom::Point2D< T > &point, const Geom::Point2D< T > &dirvec, const Geom::Point2D< T > &endvec, T eps)
 
static bool isOnLine (const Geom::Point2D< T > &point, const Geom::Point2D< T > &dirvec, const Geom::Point2D< T > &posvec, T eps)
 
static bool isOnSegment (const Geom::Point2D< T > &pt, const Geom::Point2D< T > &pt0, const Geom::Point2D< T > &pt1, T eps)
 
static bool isRightOfLine (const Geom::Point2D< T > &point, const Geom::Point2D< T > &dirvec, const Geom::Point2D< T > &posvec)
 
static double sgnDistToLine (const Geom::Point2D< T > &point, const Geom::Point2D< T > &dirvec, const Geom::Point2D< T > &posvec)
 

Protected Attributes

bool closed_
 
TypeSet< Geom::Point2D< T > > poly_
 
Geom::Point2D< T > udf_
 
Interval< T > xrg_
 
Interval< T > yrg_
 

Detailed Description

template<class T>
class ODPolygon< T >

(Closed) sequence of connected 2-D coordinates.

<>

Constructor & Destructor Documentation

◆ ODPolygon() [1/2]

template<class T >
ODPolygon< T >::ODPolygon ( )
inline

◆ ODPolygon() [2/2]

template<class T >
ODPolygon< T >::ODPolygon ( const TypeSet< Geom::Point2D< T > > &  plg)
inline

Member Function Documentation

◆ add()

template<class T >
void ODPolygon< T >::add ( const Geom::Point2D< T > &  vtx)
inline

◆ anticlockwise()

template<class T >
bool ODPolygon< T >::anticlockwise ( ) const
inline

◆ area()

template<class T >
double ODPolygon< T >::area ( ) const
inline

◆ clockwise()

template<class T >
bool ODPolygon< T >::clockwise ( ) const
inline

◆ convexHull()

template<class T >
void ODPolygon< T >::convexHull
inline

◆ data()

template<class T >
const TypeSet<Geom::Point2D<T> >& ODPolygon< T >::data ( ) const
inline

◆ distTo()

template<class T >
double ODPolygon< T >::distTo ( const Geom::Point2D< T > &  refpt,
int *  segmentidxptr = 0,
double *  fractionptr = 0 
) const
inline

◆ distToSegment()

template<class T >
double ODPolygon< T >::distToSegment ( const Geom::Point2D< T > &  p1,
const Geom::Point2D< T > &  p2,
const Geom::Point2D< T > &  refpt,
double *  fractionptr = 0 
)
inlinestaticprotected

◆ doCoincide()

template<class T >
bool ODPolygon< T >::doCoincide ( const Geom::Point2D< T > &  point1,
const Geom::Point2D< T > &  point2,
eps = mDefEps 
)
inlinestaticprotected

◆ doSegmentsMeet()

template<class T >
int ODPolygon< T >::doSegmentsMeet ( const Geom::Point2D< T > &  p1,
const Geom::Point2D< T > &  p2,
const Geom::Point2D< T > &  q1,
const Geom::Point2D< T > &  q2,
eps 
)
inlinestaticprotected

◆ erase()

template<class T >
void ODPolygon< T >::erase
inline

◆ getData()

template<class T >
void ODPolygon< T >::getData ( bool  of_x,
TypeSet< T > &  ts 
) const
inline

◆ getRange()

template<class T >
Interval< T > ODPolygon< T >::getRange ( bool  of_x) const
inline

◆ getUdf()

template<class T >
Geom::Point2D<T> ODPolygon< T >::getUdf ( ) const
inline

◆ getVertex()

template<class T >
const Geom::Point2D< T > & ODPolygon< T >::getVertex ( int  idx) const
inline

◆ insert()

template<class T >
void ODPolygon< T >::insert ( int  idx,
const Geom::Point2D< T > &  vtx 
)
inline

◆ isClosed()

template<class T >
bool ODPolygon< T >::isClosed ( ) const
inline

◆ isEdgeCrossing()

template<class T >
bool ODPolygon< T >::isEdgeCrossing ( const Geom::Point2D< T > &  raydir,
const Geom::Point2D< T > &  raysrc,
const Geom::Point2D< T > &  vtx1,
const Geom::Point2D< T > &  vtx2 
)
inlinestaticprotected

◆ isEmpty()

template<class T >
bool ODPolygon< T >::isEmpty ( ) const
inline

◆ isInside() [1/2]

template<class T >
bool ODPolygon< T >::isInside ( const Geom::Point2D< T > &  point,
bool  inclborder,
eps 
) const
inline

◆ isInside() [2/2]

template<class T >
int ODPolygon< T >::isInside ( const ODPolygon< T > &  testpoly,
eps = 0 
) const
inline

◆ isOnHalfLine()

template<class T >
bool ODPolygon< T >::isOnHalfLine ( const Geom::Point2D< T > &  point,
const Geom::Point2D< T > &  dirvec,
const Geom::Point2D< T > &  endvec,
eps 
)
inlinestaticprotected

◆ isOnLine()

template<class T >
bool ODPolygon< T >::isOnLine ( const Geom::Point2D< T > &  point,
const Geom::Point2D< T > &  dirvec,
const Geom::Point2D< T > &  posvec,
eps 
)
inlinestaticprotected

◆ isOnSegment()

template<class T >
bool ODPolygon< T >::isOnSegment ( const Geom::Point2D< T > &  pt,
const Geom::Point2D< T > &  pt0,
const Geom::Point2D< T > &  pt1,
eps 
)
inlinestaticprotected

◆ isRightOfLine()

template<class T >
bool ODPolygon< T >::isRightOfLine ( const Geom::Point2D< T > &  point,
const Geom::Point2D< T > &  dirvec,
const Geom::Point2D< T > &  posvec 
)
inlinestaticprotected

◆ isSelfIntersecting()

template<class T >
bool ODPolygon< T >::isSelfIntersecting
inline

◆ isUTurn()

template<class T >
bool ODPolygon< T >::isUTurn ( int  idx) const
inline

◆ keepBendPoints()

template<class T >
void ODPolygon< T >::keepBendPoints ( float  eps)
inline

◆ maxDistToBorderEstimate()

template<class T >
double ODPolygon< T >::maxDistToBorderEstimate ( double  maxrelerr = 0.001) const
inline

◆ nextVertex()

template<class T >
const Geom::Point2D< T > & ODPolygon< T >::nextVertex ( int  idx) const
inline

◆ operator==()

template<class T >
bool ODPolygon< T >::operator== ( const ODPolygon< T > &  poly) const
inline

◆ operator>()

template<class T >
bool ODPolygon< T >::operator> ( const ODPolygon< T > &  plg) const
inline

◆ prevVertex()

template<class T >
const Geom::Point2D< T > & ODPolygon< T >::prevVertex ( int  idx) const
inline

◆ remove()

template<class T >
void ODPolygon< T >::remove ( int  idx)
inline

◆ removeZeroLengths()

template<class T >
void ODPolygon< T >::removeZeroLengths
inline

◆ reverse()

template<class T >
void ODPolygon< T >::reverse
inline

◆ segmentMeetsBorder()

template<class T >
bool ODPolygon< T >::segmentMeetsBorder ( const Geom::Point2D< T > &  pt1,
const Geom::Point2D< T > &  pt2,
eps 
) const
inline

◆ setClosed()

template<class T >
void ODPolygon< T >::setClosed ( bool  yn)
inline

◆ setEmpty()

template<class T >
void ODPolygon< T >::setEmpty ( )
inline

◆ setUdf()

template<class T >
void ODPolygon< T >::setUdf ( Geom::Point2D< T >  pt)
inline

◆ sgnArea2()

template<class T >
template<class ST >
ST ODPolygon< T >::sgnArea2
inlineprotected

◆ sgnDistToLine()

template<class T >
double ODPolygon< T >::sgnDistToLine ( const Geom::Point2D< T > &  point,
const Geom::Point2D< T > &  dirvec,
const Geom::Point2D< T > &  posvec 
)
inlinestaticprotected

◆ size()

template<class T >
int ODPolygon< T >::size ( ) const
inline

◆ validIdx()

template<class T >
bool ODPolygon< T >::validIdx ( int  idx) const
inline

◆ windowOverlaps()

template<class T >
bool ODPolygon< T >::windowOverlaps ( const Interval< T > &  xrange,
const Interval< T > &  yrange,
eps 
) const
inline

Member Data Documentation

◆ closed_

template<class T >
bool ODPolygon< T >::closed_
protected

◆ poly_

template<class T >
TypeSet<Geom::Point2D<T> > ODPolygon< T >::poly_
protected

◆ udf_

template<class T >
Geom::Point2D<T> ODPolygon< T >::udf_
protected

◆ xrg_

template<class T >
Interval<T> ODPolygon< T >::xrg_
mutableprotected

◆ yrg_

template<class T >
Interval<T> ODPolygon< T >::yrg_
mutableprotected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024