#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <QtGlobal>
#include "../vmisc/diagnostic.h"
#include "delaunay.h"
Go to the source code of this file.
Classes | |
struct | point2d_s |
struct | face_s |
struct | halfedge_s |
struct | delaunay_s |
Macros | |
#define | ON_RIGHT 1 |
#define | ON_SEG 0 |
#define | ON_LEFT -1 |
#define | OUTSIDE -1 |
#define | ON_CIRCLE 0 |
#define | INSIDE 1 |
#define | REAL_ZERO 0.0 |
#define | REAL_ONE 1.0 |
#define | REAL_TWO 2.0 |
#define | REAL_FOUR 4.0 |
#define | TOLERANCE (1024.0 * 1024.0) |
#define | EPSILON (REAL_ONE / TOLERANCE) |
Typedefs | |
typedef struct point2d_s | point2d_t |
typedef struct face_s | face_t |
typedef struct halfedge_s | halfedge_t |
typedef struct delaunay_s | delaunay_t |
typedef real | mat3_t[3][3] |
Definition at line 67 of file delaunay.cpp.
#define INSIDE 1 |
Definition at line 45 of file delaunay.cpp.
#define ON_CIRCLE 0 |
Definition at line 44 of file delaunay.cpp.
#define ON_LEFT -1 |
Definition at line 41 of file delaunay.cpp.
#define ON_RIGHT 1 |
Definition at line 39 of file delaunay.cpp.
#define ON_SEG 0 |
Definition at line 40 of file delaunay.cpp.
#define OUTSIDE -1 |
Definition at line 43 of file delaunay.cpp.
#define REAL_FOUR 4.0 |
Definition at line 57 of file delaunay.cpp.
#define REAL_ONE 1.0 |
Definition at line 55 of file delaunay.cpp.
#define REAL_TWO 2.0 |
Definition at line 56 of file delaunay.cpp.
#define REAL_ZERO 0.0 |
Definition at line 54 of file delaunay.cpp.
#define TOLERANCE (1024.0 * 1024.0) |
Definition at line 58 of file delaunay.cpp.
typedef struct delaunay_s delaunay_t |
Definition at line 36 of file delaunay.cpp.
Definition at line 36 of file delaunay.cpp.
typedef struct halfedge_s halfedge_t |
Definition at line 36 of file delaunay.cpp.
typedef real mat3_t[3][3] |
Definition at line 73 of file delaunay.cpp.
Definition at line 36 of file delaunay.cpp.
|
static |
Definition at line 944 of file delaunay.cpp.
References halfedge_s::face, delaunay_s::faces, face_s::he, delaunay_s::num_faces, face_s::num_verts, halfedge_s::pair, and halfedge_s::prev.
Referenced by del_build_faces().
Definition at line 249 of file delaunay.cpp.
References ON_LEFT, ON_RIGHT, ON_SEG, REAL_ZERO, point2d_s::x, and point2d_s::y.
Referenced by del_classify_point(), del_get_lower_tangent(), del_init_tri(), del_valid_left(), and del_valid_right().
|
static |
Definition at line 227 of file delaunay.cpp.
References point2d_s::x, and point2d_s::y.
Referenced by delaunay2d_from().
void del_build_faces | ( | delaunay_t * | del | ) |
Definition at line 984 of file delaunay.cpp.
References build_halfedge_face(), delaunay_s::faces, point2d_s::he, halfedge_s::next, delaunay_s::num_faces, halfedge_s::pair, delaunay_s::points, delaunay_s::rightmost_he, and delaunay_s::start_point.
Referenced by delaunay2d_from().
|
static |
Definition at line 272 of file delaunay.cpp.
References classify_point_seg(), halfedge_s::pair, and halfedge_s::vertex.
Referenced by del_link().
void del_divide_and_conquer | ( | delaunay_t * | del, |
int | start, | ||
int | end | ||
) |
Definition at line 922 of file delaunay.cpp.
References del_init_seg(), del_init_tri(), del_link(), and delaunay_s::points.
Referenced by delaunay2d_from().
void del_free_halfedges | ( | delaunay_t * | del | ) |
Definition at line 179 of file delaunay.cpp.
References delaunay_s::end_point, halfedge_free(), point2d_s::he, halfedge_s::next, delaunay_s::points, and delaunay_s::start_point.
Referenced by delaunay2d_from().
|
static |
Definition at line 830 of file delaunay.cpp.
References classify_point_seg(), halfedge_alloc(), delaunay_s::leftmost_he, halfedge_s::next, ON_RIGHT, halfedge_s::pair, halfedge_s::prev, delaunay_s::rightmost_he, and halfedge_s::vertex.
Referenced by del_link().
|
static |
Definition at line 451 of file delaunay.cpp.
References delaunay_s::end_point, halfedge_alloc(), point2d_s::he, delaunay_s::leftmost_he, halfedge_s::next, halfedge_s::pair, delaunay_s::points, halfedge_s::prev, delaunay_s::rightmost_he, delaunay_s::start_point, and halfedge_s::vertex.
Referenced by del_divide_and_conquer().
|
static |
Definition at line 490 of file delaunay.cpp.
References classify_point_seg(), delaunay_s::end_point, halfedge_alloc(), point2d_s::he, delaunay_s::leftmost_he, halfedge_s::next, ON_LEFT, halfedge_s::pair, delaunay_s::points, halfedge_s::prev, delaunay_s::rightmost_he, delaunay_s::start_point, and halfedge_s::vertex.
Referenced by del_divide_and_conquer().
|
static |
Definition at line 877 of file delaunay.cpp.
References del_classify_point(), del_get_lower_tangent(), del_valid_link(), delaunay_s::end_point, point2d_s::he, delaunay_s::leftmost_he, halfedge_s::next, ON_LEFT, ON_RIGHT, halfedge_s::pair, delaunay_s::points, halfedge_s::prev, delaunay_s::rightmost_he, delaunay_s::start_point, and halfedge_s::vertex.
Referenced by del_divide_and_conquer().
|
static |
Definition at line 615 of file delaunay.cpp.
References halfedge_free(), point2d_s::he, halfedge_s::next, halfedge_s::pair, halfedge_s::prev, and halfedge_s::vertex.
Referenced by del_valid_left(), and del_valid_right().
|
static |
Definition at line 678 of file delaunay.cpp.
References classify_point_seg(), del_remove_edge(), in_circle(), INSIDE, halfedge_s::next, ON_CIRCLE, ON_LEFT, halfedge_s::pair, halfedge_s::prev, and halfedge_s::vertex.
Referenced by del_valid_link().
|
static |
Definition at line 770 of file delaunay.cpp.
References del_valid_left(), del_valid_right(), halfedge_alloc(), in_circle(), INSIDE, halfedge_s::next, ON_CIRCLE, halfedge_s::pair, halfedge_s::prev, and halfedge_s::vertex.
Referenced by del_link().
|
static |
Definition at line 725 of file delaunay.cpp.
References classify_point_seg(), del_remove_edge(), in_circle(), INSIDE, halfedge_s::next, ON_CIRCLE, ON_LEFT, halfedge_s::pair, halfedge_s::prev, and halfedge_s::vertex.
Referenced by del_valid_link().
delaunay2d_t* delaunay2d_from | ( | del_point2d_t * | points, |
quint32 | num_points | ||
) |
Definition at line 1008 of file delaunay.cpp.
References cmp_points(), del_build_faces(), del_divide_and_conquer(), del_free_halfedges(), exactinit(), delaunay_s::faces, delaunay2d_t::faces, face_s::he, point2d_s::idx, delaunay_s::num_faces, delaunay2d_t::num_faces, delaunay2d_t::num_points, face_s::num_verts, halfedge_s::pair, point_alloc(), point_free(), delaunay_s::points, delaunay2d_t::points, halfedge_s::prev, halfedge_s::vertex, point2d_s::x, del_point2d_t::x, point2d_s::y, and del_point2d_t::y.
Referenced by VObjEngine::drawPath().
void delaunay2d_release | ( | delaunay2d_t * | del | ) |
Definition at line 1082 of file delaunay.cpp.
References delaunay2d_t::faces, and delaunay2d_t::points.
Referenced by VObjEngine::drawPath().
QT_WARNING_PUSH void exactinit | ( | ) |
Definition at line 285 of file predicates.cpp.
References ccwerrboundA, ccwerrboundB, ccwerrboundC, epsilon, iccerrboundA, iccerrboundB, iccerrboundC, isperrboundA, isperrboundB, isperrboundC, o3derrboundA, o3derrboundB, o3derrboundC, resulterrbound, and splitter.
Referenced by delaunay2d_from().
|
static |
Definition at line 154 of file delaunay.cpp.
Referenced by del_get_lower_tangent(), del_init_seg(), del_init_tri(), and del_valid_link().
|
static |
Definition at line 168 of file delaunay.cpp.
Referenced by del_free_halfedges(), and del_remove_edge().
Definition at line 360 of file delaunay.cpp.
References EPSILON, incircle(), INSIDE, ON_CIRCLE, OUTSIDE, REAL_ONE, REAL_ZERO, point2d_s::x, and point2d_s::y.
Referenced by del_valid_left(), del_valid_link(), and del_valid_right().
|
static |
Definition at line 130 of file delaunay.cpp.
Referenced by delaunay2d_from().
|
static |
Definition at line 145 of file delaunay.cpp.
Referenced by delaunay2d_from().