gz/math/Triangle.hh
T Perimeter() const
Get the length of the triangle's perimeter.
Definition: gz/math/Triangle.hh:202
Triangle< double > Triangled
Double specialization of the Triangle class.
Definition: gz/math/Triangle.hh:240
bool Intersects(const Line2< T > &_line, math::Vector2< T > &_ipt1, math::Vector2< T > &_ipt2) const
Get whether the given line intersects this triangle.
Definition: gz/math/Triangle.hh:147
Definition: gz/math/AdditivelySeparableScalarField3.hh:27
Triangle(const math::Vector2< T > &_pt1, const math::Vector2< T > &_pt2, const math::Vector2< T > &_pt3)
Constructor.
Definition: gz/math/Triangle.hh:45
T size(T... args)
bool Contains(const math::Vector2< T > &_pt) const
Get whether this triangle contains the given point.
Definition: gz/math/Triangle.hh:117
A two dimensional line segment. The line is defined by a start and end point.
Definition: gz/math/Line2.hh:35
static const size_t IGN_TWO_SIZE_T
size_t type with a value of 2
Definition: gz/math/Helpers.hh:233
Triangle< int > Trianglei
Integer specialization of the Triangle class.
Definition: gz/math/Triangle.hh:237
bool Valid() const
Get whether this triangle is valid, based on triangle inequality: the sum of the lengths of any two s...
Definition: gz/math/Triangle.hh:79
T clamp(T _v, T _min, T _max)
Simple clamping function.
Definition: gz/math/Helpers.hh:406
Triangle< float > Trianglef
Float specialization of the Triangle class.
Definition: gz/math/Triangle.hh:243
math::Vector2< T > operator[](const size_t _index) const
Get one of points that define the triangle.
Definition: gz/math/Triangle.hh:227
bool Contains(const Line2< T > &_line) const
Check if this triangle completely contains the given line segment.
Definition: gz/math/Triangle.hh:109
Line2< T > Side(const unsigned int _index) const
Get a line segment for one side of the triangle.
Definition: gz/math/Triangle.hh:94
T begin(T... args)
T insert(T... args)
static const size_t IGN_ZERO_SIZE_T
size_t type with a value of 0
Definition: gz/math/Helpers.hh:227
bool Intersect(const Line2< T > &_line, double _epsilon=1e-6) const
Check if this line intersects the given line segment.
Definition: gz/math/Line2.hh:180
double Area() const
Get the area of this triangle.
Definition: gz/math/Triangle.hh:210
T empty(T... args)
T Dot(const Vector2< T > &_v) const
Get the dot product of this vector and _v.
Definition: gz/math/Vector2.hh:158
void Set(const unsigned int _index, const math::Vector2< T > &_pt)
Set one vertex of the triangle.
Definition: gz/math/Triangle.hh:57
void Set(const math::Vector2< T > &_pt1, const math::Vector2< T > &_pt2, const math::Vector2< T > &_pt3)
Set all vertices of the triangle.
Definition: gz/math/Triangle.hh:66
STL class.