dgraph.c File Reference

#include <stdlib.h>
#include <grass/Vect.h>
#include <grass/gis.h>
#include "dgraph.h"
#include "e_intersect.h"

Include dependency graph for dgraph.c:

Go to the source code of this file.

Data Structures

struct  intersection_point
struct  seg_intersection
struct  seg_intersection_list
struct  seg_intersections

Defines

#define LENGTH(DX, DY)   (sqrt((DX*DX)+(DY*DY)))
#define MIN(X, Y)   ((X<Y)?X:Y)
#define MAX(X, Y)   ((X>Y)?X:Y)
#define PI   M_PI

Functions

struct seg_intersectionscreate_si_struct (int segments_count)
void destroy_si_struct (struct seg_intersections *si)
void add_ipoint1 (struct seg_intersection_list *il, int with, double dist, int ip)
void add_ipoint (struct line_pnts *Points, int first_seg, int second_seg, double x, double y, struct seg_intersections *si)
void sort_intersection_list (struct seg_intersection_list *il)
double get_epsilon (struct line_pnts *Points)
struct seg_intersectionsfind_all_intersections (struct line_pnts *Points)
struct planar_graphpg_create_struct (int n, int e)
void pg_destroy_struct (struct planar_graph *pg)
int pg_existsedge (struct planar_graph *pg, int v1, int v2)
void pg_addedge1 (struct pg_vertex *v, struct pg_edge *e)
void pg_addedge (struct planar_graph *pg, int v1, int v2)
struct planar_graphpg_create (struct line_pnts *Points)


Define Documentation

#define LENGTH ( DX,
DY   )     (sqrt((DX*DX)+(DY*DY)))

Definition at line 7 of file dgraph.c.

#define MAX ( X,
 )     ((X>Y)?X:Y)

Definition at line 12 of file dgraph.c.

#define MIN ( X,
 )     ((X<Y)?X:Y)

Definition at line 9 of file dgraph.c.

#define PI   M_PI

Definition at line 14 of file dgraph.c.


Function Documentation

void add_ipoint ( struct line_pnts *  Points,
int  first_seg,
int  second_seg,
double  x,
double  y,
struct seg_intersections si 
)

void add_ipoint1 ( struct seg_intersection_list il,
int  with,
double  dist,
int  ip 
)

struct seg_intersections* create_si_struct ( int  segments_count  )  [read]

void destroy_si_struct ( struct seg_intersections si  ) 

struct seg_intersections* find_all_intersections ( struct line_pnts *  Points  )  [read]

double get_epsilon ( struct line_pnts *  Points  ) 

Definition at line 177 of file dgraph.c.

References MAX, intersection_point::x, and intersection_point::y.

void pg_addedge ( struct planar_graph pg,
int  v1,
int  v2 
)

void pg_addedge1 ( struct pg_vertex v,
struct pg_edge e 
)

Definition at line 396 of file dgraph.c.

References pg_vertex::eallocated, pg_vertex::ecount, and pg_vertex::edges.

Referenced by pg_addedge().

struct planar_graph* pg_create ( struct line_pnts *  Points  )  [read]

struct planar_graph* pg_create_struct ( int  n,
int  e 
) [read]

void pg_destroy_struct ( struct planar_graph pg  ) 

int pg_existsedge ( struct planar_graph pg,
int  v1,
int  v2 
)

Definition at line 371 of file dgraph.c.

References pg_vertex::ecount, pg_vertex::edges, planar_graph::v, pg_edge::v1, and pg_edge::v2.

Referenced by pg_addedge().

void sort_intersection_list ( struct seg_intersection_list il  ) 


Generated on Thu Jul 16 13:21:22 2009 for GRASS Programmer's Manual by  doxygen 1.5.6