![]() |
Utilities
Utilities header only library
|
Definition of a line segment in a 2 dimensional space. More...
Public Member Functions | |
| LineSegment2 (float x1, float y1, float x2, float y2) | |
| LineSegment2 (const Vec &init_point1, const Vec &init_point2) | |
Public Member Functions inherited from geom::LineSegment< 2 > | |
| LineSegment (const Vec &init_point1, const Vec &init_point2) | |
| float | GetLength () const |
| Returns length of line segment = distance between point1 and point2. | |
| float | GetLengthSqr () const |
| Returns square length of line segment = square distance between point1 and point2. | |
| Vec | GetDirection () const |
| Returns direction of the line as a normalized vector from point1 to point2. | |
| Vec | ToVector () const |
| Converts the line to the vector from point1 to point2. | |
Additional Inherited Members | |
Public Types inherited from geom::LineSegment< 2 > | |
| using | Vec = glm::vec< N, float > |
Data Fields inherited from geom::LineSegment< 2 > | |
| Vec | point1 |
| Vec | point2 |
Definition of a line segment in a 2 dimensional space.