Public Member Functions | Public Attributes | Friends | List of all members
ion::line2< T > Class Template Reference

2D line segment More...

#include <line2.h>

Public Member Functions

 line2 (vec2< T > const &start, vec2< T > const &end)
 
vec2< TGetMiddle () const
 
vec2< TGetVector () const
 
vec2< TGetNormal () const
 
T Length () const
 
vec2< T > const ClosestPointTo (vec2< T > const &Point) const
 
float GetDistanceFrom (vec2< T > const &Point) const
 
float GetDistanceSqFrom (vec2< T > const &Point) const
 
bool IntersectsWith (line2< T > const &Other, vec2< T > &Intersection) const
 
float GetDistanceFrom (line2< T > const &Other) const
 
float GetDistanceSqFrom (line2< T > const &Other) const
 

Public Attributes

vec2< TStart
 
vec2< TEnd
 

Friends

T Length (line2< T > const &Line)
 

Detailed Description

template<typename T>
class ion::line2< T >

2D line segment

Constructor & Destructor Documentation

template<typename T>
ion::line2< T >::line2 ( vec2< T > const &  start,
vec2< T > const &  end 
)
inline

Member Function Documentation

template<typename T>
vec2<T> const ion::line2< T >::ClosestPointTo ( vec2< T > const &  Point) const
inline
template<typename T>
float ion::line2< T >::GetDistanceFrom ( vec2< T > const &  Point) const
inline
template<typename T>
float ion::line2< T >::GetDistanceFrom ( line2< T > const &  Other) const
inline
template<typename T>
float ion::line2< T >::GetDistanceSqFrom ( vec2< T > const &  Point) const
inline
template<typename T>
float ion::line2< T >::GetDistanceSqFrom ( line2< T > const &  Other) const
inline
template<typename T>
vec2<T> ion::line2< T >::GetMiddle ( ) const
inline
template<typename T>
vec2<T> ion::line2< T >::GetNormal ( ) const
inline
template<typename T>
vec2<T> ion::line2< T >::GetVector ( ) const
inline
template<typename T>
bool ion::line2< T >::IntersectsWith ( line2< T > const &  Other,
vec2< T > &  Intersection 
) const
inline
template<typename T>
T ion::line2< T >::Length ( ) const
inline

Friends And Related Function Documentation

template<typename T>
T Length ( line2< T > const &  Line)
friend

Member Data Documentation

template<typename T>
vec2<T> ion::line2< T >::End
template<typename T>
vec2<T> ion::line2< T >::Start

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