\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.10 - 2D and 3D Linear Geometry Kernel
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL::compare_y_at_x()

compare2.png
See Also
CGAL::compare_xy()
CGAL::compare_xyz()
CGAL::compare_x()
CGAL::compare_y()
CGAL::compare_yx()
CGAL::compare_x_at_y()
CGAL::compare_z()

Functions

template<typename Kernel >
Comparison_result CGAL::compare_y_at_x (const CGAL::Point_2< Kernel > &p, const CGAL::Line_2< Kernel > &h)
 compares the \( y\)-coordinates of p and the vertical projection of p on h. More...
 
template<typename Kernel >
Comparison_result CGAL::compare_y_at_x (const CGAL::Point_2< Kernel > &p, const CGAL::Line_2< Kernel > &h1, const CGAL::Line_2< Kernel > &h2)
 compares the \( y\)-coordinates of the vertical projection of p on h1 and on h2. More...
 
template<typename Kernel >
Comparison_result CGAL::compare_y_at_x (const CGAL::Line_2< Kernel > &l1, const CGAL::Line_2< Kernel > &l2, const CGAL::Line_2< Kernel > &h)
 Let p be the intersection of lines l1 and l2. More...
 
template<typename Kernel >
Comparison_result CGAL::compare_y_at_x (const CGAL::Line_2< Kernel > &l1, const CGAL::Line_2< Kernel > &l2, const CGAL::Line_2< Kernel > &h1, const CGAL::Line_2< Kernel > &h2)
 Let p be the intersection of lines l1 and l2. More...
 
template<typename Kernel >
Comparison_result CGAL::compare_y_at_x (const CGAL::Point_2< Kernel > &p, const CGAL::Segment_2< Kernel > &s)
 compares the \( y\)-coordinates of p and the vertical projection of p on s. More...
 
template<typename Kernel >
Comparison_result CGAL::compare_y_at_x (const CGAL::Point_2< Kernel > &p, const CGAL::Segment_2< Kernel > &s1, const CGAL::Segment_2< Kernel > &s2)
 compares the \( y\)-coordinates of the vertical projection of p on s1 and on s2. More...
 

With the 2D Circular Kernel

See 2D Circular Geometry Kernel.

#include <CGAL/global_functions_circular_kernel_2.h>
template<typename CircularKernel >
Comparison_result CGAL::compare_y_at_x (const CGAL::Circular_arc_point_2< CircularKernel > &p, const CGAL::Circular_arc_2< CircularKernel > &a)
 Same as above, for a point and a circular arc.
 
template<typename CircularKernel >
Comparison_result CGAL::compare_y_at_x (const CGAL::Circular_arc_point_2< CircularKernel > &p, const CGAL::Line_arc_2< CircularKernel > &a)
 Same as above, for a point and a line segment.
 

Function Documentation

template<typename Kernel >
Comparison_result CGAL::compare_y_at_x ( const CGAL::Point_2< Kernel > &  p,
const CGAL::Line_2< Kernel > &  h 
)

compares the \( y\)-coordinates of p and the vertical projection of p on h.

See Figure figcompareyatx (d).

Precondition
h is not vertical.

#include <CGAL/Kernel/global_functions.h>

template<typename Kernel >
Comparison_result CGAL::compare_y_at_x ( const CGAL::Point_2< Kernel > &  p,
const CGAL::Line_2< Kernel > &  h1,
const CGAL::Line_2< Kernel > &  h2 
)

compares the \( y\)-coordinates of the vertical projection of p on h1 and on h2.

See Figure figcompareyatx (e).

Precondition
h1 and h2 are not vertical.

#include <CGAL/Kernel/global_functions.h>

template<typename Kernel >
Comparison_result CGAL::compare_y_at_x ( const CGAL::Line_2< Kernel > &  l1,
const CGAL::Line_2< Kernel > &  l2,
const CGAL::Line_2< Kernel > &  h 
)

Let p be the intersection of lines l1 and l2.

This function compares the \( y\)-coordinates of p and the vertical projection of p on h See Figure figcompareyatx (f).

Precondition
l1, l2 intersect and h is not vertical.

#include <CGAL/Kernel/global_functions.h>

template<typename Kernel >
Comparison_result CGAL::compare_y_at_x ( const CGAL::Line_2< Kernel > &  l1,
const CGAL::Line_2< Kernel > &  l2,
const CGAL::Line_2< Kernel > &  h1,
const CGAL::Line_2< Kernel > &  h2 
)

Let p be the intersection of lines l1 and l2.

This function compares the \( y\)-coordinates of the vertical projection of p on h1 and on h2. See Figure figcompareyatx (g).

Precondition
l1 and l2 intersect; h1 and h2 are not vertical.

#include <CGAL/Kernel/global_functions.h>

template<typename Kernel >
Comparison_result CGAL::compare_y_at_x ( const CGAL::Point_2< Kernel > &  p,
const CGAL::Segment_2< Kernel > &  s 
)

compares the \( y\)-coordinates of p and the vertical projection of p on s.

If s is vertical, then return CGAL::EQUAL when p lies on s, CGAL::SMALLER when p lies under {s}, and CGAL::LARGER otherwise.

Precondition
p is within the x range of s.

#include <CGAL/Kernel/global_functions.h>

template<typename Kernel >
Comparison_result CGAL::compare_y_at_x ( const CGAL::Point_2< Kernel > &  p,
const CGAL::Segment_2< Kernel > &  s1,
const CGAL::Segment_2< Kernel > &  s2 
)

compares the \( y\)-coordinates of the vertical projection of p on s1 and on s2.

If s1 or s2 is vertical, then return CGAL::EQUAL if they intersect, otherwise return CGAL::SMALLER if s1 lies below s2, and return CGAL::LARGER otherwise.

Precondition
p is within the x range of s1 and s2.

#include <CGAL/Kernel/global_functions.h>