papyrus logo

Papyrus::LineSegment< PointType > Struct Template Reference

A very simple line segment primitive template. More...

#include <primitives.h>

List of all members.

Public Member Functions

 LineSegment (double x1=0.0, double y1=0.0, double x2=0.0, double y2=0.0)
 LineSegment (const PointType &point0, const PointType &point1)
 LineSegment (const LineSegment &l)
void invalidate ()
 operator bool ()
PointType & operator[] (int i)
const PointType & operator[] (int i) const

Public Attributes

PointType p0
PointType p1

Detailed Description

template<typename PointType>
struct Papyrus::LineSegment< PointType >

A very simple line segment primitive template.

This is templatized to allow the point primitive to vary.

The point type must support an invalidate() method as well as operator bool(). Anything derived from Point will work.


Constructor & Destructor Documentation

template<typename PointType>
Papyrus::LineSegment< PointType >::LineSegment ( double  x1 = 0.0,
double  y1 = 0.0,
double  x2 = 0.0,
double  y2 = 0.0 
) [inline]
template<typename PointType>
Papyrus::LineSegment< PointType >::LineSegment ( const PointType &  point0,
const PointType &  point1 
) [inline]
template<typename PointType>
Papyrus::LineSegment< PointType >::LineSegment ( const LineSegment< PointType > &  l  )  [inline]

Member Function Documentation

template<typename PointType>
void Papyrus::LineSegment< PointType >::invalidate (  )  [inline]
template<typename PointType>
Papyrus::LineSegment< PointType >::operator bool (  )  [inline]
template<typename PointType>
const PointType& Papyrus::LineSegment< PointType >::operator[] ( int  i  )  const [inline]
template<typename PointType>
PointType& Papyrus::LineSegment< PointType >::operator[] ( int  i  )  [inline]

Member Data Documentation

template<typename PointType>
PointType Papyrus::LineSegment< PointType >::p0
template<typename PointType>
PointType Papyrus::LineSegment< PointType >::p1

The documentation for this struct was generated from the following file:

Generated on Fri Apr 16 12:41:08 2010 for papyrus by doxygen 1.6.1