|
| | Segment () |
| | Default constructor creating an empty segment. More...
|
| |
| | Segment (const Point &p1, const Point &p2) |
| | Constructor with two points. More...
|
| |
| template<typename PointType , typename = std::enable_if_t<std::is_same_v<PointType, Kernel::Point_2> || std::is_same_v<PointType, Kernel::Point_3>>> |
| | Segment (const PointType &p1, const PointType &p2) |
| | Constructor with CGAL points (2D or 3D) More...
|
| |
| template<typename SegmentType , typename = std::enable_if_t< std::is_same_v<SegmentType, Kernel::Segment_2> || std::is_same_v<SegmentType, Kernel::Segment_3>>> |
| | Segment (const SegmentType &segment) |
| | Constructor with CGAL segment (2D or 3D) More...
|
| |
| | Segment (const Segment &other)=default |
| | Copy constructor. More...
|
| |
| auto | operator= (const Segment &other) -> Segment &=default |
| | Assignment operator. More...
|
| |
| | ~Segment ()=default |
| | Destructor. More...
|
| |
| auto | source () const -> const Point & |
| | Gets the first endpoint. More...
|
| |
| auto | target () const -> const Point & |
| | Gets the second endpoint. More...
|
| |
| auto | setSource (const Point &p) -> void |
| | Sets the first endpoint. More...
|
| |
| auto | setTarget (const Point &p) -> void |
| | Sets the second endpoint. More...
|
| |
| auto | setPoints (const Point &source, const Point &target) -> void |
| | Sets both endpoints at once. More...
|
| |
| template<typename PointType , typename = std::enable_if_t<std::is_same_v<PointType, Kernel::Point_2> || std::is_same_v<PointType, Kernel::Point_3>>> |
| auto | setPoints (const PointType &source, const PointType &target) -> void |
| | Sets both CGAL endpoints at once. More...
|
| |
| auto | clear () -> void |
| | Reset the segment to empty. More...
|
| |
| auto | toSegment_2 () const -> Kernel::Segment_2 |
| | Converts to a CGAL::Segment_2. More...
|
| |
| auto | toSegment_3 () const -> Kernel::Segment_3 |
| | Converts to a CGAL::Segment_3. More...
|
| |
| auto | isEmpty () const -> bool |
| | Checks if the segment is empty (either endpoint is empty) More...
|
| |
| auto | isDegenerate () const -> bool |
| | Checks if the segment is degenerate (zero length) More...
|
| |
| auto | squaredLength () const -> Kernel::FT |
| | Returns the squared length of the segment. More...
|
| |
| auto | length () const -> Kernel::FT |
| | Returns the length of the segment. More...
|
| |
| auto | is3D () const -> bool |
| | Checks if the segment is in 3D space. More...
|
| |
| auto | isMeasured () const -> bool |
| | Checks if the segment is measured. More...
|
| |
| template<typename PointType > |
| auto | squaredDistanceToPoint (const PointType &p) const -> Kernel::FT |
| | Gets the squared distance from a point to the segment. More...
|
| |
| template<typename... Args> |
| auto | distanceToPoint (Args &&...args) const -> double |
| | Distance from a point to the segment. More...
|
| |
| template<typename PointType > |
| auto | exactInterpolationParameter (const PointType &p) const -> Kernel::FT |
| | Calculates the exact parameter for a projected point on the segment. More...
|
| |
| template<typename... Args> |
| auto | interpolationParameter (Args &&...args) const -> double |
| | Calculates the parameter for a projected point on the segment. More...
|
| |
| auto | interpolate (double t) const -> Point |
| | Gets a point on the segment at given parameter. More...
|
| |
| template<typename PointType > |
| auto | hasOn (const PointType &p, double tolerance=EPSILON) const -> bool |
| | Checks if a point is on the segment (works in 2D or 3D) More...
|
| |
| auto | midpoint () const -> Point |
| | Returns the midpoint of the segment. More...
|
| |
| auto | reverse () -> void |
| | Reverses the segment direction. More...
|
| |
Represents a line segment in space.
This class provides methods for working with line segments and performing calculations like distance and interpolation. Unlike LineString which inherits from Geometry, this is a lightweight primitive.