Class Triangle2D

Class Documentation

class G2lib::Triangle2D

Class to manage Triangle for BB of clothoid curve

Public Functions

inline Triangle2D(Triangle2D const &t)
inline Triangle2D()
inline Triangle2D(real_type x1, real_type y1, real_type x2, real_type y2, real_type x3, real_type y3, real_type s0, real_type s1, int_type icurve)
inline Triangle2D(real_type const p1[2], real_type const p2[2], real_type const p3[2], real_type s0, real_type s1, int_type icurve)
inline ~Triangle2D()
inline Triangle2D const &operator=(Triangle2D const &t)
inline void build(real_type const p1[2], real_type const p2[2], real_type const p3[2], real_type s0, real_type s1, int_type icurve)
inline void build(real_type x1, real_type y1, real_type x2, real_type y2, real_type x3, real_type y3, real_type s0, real_type s1, int_type icurve)
inline int_type Icurve() const
inline real_type x1() const
inline real_type y1() const
inline real_type x2() const
inline real_type y2() const
inline real_type x3() const
inline real_type y3() const
inline real_type S0() const
inline real_type S1() const
inline void translate(real_type tx, real_type ty)
void rotate(real_type angle, real_type cx, real_type cy)
inline void scale(real_type sc)
inline void bbox(real_type &xmin, real_type &ymin, real_type &xmax, real_type &ymax) const
inline real_type baricenterX() const
inline real_type baricenterY() const
inline real_type const *P1() const
inline real_type const *P2() const
inline real_type const *P3() const
bool overlap(Triangle2D const&) const
inline int_type isCounterClockwise() const

return +1 = CounterClockwise return -1 = Clockwise return 0 = degenerate triangle

inline int_type isInside(real_type x, real_type y) const

return +1 = inside return -1 = outside return 0 = on the border

inline int_type isInside(real_type const pt[2]) const
real_type distMin(real_type x, real_type y) const
real_type distMax(real_type x, real_type y) const
inline void info(ostream_type &stream) const

Friends

friend ostream_type &operator<<(ostream_type &stream, Triangle2D const &c)