gz/math/Line3.hh
Definition: gz/math/AdditivelySeparableScalarField3.hh:27
Line3(const double _x1, const double _y1, const double _z1, const double _x2, const double _y2, const double _z2)
Constructor.
Definition: gz/math/Line3.hh:74
bool Distance(const Line3< T > &_line, Line3< T > &_result, const double _epsilon=1e-6) const
Get the shortest line between this line and the provided line.
Definition: gz/math/Line3.hh:160
T Length() const
Returns the length (magnitude) of the vector.
Definition: gz/math/Vector3.hh:122
Line3(const math::Vector3< T > &_ptA, const math::Vector3< T > &_ptB)
Constructor.
Definition: gz/math/Line3.hh:51
T Distance(const Vector3< T > &_pt)
Calculate shortest distance between line and point.
Definition: gz/math/Line3.hh:235
bool Within(const math::Vector3< T > &_pt, double _epsilon=1e-6) const
Check if the given point is between the start and end points of the line segment.
Definition: gz/math/Line3.hh:351
void Set(const double _x1, const double _y1, const double _x2, const double _y2, const double _z=0)
Set the start and end point of the line segment, assuming that both points have the same height.
Definition: gz/math/Line3.hh:113
Line3(const double _x1, const double _y1, const double _x2, const double _y2)
2D Constructor where Z coordinates are 0
Definition: gz/math/Line3.hh:61
bool Parallel(const Line3< T > &_line, const double _epsilon=1e-6) const
Test if this line and the given line are parallel.
Definition: gz/math/Line3.hh:292
STL class.
void Set(const math::Vector3< T > &_ptA, const math::Vector3< T > &_ptB)
Set the start and end point of the line segment.
Definition: gz/math/Line3.hh:84
Line3 & operator=(const Line3< T > &_line)
Assignment operator.
Definition: gz/math/Line3.hh:406
T clamp(T _v, T _min, T _max)
Simple clamping function.
Definition: gz/math/Helpers.hh:406
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
bool Intersect(const Line3< T > &_line, math::Vector3< T > &_pt, double _epsilon=1e-6) const
Check if this line intersects the given line segment. The point of intersection is returned in the _p...
Definition: gz/math/Line3.hh:307
void SetA(const math::Vector3< T > &_ptA)
Set the start point of the line segment.
Definition: gz/math/Line3.hh:93
bool Coplanar(const Line3< T > &_line, const double _epsilon=1e-6) const
Test if this line and the given line are coplanar.
Definition: gz/math/Line3.hh:279
A three dimensional line segment. The line is defined by a start and end point.
Definition: gz/math/Line3.hh:35
bool operator!=(const Line3< T > &_line) const
Inequality operator.
Definition: gz/math/Line3.hh:379
T min(T... args)
void SetB(const math::Vector3< T > &_ptB)
Set the end point of the line segment.
Definition: gz/math/Line3.hh:100
Line3(const Line3< T > &_line)
Copy constructor.
Definition: gz/math/Line3.hh:42
math::Vector3< T > operator[](const size_t _index) const
Get the start or end point.
Definition: gz/math/Line3.hh:387
void Set(const double _x1, const double _y1, const double _z1, const double _x2, const double _y2, const double _z2)
Set the start and end point of the line segment.
Definition: gz/math/Line3.hh:128
math::Vector3< T > Direction() const
Get the direction of the line.
Definition: gz/math/Line3.hh:138
friend std::ostream & operator<<(std::ostream &_out, const Line3< T > &_line)
Stream extraction operator.
Definition: gz/math/Line3.hh:396
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
static const size_t IGN_ONE_SIZE_T
size_t type with a value of 1
Definition: gz/math/Helpers.hh:230
T Dot(const Vector3< T > &_v) const
Return the dot product of this vector and another vector.
Definition: gz/math/Vector3.hh:205
bool operator==(const Line3< T > &_line) const
Equality operator.
Definition: gz/math/Line3.hh:371
T max(T... args)