dlr::geometry::LineSegment2D Class Reference

The LineSegment2D class represents a line segment in 2D space. More...

#include <lineSegment2D.h>

List of all members.

Public Member Functions

 LineSegment2D ()
 The default constructor initializes to the line segment that starts at the origin and ends at (1, 0).
 LineSegment2D (const Vector2D &startPoint, const Vector2D &endPoint)
 This constructor initializes the line segment using a pair of points.
 LineSegment2D (const LineSegment2D &source)
 The copy constructor deep copies its argument.
 ~LineSegment2D ()
 Destructor.
LineSegment2D & operator= (const LineSegment2D &source)
 The assignment operator deep copies its argument.
const Vector2D & getEndPoint () const
 This member function returns the end point of the line segment.
const Vector2D & getVertex0 () const
 This member function returns the start point of the line segment.
const Vector2D & getVertex1 () const
 This member function returns the end point of the line segment.
const Vector2D & getStartPoint () const
 This member function returns the start point of the line segment.
LineSegment2D & setValue (double startPointX, double startPointY, double endPointX, double endPointY)
 This member function changes the start point and end point of the line segment.
LineSegment2D & setValue (Vector2D const &startPoint, Vector2D const &endPoint)
 This member function changes the start point and end point of the line segment.


Detailed Description

The LineSegment2D class represents a line segment in 2D space.

Definition at line 28 of file lineSegment2D.h.


Constructor & Destructor Documentation

dlr::geometry::LineSegment2D::LineSegment2D (  )  [inline]

The default constructor initializes to the line segment that starts at the origin and ends at (1, 0).

Definition at line 35 of file lineSegment2D.h.

dlr::geometry::LineSegment2D::LineSegment2D ( const Vector2D &  startPoint,
const Vector2D &  endPoint 
) [inline]

This constructor initializes the line segment using a pair of points.

Parameters:
point This argument specifies the start point of the line segment.
endPoint This argument specifies the end point of the line segment.

Definition at line 48 of file lineSegment2D.h.

dlr::geometry::LineSegment2D::LineSegment2D ( const LineSegment2D &  source  )  [inline]

The copy constructor deep copies its argument.

Parameters:
source This argument is the class instance to be copied.

Definition at line 59 of file lineSegment2D.h.

dlr::geometry::LineSegment2D::~LineSegment2D (  )  [inline]

Destructor.

Definition at line 66 of file lineSegment2D.h.


Member Function Documentation

const Vector2D& dlr::geometry::LineSegment2D::getEndPoint (  )  const [inline]

This member function returns the end point of the line segment.

Returns:
The return value is a const reference to Vector2D representing the end point of the line segment.

Definition at line 88 of file lineSegment2D.h.

const Vector2D& dlr::geometry::LineSegment2D::getStartPoint (  )  const [inline]

This member function returns the start point of the line segment.

Returns:
The return value is a const reference to Vector2D representing the start point of the line segment.

Definition at line 118 of file lineSegment2D.h.

const Vector2D& dlr::geometry::LineSegment2D::getVertex0 (  )  const [inline]

This member function returns the start point of the line segment.

Returns:
The return value is a const reference to Vector2D representing the start point of the line segment.

Definition at line 98 of file lineSegment2D.h.

const Vector2D& dlr::geometry::LineSegment2D::getVertex1 (  )  const [inline]

This member function returns the end point of the line segment.

Returns:
The return value is a const reference to Vector2D representing the end point of the line segment.

Definition at line 108 of file lineSegment2D.h.

LineSegment2D & dlr::geometry::LineSegment2D::operator= ( const LineSegment2D &  source  ) 

The assignment operator deep copies its argument.

Parameters:
source This argument is the class instance to be copied.
Returns:
The return value is a reference to *this.

Definition at line 27 of file lineSegment2D.cpp.

References m_endPoint, and m_startPoint.

LineSegment2D& dlr::geometry::LineSegment2D::setValue ( Vector2D const &  startPoint,
Vector2D const &  endPoint 
) [inline]

This member function changes the start point and end point of the line segment.

Parameters:
startPoint This argument is the new start point.
endPoint This argument is the new end point.
Returns:
The return value is a reference to *this after the change has been applied.

Definition at line 157 of file lineSegment2D.h.

LineSegment2D& dlr::geometry::LineSegment2D::setValue ( double  startPointX,
double  startPointY,
double  endPointX,
double  endPointY 
) [inline]

This member function changes the start point and end point of the line segment.

Parameters:
startPointX This argument is the new start point X coordinate.
startPointY This argument is the new start point Y coordinate.
endPointX This argument is the new end point X coordinate.
endPointY This argument is the new end point Y coordinate.
Returns:
The return value is a reference to *this after the change has been applied.

Definition at line 137 of file lineSegment2D.h.


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

Generated on Wed Nov 25 11:45:25 2009 for dlrGeometry Utility Library by  doxygen 1.5.8