MIRA
Public Types | Public Member Functions | Public Attributes | List of all members
Line< T, D > Class Template Reference

Represents a line segment that is spanned by two given points. More...

#include <geometry/Line.h>

Public Types

typedef Point< T, D > PointType
 

Public Member Functions

 Line ()
 Creates an uninitialized line segment. More...
 
 Line (const PointType &p1, const PointType &p2)
 Creates a line segment that is spanned by two given points. More...
 
const PointTypefront () const
 Returns a reference to the first point of the line segment. More...
 
PointTypefront ()
 Returns a reference to the first point of the line segment. More...
 
const PointTypeback () const
 Returns a reference to the second point of the line segment. More...
 
PointTypeback ()
 Returns a reference to the second point of the line segment. More...
 
template<typename Reflector >
void reflect (Reflector &r)
 

Public Attributes

PointType first
 The two points of the line segment. More...
 
PointType second
 

Detailed Description

template<typename T, int D>
class mira::Line< T, D >

Represents a line segment that is spanned by two given points.

Member Typedef Documentation

◆ PointType

typedef Point<T,D> PointType

Constructor & Destructor Documentation

◆ Line() [1/2]

Line ( )
inline

Creates an uninitialized line segment.

◆ Line() [2/2]

Line ( const PointType p1,
const PointType p2 
)
inline

Creates a line segment that is spanned by two given points.

Member Function Documentation

◆ front() [1/2]

const PointType& front ( ) const
inline

Returns a reference to the first point of the line segment.

◆ front() [2/2]

PointType& front ( )
inline

Returns a reference to the first point of the line segment.

◆ back() [1/2]

const PointType& back ( ) const
inline

Returns a reference to the second point of the line segment.

◆ back() [2/2]

PointType& back ( )
inline

Returns a reference to the second point of the line segment.

◆ reflect()

void reflect ( Reflector &  r)
inline

Member Data Documentation

◆ first

PointType first

The two points of the line segment.

◆ second

PointType second

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