OpendTect  7.0
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 > &)
 
const Geom::Point2D< T > & getStart () const
 
const Geom::Point2D< T > & getStop () const
 
bool isIntersecting () const
 
bool isStartChanged () const
 
bool isStopChanged () const
 
void setLine (const Geom::Point2D< T > &start, const Geom::Point2D< T > &stop)
 

Protected Member Functions

const T castDouble2T (double) const
 

Protected Attributes

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

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

◆ LineRectangleClipper()

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

Member Function Documentation

◆ castDouble2T()

template<class T >
const T LineRectangleClipper< T >::castDouble2T ( double  d) const
inlineprotected

◆ getStart()

template<class T >
const Geom::Point2D< T > & LineRectangleClipper< T >::getStart
inline

◆ getStop()

template<class T >
const Geom::Point2D< T > & LineRectangleClipper< T >::getStop
inline

◆ isIntersecting()

template<class T >
bool LineRectangleClipper< T >::isIntersecting
inline

◆ isStartChanged()

template<class T >
bool LineRectangleClipper< T >::isStartChanged
inline

◆ isStopChanged()

template<class T >
bool LineRectangleClipper< T >::isStopChanged
inline

◆ setLine()

template<class T >
void LineRectangleClipper< T >::setLine ( const Geom::Point2D< T > &  start,
const Geom::Point2D< T > &  stop 
)
inline

Member Data Documentation

◆ isintersecting_

template<class T >
bool LineRectangleClipper< T >::isintersecting_
protected

◆ rect_

template<class T >
Geom::Rectangle<T> LineRectangleClipper< T >::rect_
protected

◆ start_

template<class T >
Geom::Point2D<T> LineRectangleClipper< T >::start_
protected

◆ startchanged_

template<class T >
bool LineRectangleClipper< T >::startchanged_
protected

◆ stop_

template<class T >
Geom::Point2D<T> LineRectangleClipper< T >::stop_
protected

◆ stopchanged_

template<class T >
bool LineRectangleClipper< T >::stopchanged_
protected

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