A geometry math class for expressing a line connecting 2 points in 2D space. More...
#include <linesegment.h>
Collaboration diagram for Mezzanine::LineSegment2D:Public Types | |
| typedef std::pair< Boole, Vector2 > | IntersectionTestResult |
| This is a type used for the return of a intersection test. More... | |
Public Member Functions | |
| LineSegment2D () | |
| Blank constructor. | |
| LineSegment2D (const Vector2 &A, const Vector2 &B) | |
| Descriptive constructor. More... | |
| LineSegment2D (const LineSegment2D &Other) | |
| Copy constructor. More... | |
| IntersectionTestResult | Intersects (const LineSegment2D &Other) const |
| Gets whether or not another line segment intersects with this one. More... | |
Public Attributes | |
| Vector2 | PointA |
| The first point defining the segment. | |
| Vector2 | PointB |
| The second point defining the segment. | |
A geometry math class for expressing a line connecting 2 points in 2D space.
Definition at line 52 of file linesegment.h.
| typedef std::pair<Boole,Vector2> Mezzanine::LineSegment2D::IntersectionTestResult |
This is a type used for the return of a intersection test.
This type provides more verbose return data that can be used for further tests.
The first member stores whether or not there was a hit. The second member stores the point in 2D space where the segments intersect.
Definition at line 58 of file linesegment.h.
Descriptive constructor.
| A | The first point defining the segment. |
| B | The second point defining the segment. |
Definition at line 57 of file linesegment.cpp.
| Mezzanine::LineSegment2D::LineSegment2D | ( | const LineSegment2D & | Other | ) |
Copy constructor.
| Other | The other line segment to copy from. |
Definition at line 62 of file linesegment.cpp.
| LineSegment2D::IntersectionTestResult Mezzanine::LineSegment2D::Intersects | ( | const LineSegment2D & | Other | ) | const |
Gets whether or not another line segment intersects with this one.
| Other | The other line segment to compare with. |
Definition at line 70 of file linesegment.cpp.
1.8.9.1. Thanks to the
Open Icon Library
for help with some of the icons.