Functions
g2d.c File Reference
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include "g2d.h"
#include "common/math_util.h"
Include dependency graph for g2d.c:

Go to the source code of this file.

Functions

static int double_sort_up (const void *_a, const void *_b)
 
zarray_tg2d_convex_hull (const zarray_t *points)
 
double g2d_distance (const double a[2], const double b[2])
 
double g2d_line_get_coordinate (const g2d_line_t *line, const double q[2])
 
void g2d_line_init_from_points (g2d_line_t *line, const double p0[2], const double p1[2])
 
int g2d_line_intersect_line (const g2d_line_t *linea, const g2d_line_t *lineb, double *p)
 
void g2d_line_segment_closest_point (const g2d_line_segment_t *seg, const double *q, double *p)
 
void g2d_line_segment_init_from_points (g2d_line_segment_t *seg, const double p0[2], const double p1[2])
 
int g2d_line_segment_intersect_line (const g2d_line_segment_t *seg, const g2d_line_t *line, double *p)
 
int g2d_line_segment_intersect_segment (const g2d_line_segment_t *sega, const g2d_line_segment_t *segb, double *p)
 
void g2d_polygon_add (zarray_t *poly, double v[2])
 
void g2d_polygon_closest_boundary_point (const zarray_t *poly, const double q[2], double *p)
 
int g2d_polygon_contains_point (const zarray_t *poly, double q[2])
 
int g2d_polygon_contains_point_ref (const zarray_t *poly, double q[2])
 
int g2d_polygon_contains_polygon (const zarray_t *polya, const zarray_t *polyb)
 
zarray_tg2d_polygon_create_data (double v[][2], int sz)
 
zarray_tg2d_polygon_create_empty ()
 
zarray_tg2d_polygon_create_zeros (int sz)
 
void g2d_polygon_get_interior_point (const zarray_t *poly, double *p)
 
int g2d_polygon_intersects_polygon (const zarray_t *polya, const zarray_t *polyb)
 
void g2d_polygon_make_ccw (zarray_t *poly)
 
int g2d_polygon_overlaps_polygon (const zarray_t *polya, const zarray_t *polyb)
 
int g2d_polygon_rasterize (const zarray_t *poly, double y, double *x)
 

Function Documentation

◆ double_sort_up()

static int double_sort_up ( const void *  _a,
const void *  _b 
)
static

Definition at line 640 of file g2d.c.

◆ g2d_convex_hull()

zarray_t* g2d_convex_hull ( const zarray_t points)

Definition at line 192 of file g2d.c.

◆ g2d_distance()

double g2d_distance ( const double  a[2],
const double  b[2] 
)

Definition at line 43 of file g2d.c.

◆ g2d_line_get_coordinate()

double g2d_line_get_coordinate ( const g2d_line_t line,
const double  q[2] 
)

Definition at line 428 of file g2d.c.

◆ g2d_line_init_from_points()

void g2d_line_init_from_points ( g2d_line_t line,
const double  p0[2],
const double  p1[2] 
)

Definition at line 416 of file g2d.c.

◆ g2d_line_intersect_line()

int g2d_line_intersect_line ( const g2d_line_t linea,
const g2d_line_t lineb,
double *  p 
)

Definition at line 436 of file g2d.c.

◆ g2d_line_segment_closest_point()

void g2d_line_segment_closest_point ( const g2d_line_segment_t seg,
const double *  q,
double *  p 
)

Definition at line 484 of file g2d.c.

◆ g2d_line_segment_init_from_points()

void g2d_line_segment_init_from_points ( g2d_line_segment_t seg,
const double  p0[2],
const double  p1[2] 
)

Definition at line 476 of file g2d.c.

◆ g2d_line_segment_intersect_line()

int g2d_line_segment_intersect_line ( const g2d_line_segment_t seg,
const g2d_line_t line,
double *  p 
)

Definition at line 536 of file g2d.c.

◆ g2d_line_segment_intersect_segment()

int g2d_line_segment_intersect_segment ( const g2d_line_segment_t sega,
const g2d_line_segment_t segb,
double *  p 
)

Definition at line 502 of file g2d.c.

◆ g2d_polygon_add()

void g2d_polygon_add ( zarray_t poly,
double  v[2] 
)

Definition at line 53 of file g2d.c.

◆ g2d_polygon_closest_boundary_point()

void g2d_polygon_closest_boundary_point ( const zarray_t poly,
const double  q[2],
double *  p 
)

Definition at line 298 of file g2d.c.

◆ g2d_polygon_contains_point()

int g2d_polygon_contains_point ( const zarray_t poly,
double  q[2] 
)

Definition at line 323 of file g2d.c.

◆ g2d_polygon_contains_point_ref()

int g2d_polygon_contains_point_ref ( const zarray_t poly,
double  q[2] 
)

Definition at line 121 of file g2d.c.

◆ g2d_polygon_contains_polygon()

int g2d_polygon_contains_polygon ( const zarray_t polya,
const zarray_t polyb 
)

Definition at line 590 of file g2d.c.

◆ g2d_polygon_create_data()

zarray_t* g2d_polygon_create_data ( double  v[][2],
int  sz 
)

Definition at line 58 of file g2d.c.

◆ g2d_polygon_create_empty()

zarray_t* g2d_polygon_create_empty ( )

Definition at line 48 of file g2d.c.

◆ g2d_polygon_create_zeros()

zarray_t* g2d_polygon_create_zeros ( int  sz)

Definition at line 68 of file g2d.c.

◆ g2d_polygon_get_interior_point()

void g2d_polygon_get_interior_point ( const zarray_t poly,
double *  p 
)

Definition at line 605 of file g2d.c.

◆ g2d_polygon_intersects_polygon()

int g2d_polygon_intersects_polygon ( const zarray_t polya,
const zarray_t polyb 
)

Definition at line 560 of file g2d.c.

◆ g2d_polygon_make_ccw()

void g2d_polygon_make_ccw ( zarray_t poly)

Definition at line 80 of file g2d.c.

◆ g2d_polygon_overlaps_polygon()

int g2d_polygon_overlaps_polygon ( const zarray_t polya,
const zarray_t polyb 
)

Definition at line 618 of file g2d.c.

◆ g2d_polygon_rasterize()

int g2d_polygon_rasterize ( const zarray_t poly,
double  y,
double *  x 
)

Definition at line 685 of file g2d.c.



apriltag
Author(s): Edwin Olson , Max Krogius
autogenerated on Mon Jun 26 2023 02:26:35