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 875 of file mxvk_math.h.
|
default |
Construct an uninitialized line segment.
Construct from explicit endpoints and direction.
Definition at line 889 of file mxvk_math.h.
|
default |
Construct an uninitialized line segment.
Construct from explicit endpoints and direction.
Definition at line 852 of file mxvk_math_eigen.hpp.
|
inlinenodiscard |
|
inlinenodiscard |
Compute the point p0 + v * t.
Definition at line 869 of file mxvk_math_eigen.hpp.
Compute the point p0 + v * t and write it to out.
Definition at line 909 of file mxvk_math.h.
Compute the point p0 + v * t and write it to out.
Definition at line 872 of file mxvk_math_eigen.hpp.
Initialize from endpoints and derive the direction vector.
Definition at line 899 of file mxvk_math.h.
Initialize from endpoints and derive the direction vector.
Definition at line 862 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 921 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 884 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 938 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 904 of file mxvk_math_eigen.hpp.
Set explicit endpoints and direction.
Definition at line 892 of file mxvk_math.h.
Set explicit endpoints and direction.
Definition at line 855 of file mxvk_math_eigen.hpp.
| vec2D mxvk::paramLine2D::p0 |
Segment start point.
Definition at line 877 of file mxvk_math.h.
| vec2D mxvk::paramLine2D::p1 |
Segment end point.
Definition at line 880 of file mxvk_math.h.
| vec2D mxvk::paramLine2D::v |
Direction vector, commonly p1 - p0.
Definition at line 883 of file mxvk_math.h.