YetAnotherCoupler 3.4.0

#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include "utils_core.h"
#include "geometry.h"
Go to the source code of this file.
Enumerations  
enum  { p_on_a = 1 , q_on_a = 2 , p_on_b = 4 , q_on_b = 8 , circles_are_identical = 16 } 
enum  { no_intersection = 0 , a_between_cd = 1 , b_between_cd = 2 , c_between_ab = 4 , d_between_ab = 8 } 
Functions  
static int  gcxgc (double const norm_vector_a[3], double const norm_vector_b[3], double p[3], double q[3]) 
static int  loncxlatc (double const gc_norm_vector[3], double const z, double p[3], double q[3]) 
static int  gcxlatc (double const gc_norm_vector[3], double const z, double p[3], double q[3]) 
static int  loncxlonc (double const norm_vector_a[3], double const norm_vector_b[3], double p[3], double q[3]) 
static int  pxgc (double const vec[3], double const norm_vector[3], double p[3], double q[3]) 
static int  pxlatc (double const vec[3], double z, double p[3], double q[3]) 
static int  pxp (double const vec_a[3], double const vec_b[3], double p[3], double q[3]) 
int  yac_circle_intersect (struct yac_circle a, struct yac_circle b, double p[3], double q[3]) 
static int  vector_is_between (double const a[], double const b[], double const p[], double sq_len_diff_ab) 
static int  vector_is_between_lat (double const a[], double const b[], double const p[]) 
static void  compute_edge_middle_point_vec (enum yac_edge_type edge_type, double const a[3], double const b[3], double middle[3]) 
static int  yac_identical_circles_vec (enum yac_edge_type edge_type, double const a[3], double const b[3], double const c[3], double const d[3], double p[3], double q[3], int intersection_type) 
static int  yac_identical_gcxgc_vec (double const a[3], double const b[3], double const c[3], double const d[3], double p[3], double q[3]) 
static int  yac_check_pq_gcxgc (double const a[3], double const b[3], double const c[3], double const d[3], double const p[3], double const q[3]) 
static void  compute_norm_vector (double const a[3], double const b[3], double norm_vector[3]) 
static int  yac_gcxgc_vec (double const a[3], double const b[3], double const c[3], double const d[3], double p[3], double q[3]) 
static int  yac_latcxlatc_vec (double const a[3], double const b[3], double const c[3], double const d[3], double p[3], double q[3]) 
compute the intersection point two circles of latitude  
static void  compute_lon_norm_vector (double const a[3], double const b[3], double norm_vector[3]) 
static int  yac_loncxlonc_vec (double const a[3], double const b[3], double const c[3], double const d[3], double p[3], double q[3]) 
compute the intersection point two circles of longitude  
static int  yac_check_pq_gcxlatc (double const a[3], double const b[3], double const c[3], double const d[3], double const p[3], double const q[3]) 
static int  yac_loncxlatc_vec (double const a[3], double const b[3], double const c[3], double const d[3], double p[3], double q[3]) 
compute the intersection point of a meridian and a parallel  
static int  yac_gcxlatc_vec (double const a[3], double const b[3], double const c[3], double const d[3], double p[3], double q[3]) 
compute the intersection of a great circle with the parallel  
static int  yac_pxp_vec (double const a[3], double const b[3], double p[3], double q[3]) 
static int  yac_pxgc_vec (double const point[3], double const a[3], double const b[3], double p[3], double q[3]) 
static int  yac_pxlat_vec (double const point[3], double const a[3], double const b[3], double p[3], double q[3]) 
static int  adjust_ret_value (int ret_value) 
int  yac_intersect_vec (enum yac_edge_type edge_type_a, double const a[3], double const b[3], enum yac_edge_type edge_type_b, double const c[3], double const d[3], double p[3], double q[3]) 
int  yac_point_on_edge (double p[3], double const a[3], double const b[3], enum yac_circle_type circle_type) 
Variables  
static double const  tol = 1.0e12 
anonymous enum 
Enumerator  

p_on_a  
q_on_a  
p_on_b  
q_on_b  
circles_are_identical 
Definition at line 15 of file intersection.c.
anonymous enum 
Enumerator  

no_intersection  
a_between_cd  
b_between_cd  
c_between_ab  
d_between_ab 
Definition at line 23 of file intersection.c.

inlinestatic 

static 
Definition at line 374 of file intersection.c.

static 

static 

static 
computes the intersection of two great circles
[in]  norm_vector_a  norm vector of circle a 
[in]  norm_vector_b  norm vector of circle b 
[out]  p  first intersection point 
[out]  q  second intersection point 
Definition at line 39 of file intersection.c.

static 
Definition at line 94 of file intersection.c.

static 

static 

static 

static 

static 
Definition at line 256 of file intersection.c.

inlinestatic 
determines whether vector p is between vectors a and b (it is assumed, that a, b, and p are in the same plane)
Definition at line 319 of file intersection.c.

static 

static 
Definition at line 485 of file intersection.c.

static 
Definition at line 635 of file intersection.c.
int yac_circle_intersect  (  struct yac_circle  a, 
struct yac_circle  b,  
double  p[3],  
double  q[3] ) 
Definition at line 270 of file intersection.c.

static 
computes the intersection points of two great circles
based on http://www.geoclub.de/viewtopic.php?f=54&t=29689
[in]  a  first point of edge a the is on a great circle 
[in]  b  second point of edge a the is on a great circle 
[in]  c  first point of edge b the is on a great circle 
[in]  d  second point of edge b the is on a great circle 
[out]  p  intersection point 
[out]  q  intersection point 
Definition at line 535 of file intersection.c.

static 
compute the intersection of a great circle with the parallel
compute the intersection points of a great circle (defined by a and b) and a circle of latitude (defined by c and d) (both circles need to have a length of at least yac_angle_tol) if p and q are != NULL they contain the intersection points the return value is:
Definition at line 708 of file intersection.c.

static 
Definition at line 396 of file intersection.c.

static 
Definition at line 468 of file intersection.c.
int yac_intersect_vec  (  enum yac_edge_type  edge_type_a, 
double const  a[3],  
double const  b[3],  
enum yac_edge_type  edge_type_b,  
double const  c[3],  
double const  d[3],  
double  p[3],  
double  q[3] ) 
computes the intersection points of two edges
[in]  edge_type_a  type of edge a 
[in]  a  first point of edge a 
[in]  b  second point of edge a 
[in]  edge_type_b  type of edge b 
[in]  c  first point of edge b 
[in]  d  second point of edge b 
[out]  p  first intersection point 
[out]  q  second intersection point 
Definition at line 786 of file intersection.c.

static 
compute the intersection point two circles of latitude
compute the intersection points of two circle of latitude if p and q are != NULL they contain the intersection points the return value is:
Definition at line 570 of file intersection.c.

static 
compute the intersection point of a meridian and a parallel
compute the intersection points of a circle of longitude (defined by a and b) and a circle of latitude (defined by c and d) if p and q are != NULL they contain the intersection points the return value is:
Definition at line 666 of file intersection.c.

static 
compute the intersection point two circles of longitude
compute the intersection points of two circle of longitude if p and q are != NULL they contain the intersection points the return value is:
Definition at line 616 of file intersection.c.
int yac_point_on_edge  (  double  p[3], 
double const  a[3],  
double const  b[3],  
enum yac_circle_type  circle_type ) 
Definition at line 883 of file intersection.c.

static 
Definition at line 739 of file intersection.c.

static 
Definition at line 763 of file intersection.c.

static 
Definition at line 733 of file intersection.c.

static 
Definition at line 13 of file intersection.c.