Cinder  0.8.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | List of all members
cinder::PolyLine< T > Class Template Reference

#include <PolyLine.h>

Public Types

typedef std::vector< T >
::const_iterator 
const_iterator
 
typedef std::vector< T >::iterator iterator
 

Public Member Functions

 PolyLine ()
 
 PolyLine (const std::vector< T > &aPoints)
 
const std::vector< T > & getPoints () const
 
std::vector< T > & getPoints ()
 
size_t size () const
 
void push_back (const T &v)
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
void setClosed (bool aClosed=true)
 
bool isClosed () const
 
getPosition (float t) const
 
getDerivative (float t) const
 
void scale (const T &scaleFactor, T scaleCenter=T::zero())
 
void offset (const T &offsetBy)
 
bool contains (const Vec2f &pt) const
 Returns whether the point pt is contained within the boundaries of the PolyLine. More...
 

Static Public Member Functions

static std::vector< PolyLinecalcUnion (const std::vector< PolyLine > &a, std::vector< PolyLine > &b)
 Calculates the boolean union of a and b. Assumes the first PolyLine in the vector is the outermost and the (optional) others are holes. More...
 
static std::vector< PolyLinecalcIntersection (const std::vector< PolyLine > &a, std::vector< PolyLine > &b)
 Calculates the boolean intersection of a and b. Assumes the first PolyLine in the vector is the outermost and the (optional) others are holes. More...
 
static std::vector< PolyLinecalcXor (const std::vector< PolyLine > &a, std::vector< PolyLine > &b)
 Calculates the boolean XOR (symmetric difference) of a and b. Assumes the first PolyLine in the vector is the outermost and the (optional) others are holes. More...
 
static std::vector< PolyLinecalcDifference (const std::vector< PolyLine > &a, std::vector< PolyLine > &b)
 Calculates the boolean difference of a and b. Assumes the first PolyLine in the vector is the outermost and the (optional) others are holes. More...
 

Member Typedef Documentation

template<typename T>
typedef std::vector<T>::const_iterator cinder::PolyLine< T >::const_iterator
template<typename T>
typedef std::vector<T>::iterator cinder::PolyLine< T >::iterator

Constructor & Destructor Documentation

template<typename T>
cinder::PolyLine< T >::PolyLine ( )
template<typename T>
cinder::PolyLine< T >::PolyLine ( const std::vector< T > &  aPoints)

Member Function Documentation

template<typename T>
const std::vector<T>& cinder::PolyLine< T >::getPoints ( ) const
template<typename T>
std::vector<T>& cinder::PolyLine< T >::getPoints ( )
template<typename T>
size_t cinder::PolyLine< T >::size ( ) const
template<typename T>
void cinder::PolyLine< T >::push_back ( const T &  v)
template<typename T>
iterator cinder::PolyLine< T >::begin ( )
template<typename T>
const_iterator cinder::PolyLine< T >::begin ( ) const
template<typename T>
iterator cinder::PolyLine< T >::end ( )
template<typename T>
const_iterator cinder::PolyLine< T >::end ( ) const
template<typename T>
void cinder::PolyLine< T >::setClosed ( bool  aClosed = true)
template<typename T>
bool cinder::PolyLine< T >::isClosed ( ) const
template<typename T >
T cinder::PolyLine< T >::getPosition ( float  t) const
template<typename T >
T cinder::PolyLine< T >::getDerivative ( float  t) const
template<typename T>
void cinder::PolyLine< T >::scale ( const T &  scaleFactor,
scaleCenter = T::zero() 
)
template<typename T>
void cinder::PolyLine< T >::offset ( const T &  offsetBy)
template<typename T >
bool cinder::PolyLine< T >::contains ( const Vec2f pt) const

Returns whether the point pt is contained within the boundaries of the PolyLine.

template<typename T>
std::vector< PolyLine< T > > cinder::PolyLine< T >::calcUnion ( const std::vector< PolyLine< T > > &  a,
std::vector< PolyLine< T > > &  b 
)
static

Calculates the boolean union of a and b. Assumes the first PolyLine in the vector is the outermost and the (optional) others are holes.

template<typename T>
std::vector< PolyLine< T > > cinder::PolyLine< T >::calcIntersection ( const std::vector< PolyLine< T > > &  a,
std::vector< PolyLine< T > > &  b 
)
static

Calculates the boolean intersection of a and b. Assumes the first PolyLine in the vector is the outermost and the (optional) others are holes.

template<typename T>
std::vector< PolyLine< T > > cinder::PolyLine< T >::calcXor ( const std::vector< PolyLine< T > > &  a,
std::vector< PolyLine< T > > &  b 
)
static

Calculates the boolean XOR (symmetric difference) of a and b. Assumes the first PolyLine in the vector is the outermost and the (optional) others are holes.

template<typename T>
std::vector< PolyLine< T > > cinder::PolyLine< T >::calcDifference ( const std::vector< PolyLine< T > > &  a,
std::vector< PolyLine< T > > &  b 
)
static

Calculates the boolean difference of a and b. Assumes the first PolyLine in the vector is the outermost and the (optional) others are holes.


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