|
constexpr | Line (VIPRA::f3d start, VIPRA::f3d end) |
|
F3D_FUNC auto | length () const noexcept -> VIPRA::f_pnt |
|
F3D_FUNC auto | direction () const noexcept -> VIPRA::f3d |
| Returns unit vector in direction of line from start.
|
|
VIPRA_INLINE constexpr auto | closest_point (VIPRA::f3d point) const noexcept -> VIPRA::f3d |
| Calculates the closest point on the line to another point.
|
|
VIPRA_INLINE constexpr auto | is_point_on (VIPRA::f3d point) const -> bool |
| Checks if a point is on the line.
|
|
VIPRA_INLINE constexpr auto | does_intersect (Line other) const noexcept -> bool |
| Checks if the line intersects another.
|
|
constexpr auto | intersection_point (Line other) const noexcept -> VIPRA::f3d |
| Calculates the intersection point of two lines.
|
|
constexpr | Line (const Line &)=default |
|
constexpr | Line (Line &&)=default |
|
constexpr auto | operator= (const Line &) -> Line &=default |
|
constexpr auto | operator= (Line &&) -> Line &=default |
|
|
static VIPRA_INLINE constexpr auto | orientation_to (Line line, VIPRA::f3d point) noexcept -> Orientation |
| Calculates the orientation of a point relative to a line.
|
|
static constexpr auto | do_intersect (Line line1, Line line2) noexcept -> bool |
| Checks if two lines intersect.
|
|
◆ closest_point()
VIPRA_INLINE constexpr auto VIPRA::Geometry::Line::closest_point |
( |
VIPRA::f3d | point | ) |
const -> VIPRA::f3d
|
|
inlinenodiscardconstexprnoexcept |
Calculates the closest point on the line to another point.
- Parameters
-
- Returns
- VIPRA::f3d
◆ direction()
F3D_FUNC auto VIPRA::Geometry::Line::direction |
( |
| ) |
const -> VIPRA::f3d |
|
inlinenoexcept |
Returns unit vector in direction of line from start.
- Returns
- VIPRA::f3d
◆ do_intersect()
static constexpr auto VIPRA::Geometry::Line::do_intersect |
( |
Line | line1, |
|
|
Line | line2 ) -> bool
|
|
inlinestaticnodiscardconstexprnoexcept |
Checks if two lines intersect.
- Parameters
-
- Returns
- true
-
false
◆ does_intersect()
VIPRA_INLINE constexpr auto VIPRA::Geometry::Line::does_intersect |
( |
Line | other | ) |
const -> bool
|
|
inlinenodiscardconstexprnoexcept |
Checks if the line intersects another.
- Parameters
-
- Returns
- true
-
false
◆ intersection_point()
auto VIPRA::Geometry::Line::intersection_point |
( |
Line | other | ) |
const -> VIPRA::f3d
|
|
inlinenodiscardconstexprnoexcept |
Calculates the intersection point of two lines.
- Note
- assumes the lines intersect, check does_intersect before calling
- Parameters
-
- Returns
- VIPRA::f3d
◆ is_point_on()
VIPRA_INLINE constexpr auto VIPRA::Geometry::Line::is_point_on |
( |
VIPRA::f3d | point | ) |
const -> bool
|
|
inlinenodiscardconstexpr |
Checks if a point is on the line.
- Parameters
-
- Returns
- true
-
false
◆ orientation_to()
static VIPRA_INLINE constexpr auto VIPRA::Geometry::Line::orientation_to |
( |
Line | line, |
|
|
VIPRA::f3d | point ) -> Orientation
|
|
inlinestaticnodiscardconstexprnoexcept |
Calculates the orientation of a point relative to a line.
- Parameters
-
- Returns
The documentation for this struct was generated from the following file: