Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
segment_segment_intersection_example.cc File Reference

Dedicated O(1) segment-segment intersection demo. More...

#include <cassert>
#include <iostream>
#include <geom_algorithms.H>
Include dependency graph for segment_segment_intersection_example.cc:

Go to the source code of this file.

Functions

static const char * kind_str (SegmentSegmentIntersection::Kind kind)
 
static void print_case (const char *name, const Segment &a, const Segment &b, const SegmentSegmentIntersection::Result &result)
 
int main ()
 

Detailed Description

Dedicated O(1) segment-segment intersection demo.

Shows the direct 2-segment API (SegmentSegmentIntersection) with exact arithmetic and explicit classification:

  • no intersection
  • unique intersection point
  • collinear overlap interval

Definition in file segment_segment_intersection_example.cc.

Function Documentation

◆ kind_str()

static const char * kind_str ( SegmentSegmentIntersection::Kind  kind)
static

Definition at line 51 of file segment_segment_intersection_example.cc.

Referenced by print_case().

◆ main()

◆ print_case()