Pangolin
Header-only C++20 plane computational geometry library
Loading...
Searching...
No Matches
orientedsegment.hpp File Reference

Public declaration of pgl::OrientedSegment. More...

#include "shape/segment.hpp"
#include "halfplane.hpp"

Go to the source code of this file.

Classes

struct  pgl::OrientedSegment< PointType_, TLabel >
 Directed segment preserving source-to-target order plus optional segment label. More...

Namespaces

namespace  pgl

Functions

 pgl::OrientedSegment () -> OrientedSegment< Point<>, NoLabel >
template<class PointType>
 pgl::OrientedSegment (PointType, PointType) -> OrientedSegment< PointType, NoLabel >
template<class PointType, class A>
 pgl::OrientedSegment (PointType, PointType, A) -> OrientedSegment< PointType, std::decay_t< A > >
template<class Number>
 pgl::OrientedSegment (Number, Number, Number, Number) -> OrientedSegment< Point< Number >, NoLabel >
template<class PointType, class LabelType, class TranslationNumber, class TranslationLabel>
constexpr auto pgl::operator- (const OrientedSegment< PointType, LabelType > &segment, const Point< TranslationNumber, TranslationLabel > &translation)
 Translates an oriented segment by the opposite of a point.
template<class PointType, class LabelType, class Scalar>
requires (!detail::is_point_v<Scalar> && !TransformationConcept<Scalar>)
constexpr auto pgl::operator* (const OrientedSegment< PointType, LabelType > &segment, const Scalar &scalar)
 Scales an oriented segment by a scalar.
template<class Scalar, class PointType, class LabelType>
requires (!detail::is_point_v<Scalar> && !TransformationConcept<Scalar>)
constexpr auto pgl::operator* (const Scalar &scalar, const OrientedSegment< PointType, LabelType > &segment)
 Scales an oriented segment by a scalar written on the left.
template<class PointType, class LabelType, class Scalar>
requires (!detail::is_point_v<Scalar> && !TransformationConcept<Scalar>)
constexpr auto pgl::operator/ (const OrientedSegment< PointType, LabelType > &segment, const Scalar &scalar)
 Divides both endpoints by a scalar.
template<class PointType, class LabelType>
std::ostream & pgl::operator<< (std::ostream &stream, const OrientedSegment< PointType, LabelType > &segment)
 Streams an oriented segment as p->q, or label:{p->q} when it carries a label.

Detailed Description

Public declaration of pgl::OrientedSegment.

This is the directed counterpart to Segment. It preserves source-to-target order for orientation-sensitive operations.