ESyS-Particle  2.3.4
LineSegment Class Reference

Class representing a line segment for intersection/fitting calculation in 2D. More...

#include <LineSegment.h>

Inheritance diagram for LineSegment:
Collaboration diagram for LineSegment:

Public Member Functions

 LineSegment (const Vec3 &, const Vec3 &)
 
virtual ~LineSegment ()
 
virtual double sep (const Vec3 &)
 
virtual bool intersect (const Vec3 &, const Vec3 &)
 
Vec3 getP1 ()
 
Vec3 getP2 ()
 
- Public Member Functions inherited from Line
 Line (const Vec3 &, const Vec3 &)
 
virtual ~Line ()
 
Vec3 GetU () const
 
Vec3 GetO () const
 
Vec3 GetN () const
 

Private Attributes

double m_len
 

Additional Inherited Members

- Protected Member Functions inherited from Line
 Line ()
 
- Protected Attributes inherited from Line
Vec3 Pos
 
Vec3 U
 
Vec3 N
 

Detailed Description

Class representing a line segment for intersection/fitting calculation in 2D.

Author
Steffen Abe $Date$ $Revision$

Constructor & Destructor Documentation

◆ LineSegment()

LineSegment::LineSegment ( const Vec3 P0,
const Vec3 P1 
)

constructor

Parameters
P01st end point
P12nd end point
Warning
doesn't check P0!=P1

References m_len, Line::N, Line::Pos, Line::U, Vec3::X(), Vec3::Y(), and Vec3::Z().

Here is the call graph for this function:

◆ ~LineSegment()

virtual LineSegment::~LineSegment ( )
inlinevirtual

Member Function Documentation

◆ getP1()

Vec3 LineSegment::getP1 ( )
inline

References Line::Pos.

◆ getP2()

Vec3 LineSegment::getP2 ( )
inline

References m_len, Line::Pos, and Line::U.

◆ intersect()

bool LineSegment::intersect ( const Vec3 P1,
const Vec3 P2 
)
virtual

returns if the connecting line between two points intersects the line segment

Parameters
P11st point
P22nd point

References m_len, Line::Pos, Line::U, Vec3::X(), and Vec3::Y().

Here is the call graph for this function:

◆ sep()

double LineSegment::sep ( const Vec3 P)
virtual

distance between a point and the line segment

Parameters
Pthe position of the point

Reimplemented from Line.

References m_len, Line::N, Line::Pos, and Line::U.

Member Data Documentation

◆ m_len

double LineSegment::m_len
private

Referenced by getP2(), intersect(), LineSegment(), and sep().


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