Gamp v0.0.7-36-g24b1eb6
Gamp: Graphics, Audio, Multimedia and Processing
|
#include <geom2f.hpp>
Public Member Functions | |
constexpr | LineSeg2f () noexcept |
constexpr | LineSeg2f (const Point2f &p0_, const Point2f &p1_) noexcept |
void | add (float length) |
float | angle () const noexcept |
Return the angle of this line segment in radians. | |
float | angle (const LineSeg2f &o) const noexcept |
Return the angle between two line segments in radians. | |
AABBox2f | box () const noexcept override |
Create an AABBox with given lineseg. | |
bool | contains (const Point2f &p2) const noexcept override |
Test intersection between this line segment and the give point. | |
float | distance (Point2f p) const noexcept |
Returns minimum distance between this line segment and given point p. | |
bool | intersection (const AABBox2f &box, Vec2f &reflect_out, Vec2f &cross_normal, Point2f &cross_point) const noexcept |
bool | intersection (Vec2f &reflect_out, Vec2f &cross_normal, Point2f &cross_point, const LineSeg2f &in) const noexcept override |
Return whether this object intersects with the given line segment and if intersecting, the crossing point (intersection), the normalized normal of the crossing surface and the reflection out vector. | |
bool | intersects (const AABBox2f &box) const noexcept override |
bool | intersects (const Geom2f &o) const noexcept override |
bool | intersects (const LineSeg2f &o) const noexcept override |
Return true if this line segment intersect with the given line segment. | |
bool | intersects (Point2f &result, const LineSeg2f &o) const noexcept |
Compute intersection between two lines segments. | |
constexpr float | length () const noexcept |
Return the length of this line segment, i.e. | |
constexpr LineSeg2f & | operator*= (const float s) noexcept |
Scale this line segment with given scale factor. | |
std::string | toString () const noexcept override |
![]() | |
virtual | ~Geom2f ()=default |
Public Attributes | |
Point2f | p0 |
Point2f | p1 |
Definition at line 157 of file geom2f.hpp.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Definition at line 165 of file geom2f.hpp.
|
inlineconstexprnoexcept |
Scale this line segment with given scale factor.
s | scale factor |
Definition at line 173 of file geom2f.hpp.
|
inlineconstexprnoexcept |
Return the length of this line segment, i.e.
distance between both points.
Definition at line 182 of file geom2f.hpp.
|
inlinenoexcept |
Return the angle of this line segment in radians.
Definition at line 189 of file geom2f.hpp.
|
inlinenoexcept |
Return the angle between two line segments in radians.
Definition at line 196 of file geom2f.hpp.
|
inline |
Definition at line 202 of file geom2f.hpp.
|
inlineoverridevirtualnoexcept |
Implements jau::math::geom::Geom2f.
Definition at line 210 of file geom2f.hpp.
|
inlineoverridevirtualnoexcept |
Create an AABBox with given lineseg.
Implements jau::math::geom::Geom2f.
Definition at line 215 of file geom2f.hpp.
|
inlineoverridevirtualnoexcept |
Test intersection between this line segment and the give point.
Implements jau::math::geom::Geom2f.
Definition at line 242 of file geom2f.hpp.
|
inlinenoexcept |
Compute intersection between two lines segments.
result | storage for the intersection coordinates if the lines intersect, otherwise unchanged |
o | the other line segment. |
Definition at line 262 of file geom2f.hpp.
|
inlineoverridevirtualnoexcept |
Return true if this line segment intersect with the given line segment.
o | the other line segment. |
Implements jau::math::geom::Geom2f.
Definition at line 271 of file geom2f.hpp.
|
inlinenoexcept |
Returns minimum distance between this line segment and given point p.
See Shortest distance between a point and a line segment
Slightly more expensive than intersects().
Definition at line 284 of file geom2f.hpp.
|
inlineoverridevirtualnoexcept |
Implements jau::math::geom::Geom2f.
Definition at line 301 of file geom2f.hpp.
|
inlineoverridevirtualnoexcept |
Implements jau::math::geom::Geom2f.
Definition at line 329 of file geom2f.hpp.
|
inlineoverridevirtualnoexcept |
Return whether this object intersects with the given line segment and if intersecting, the crossing point (intersection), the normalized normal of the crossing surface and the reflection out vector.
Implements jau::math::geom::Geom2f.
Definition at line 333 of file geom2f.hpp.
|
inlinenoexcept |
Definition at line 343 of file geom2f.hpp.
Point2f jau::math::geom::LineSeg2f::p0 |
Definition at line 159 of file geom2f.hpp.
Point2f jau::math::geom::LineSeg2f::p1 |
Definition at line 160 of file geom2f.hpp.