Segment2D

Description

Represents a directed line segment described by its start- and end-point.

struct Segment2D
{
	Point2D point1;
	Point2D point2;

	Point2D Point1( void ) const;
	Point2D Point2( void ) const;
	float X1( void ) const;
	float Y1( void ) const;
	float X2( void ) const;
	float Y2( void ) const;

	bool operator == ( const Segment2D& rhs ) const;
	bool operator != ( const Segment2D& rhs ) const;

	float Length() const;
}

Structure fields and default values (if defined) are described below:

struct Segment2D
{
	Point2D	Point1;
	Point2D	Point2;


	Point2D Point1( void ) const	{ return Point1;	};
	Point2D Point2( void ) const	{ return Point2;	};

	bool operator == ( const avl::Segment2D& rhs ) const
	{
		return Point1 == rhs.Point1 && 
			Point2 == rhs.Point2;
	}

	bool operator != ( const avl::Segment2D& rhs ) const
	{
		return !(operator==(rhs));
	}

};