34 PolyLine(
const std::vector<T> &aPoints ) : mPoints( aPoints ), mClosed( false ) {}
36 const std::vector<T>&
getPoints()
const {
return mPoints; }
41 typedef typename std::vector<T>::iterator
iterator;
43 size_t size()
const {
return mPoints.size(); }
51 void setClosed(
bool aClosed =
true ) { mClosed = aClosed; }
57 void scale(
const T &scaleFactor, T scaleCenter = T::zero() );
58 void offset(
const T &offsetBy );
64 static std::vector<PolyLine>
calcUnion(
const std::vector<PolyLine> &
a, std::vector<PolyLine> &
b );
66 static std::vector<PolyLine>
calcIntersection(
const std::vector<PolyLine> &
a, std::vector<PolyLine> &
b );
68 static std::vector<PolyLine>
calcXor(
const std::vector<PolyLine> &
a, std::vector<PolyLine> &
b );
70 static std::vector<PolyLine>
calcDifference(
const std::vector<PolyLine> &
a, std::vector<PolyLine> &
b );
73 std::vector<T> mPoints;
T getPosition(float t) const
Definition: PolyLine.cpp:33
iterator begin()
Definition: PolyLine.h:46
PolyLine< Vec2f > PolyLine2f
Definition: PolyLine.h:77
const_iterator end() const
Definition: PolyLine.h:49
iterator end()
Definition: PolyLine.h:48
std::vector< T >::iterator iterator
Definition: PolyLine.h:41
bool isClosed() const
Definition: PolyLine.h:52
const_iterator begin() const
Definition: PolyLine.h:47
static std::vector< PolyLine > calcXor(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 vecto...
Definition: PolyLine.cpp:196
PolyLine()
Definition: PolyLine.h:33
T getDerivative(float t) const
Definition: PolyLine.cpp:47
PolyLine< Vec2d > PolyLine2d
Definition: PolyLine.h:78
std::vector< T >::const_iterator const_iterator
Definition: PolyLine.h:40
size_t size() const
Definition: PolyLine.h:43
bool contains(const Vec2f &pt) const
Returns whether the point pt is contained within the boundaries of the PolyLine.
Definition: PolyLine.cpp:92
const GLdouble * v
Definition: GLee.h:1384
GLboolean GLboolean GLboolean b
Definition: GLee.h:2964
const std::vector< T > & getPoints() const
Definition: PolyLine.h:36
void push_back(const T &v)
Definition: PolyLine.h:45
std::vector< T > & getPoints()
Definition: PolyLine.h:37
GLboolean GLboolean GLboolean GLboolean a
Definition: GLee.h:2964
static std::vector< PolyLine > calcIntersection(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 outer...
Definition: PolyLine.cpp:177
static std::vector< PolyLine > calcUnion(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 an...
Definition: PolyLine.cpp:158
void setClosed(bool aClosed=true)
Definition: PolyLine.h:51
void scale(const T &scaleFactor, T scaleCenter=T::zero())
Definition: PolyLine.cpp:60
Definition: PolyLine.h:31
void offset(const T &offsetBy)
Definition: PolyLine.cpp:67
GLdouble GLdouble t
Definition: GLee.h:1426
PolyLine(const std::vector< T > &aPoints)
Definition: PolyLine.h:34
static std::vector< PolyLine > calcDifference(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 outermo...
Definition: PolyLine.cpp:215