Parametric 2D line segment represented by a start point, end point, and direction. More...
#include <mxvk/include/mxvk/mxvk_math.h>
Public Member Functions | |
| vec2D | ComputePoint (float t) const |
| Compute the point p0 + v * t. | |
| vec2D | ComputePoint (float t) const |
| Compute the point p0 + v * t. | |
| vec2D | ComputePoint (float t, vec2D &out) const |
Compute the point p0 + v * t and write it to out. | |
| vec2D | ComputePoint (float t, vec2D &out) const |
Compute the point p0 + v * t and write it to out. | |
| void | Init (const vec2D &start, const vec2D &end) |
| Initialize from endpoints and derive the direction vector. | |
| void | Init (const vec2D &start, const vec2D &end) |
| Initialize from endpoints and derive the direction vector. | |
| int | Intersect (const paramLine2D &line, float &t_this, float &t_other) const |
| Intersect this segment with another parametric segment. | |
| int | Intersect (const paramLine2D &line, float &t_this, float &t_other) const |
| Intersect this segment with another parametric segment. | |
| int | Intersect (const paramLine2D &line, vec2D &out) const |
| Intersect this segment with another segment and compute the point. | |
| int | Intersect (const paramLine2D &line, vec2D &out) const |
| Intersect this segment with another segment and compute the point. | |
| paramLine2D ()=default | |
| Construct an uninitialized line segment. | |
| paramLine2D ()=default | |
| Construct an uninitialized line segment. | |
| paramLine2D (const vec2D &start, const vec2D &end, const vec2D &dir) | |
| Construct from explicit endpoints and direction. | |
| paramLine2D (const vec2D &start, const vec2D &end, const vec2D &dir) | |
| Construct from explicit endpoints and direction. | |
| void | Set (const vec2D &start, const vec2D &end, const vec2D &dir) |
| Set explicit endpoints and direction. | |
| void | Set (const vec2D &start, const vec2D &end, const vec2D &dir) |
| Set explicit endpoints and direction. | |
Public Attributes | |
| vec2D | p0 |
| Segment start point. | |
| vec2D | p1 |
| Segment end point. | |
| vec2D | v |
| Direction vector, commonly p1 - p0. | |
Parametric 2D line segment represented by a start point, end point, and direction.
Definition at line 989 of file mxvk_math.h.
|
default |
Construct an uninitialized line segment.
Construct from explicit endpoints and direction.
Definition at line 1003 of file mxvk_math.h.
|
default |
Construct an uninitialized line segment.
Construct from explicit endpoints and direction.
Definition at line 1000 of file mxvk_math_eigen.hpp.
|
inlinenodiscard |
|
inlinenodiscard |
Compute the point p0 + v * t.
Definition at line 1019 of file mxvk_math_eigen.hpp.
Compute the point p0 + v * t and write it to out.
Definition at line 1027 of file mxvk_math.h.
Compute the point p0 + v * t and write it to out.
Definition at line 1024 of file mxvk_math_eigen.hpp.
Initialize from endpoints and derive the direction vector.
Definition at line 1015 of file mxvk_math.h.
Initialize from endpoints and derive the direction vector.
Definition at line 1012 of file mxvk_math_eigen.hpp.
|
inline |
Intersect this segment with another parametric segment.
| line | Segment to intersect with. |
| t_this | Receives this segment's intersection parameter. |
| t_other | Receives the other segment's intersection parameter. |
Definition at line 1039 of file mxvk_math.h.
|
inline |
Intersect this segment with another parametric segment.
| line | Segment to intersect with. |
| t_this | Receives this segment's intersection parameter. |
| t_other | Receives the other segment's intersection parameter. |
Definition at line 1036 of file mxvk_math_eigen.hpp.
|
inline |
Intersect this segment with another segment and compute the point.
| line | Segment to intersect with. |
| out | Receives the intersection point when the lines are not parallel. |
Definition at line 1056 of file mxvk_math.h.
|
inline |
Intersect this segment with another segment and compute the point.
| line | Segment to intersect with. |
| out | Receives the intersection point when the lines are not parallel. |
Definition at line 1056 of file mxvk_math_eigen.hpp.
Set explicit endpoints and direction.
Definition at line 1008 of file mxvk_math.h.
Set explicit endpoints and direction.
Definition at line 1005 of file mxvk_math_eigen.hpp.
| vec2D mxvk::paramLine2D::p0 |
Segment start point.
Definition at line 991 of file mxvk_math.h.
| vec2D mxvk::paramLine2D::p1 |
Segment end point.
Definition at line 994 of file mxvk_math.h.
| vec2D mxvk::paramLine2D::v |
Direction vector, commonly p1 - p0.
Definition at line 997 of file mxvk_math.h.