gz/math/Triangle3.hh
Vector3d Normal() const
Get the triangle's normal vector.
Definition: gz/math/Triangle3.hh:159
static Vector3 Normal(const Vector3< T > &_v1, const Vector3< T > &_v2, const Vector3< T > &_v3)
Get a normal vector to a triangle.
Definition: gz/math/Vector3.hh:258
Vector3< T > operator[](const size_t _index) const
Get one of points that define the triangle.
Definition: gz/math/Triangle3.hh:266
Definition: gz/math/AdditivelySeparableScalarField3.hh:27
A 3-dimensional triangle and related functions.
Definition: gz/math/Triangle3.hh:36
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/Triangle3.hh:92
bool equal(const T &_a, const T &_b, const T &_epsilon=T(1e-6))
check if two values are equal, within a tolerance
Definition: gz/math/Helpers.hh:556
bool Contains(const Line3< T > &_line) const
Check if this triangle completely contains the given line segment.
Definition: gz/math/Triangle3.hh:122
bool Intersects(const Line3< T > &_line, Vector3< T > &_ipt1) const
Get whether the given line intersects an edge of this triangle.
Definition: gz/math/Triangle3.hh:183
Line3< T > Side(const unsigned int _index) const
Get a line segment for one side of the triangle.
Definition: gz/math/Triangle3.hh:107
static const size_t IGN_TWO_SIZE_T
size_t type with a value of 2
Definition: gz/math/Helpers.hh:233
T clamp(T _v, T _min, T _max)
Simple clamping function.
Definition: gz/math/Helpers.hh:406
bool Contains(const Vector3< T > &_pt) const
Get whether this triangle contains the given point.
Definition: gz/math/Triangle3.hh:130
void Set(const Vector3< T > &_pt1, const Vector3< T > &_pt2, const Vector3< T > &_pt3)
Set all vertices of the triangle.
Definition: gz/math/Triangle3.hh:79
The Vector3 class represents the generic vector containing 3 elements. Since it's commonly used to ke...
Definition: gz/math/Vector3.hh:41
T Length() const
Get the length of the line.
Definition: gz/math/Line3.hh:145
T Perimeter() const
Get the length of the triangle's perimeter.
Definition: gz/math/Triangle3.hh:242
Triangle3< float > Triangle3f
Float specialization of the Triangle class.
Definition: gz/math/Triangle3.hh:282
Triangle3< int > Triangle3i
Integer specialization of the Triangle class.
Definition: gz/math/Triangle3.hh:276
A three dimensional line segment. The line is defined by a start and end point.
Definition: gz/math/Line3.hh:35
void Set(const unsigned int _index, const Vector3< T > &_pt)
Set one vertex of the triangle.
Definition: gz/math/Triangle3.hh:65
Triangle3(const Vector3< T > &_pt1, const Vector3< T > &_pt2, const Vector3< T > &_pt3)
Constructor.
Definition: gz/math/Triangle3.hh:49
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 Line3< T > &_line, double _epsilon=1e-6) const
Check if this line intersects the given line segment.
Definition: gz/math/Line3.hh:267
T Dot(const Vector3< T > &_v) const
Return the dot product of this vector and another vector.
Definition: gz/math/Vector3.hh:205
Triangle3< double > Triangle3d
Double specialization of the Triangle class.
Definition: gz/math/Triangle3.hh:279
double Area() const
Get the area of this triangle.
Definition: gz/math/Triangle3.hh:250