OpendTect-6_4  6.4
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LineRectangleClipper< T > Class Template Reference

Clips a line between two points by a rectangle. The line may be completely outside, completely inside or partially inside. If partially inside, new endpoints are calculated. More...

Public Member Functions

 LineRectangleClipper (const Geom::Rectangle< T > &)
 
void setLine (const Geom::Point2D< T > &start, const Geom::Point2D< T > &stop)
 
bool isIntersecting () const
 
bool isStartChanged () const
 
bool isStopChanged () const
 
const Geom::Point2D< T > & getStart () const
 
const Geom::Point2D< T > & getStop () const
 

Protected Member Functions

const T castDouble2T (double) const
 

Protected Attributes

bool isintersecting_
 
bool startchanged_
 
bool stopchanged_
 
Geom::Point2D< T > start_
 
Geom::Point2D< T > stop_
 
Geom::Rectangle< T > rect_
 

Detailed Description

template<class T>
class LineRectangleClipper< T >

Clips a line between two points by a rectangle. The line may be completely outside, completely inside or partially inside. If partially inside, new endpoints are calculated.

Constructor & Destructor Documentation

template<class T >
LineRectangleClipper< T >::LineRectangleClipper ( const Geom::Rectangle< T > &  r)
inline

Member Function Documentation

template<class T >
const T LineRectangleClipper< T >::castDouble2T ( double  d) const
inlineprotected
template<class T >
const Geom::Point2D< T > & LineRectangleClipper< T >::getStart ( ) const
inline
template<class T >
const Geom::Point2D< T > & LineRectangleClipper< T >::getStop ( ) const
inline
template<class T >
bool LineRectangleClipper< T >::isIntersecting ( ) const
inline
template<class T >
bool LineRectangleClipper< T >::isStartChanged ( ) const
inline
template<class T >
bool LineRectangleClipper< T >::isStopChanged ( ) const
inline
template<class T >
void LineRectangleClipper< T >::setLine ( const Geom::Point2D< T > &  start,
const Geom::Point2D< T > &  stop 
)
inline

Member Data Documentation

template<class T>
bool LineRectangleClipper< T >::isintersecting_
protected
template<class T>
Geom::Rectangle<T> LineRectangleClipper< T >::rect_
protected
template<class T>
Geom::Point2D<T> LineRectangleClipper< T >::start_
protected
template<class T>
bool LineRectangleClipper< T >::startchanged_
protected
template<class T>
Geom::Point2D<T> LineRectangleClipper< T >::stop_
protected
template<class T>
bool LineRectangleClipper< T >::stopchanged_
protected

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