Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
|
#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. More... | |
float | angle (const LineSeg2f &o) const noexcept |
Return the angle between two line segments in radians. More... | |
AABBox2f | box () const noexcept override |
Create an AABBox with given lineseg. More... | |
bool | contains (const Point2f &p2) const noexcept override |
Test intersection between this line segment and the give point. More... | |
float | distance (Point2f p) const noexcept |
Returns minimum distance between this line segment and given point p. More... | |
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. More... | |
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. More... | |
bool | intersects (Point2f &result, const LineSeg2f &o) const noexcept |
Compute intersection between two lines segments. More... | |
constexpr float | length () const noexcept |
Return the length of this line segment, i.e. More... | |
constexpr LineSeg2f & | operator*= (const float s) noexcept |
Scale this line segment with given scale factor. More... | |
std::string | toString () const noexcept override |
Public Member Functions inherited from jau::math::geom::Geom2f | |
virtual | ~Geom2f ()=default |
virtual AABBox2f | box () const noexcept=0 |
virtual bool | contains (const Point2f &o) const noexcept=0 |
virtual bool | intersection (Vec2f &reflect_out, Vec2f &cross_normal, Point2f &cross_point, const LineSeg2f &in) const noexcept=0 |
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. More... | |
virtual bool | intersects (const AABBox2f &box) const noexcept=0 |
virtual bool | intersects (const Geom2f &o) const noexcept=0 |
virtual bool | intersects (const LineSeg2f &o) const noexcept=0 |
virtual std::string | toString () const noexcept=0 |
Public Attributes | |
Point2f | p0 |
Point2f | p1 |
Definition at line 96 of file geom2f.hpp.
|
inlineconstexprnoexcept |
Definition at line 101 of file geom2f.hpp.
|
inlineconstexprnoexcept |
Definition at line 104 of file geom2f.hpp.
|
inlineconstexprnoexcept |
Scale this line segment with given scale factor.
s | scale factor |
Definition at line 112 of file geom2f.hpp.
|
inlineconstexprnoexcept |
Return the length of this line segment, i.e.
distance between both points.
Definition at line 121 of file geom2f.hpp.
|
inlinenoexcept |
Return the angle of this line segment in radians.
Definition at line 128 of file geom2f.hpp.
|
inlinenoexcept |
Return the angle between two line segments in radians.
Definition at line 135 of file geom2f.hpp.
|
inline |
Definition at line 141 of file geom2f.hpp.
|
inlineoverridevirtualnoexcept |
Implements jau::math::geom::Geom2f.
Definition at line 149 of file geom2f.hpp.
|
inlineoverridevirtualnoexcept |
Create an AABBox with given lineseg.
Implements jau::math::geom::Geom2f.
Definition at line 154 of file geom2f.hpp.
|
inlineoverridevirtualnoexcept |
Test intersection between this line segment and the give point.
Implements jau::math::geom::Geom2f.
Definition at line 181 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 274 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 283 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 339 of file geom2f.hpp.
|
inlineoverridevirtualnoexcept |
Implements jau::math::geom::Geom2f.
Definition at line 356 of file geom2f.hpp.
|
inlineoverridevirtualnoexcept |
Implements jau::math::geom::Geom2f.
Definition at line 384 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 388 of file geom2f.hpp.
|
inlinenoexcept |
Definition at line 398 of file geom2f.hpp.
Point2f jau::math::geom::LineSeg2f::p0 |
Definition at line 98 of file geom2f.hpp.
Point2f jau::math::geom::LineSeg2f::p1 |
Definition at line 99 of file geom2f.hpp.