File: delaunay.h

package info (click to toggle)
plplot 5.10.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 26,280 kB
  • ctags: 13,512
  • sloc: ansic: 83,001; xml: 27,081; ada: 18,878; cpp: 15,966; tcl: 11,651; python: 7,075; f90: 7,058; ml: 6,974; java: 6,665; perl: 5,029; sh: 2,210; makefile: 199; lisp: 75; sed: 25; fortran: 7
file content (80 lines) | stat: -rw-r--r-- 1,901 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
//--------------------------------------------------------------------------
//
// File:           delaunay.h
//
// Created:        04/08/2000
//
// Author:         Pavel Sakov
//                 CSIRO Marine Research
//
// Purpose:        Header for delaunay triangulation wrapper
//
// Description:    None
//
// Revisions:      None
//
//--------------------------------------------------------------------------

#if !defined ( _DELAUNAY_H )
#define _DELAUNAY_H

#include "nn.h"

typedef struct
{
    int vids[3];
} triangle;

typedef struct
{
    int tids[3];
} triangle_neighbours;

typedef struct
{
    double x;
    double y;
    double r;
} circle;

#if !defined ( _ISTACK_H )
struct istack;
typedef struct istack   istack;
#endif

struct delaunay
{
    int    npoints;
    point              * points;
    double xmin;
    double xmax;
    double ymin;
    double ymax;

    int    ntriangles;
    triangle           * triangles;
    circle             * circles;
    triangle_neighbours* neighbours;        // for delaunay_xytoi()

    int                * n_point_triangles; // n_point_triangles[i] is number of
                                            // triangles i-th point belongs to
    int                ** point_triangles;  // point_triangles[i][j] is index of j-th
                                            // triangle i-th point belongs to

    int                nedges;
    int                * edges; // n-th edge is formed by points[edges[n*2]]
                                // and points[edges[n*2+1]]

    //
    // Work data for delaunay_circles_find(). Placed here for efficiency
    // reasons. Should be moved to the procedure if parallelizable code
    // needed.
    //
    int   * flags;
    int   first_id;             // last search result, used in start up of a
                                // new search
    istack* t_in;
    istack* t_out;
};

#endif