Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
voronoi.h 1.11 KiB
/*
 * voronoi.h
 *
 *  Created on: 23 Nov 2018
 *      Author: Mika
 */

#ifndef SRC_VORONOI_H_
#define SRC_VORONOI_H_

#include "delaunay.h"

/**
 * a vertex represented by a circle, where it is the center
 */
typedef struct {
	vertex a;
	vertex b;
	vertex c;
} vertexCircle;

//TODO better name
/**
 * an edge represented by 2 vertexCircles
 */
typedef struct {
	vertexCircle a;
	vertexCircle b;
} edgeCircle;

/**
 * returns  the  first  Voronoi  vertex  on  the  boundary  of  the Voronoi region associated with the point p e S
 * @param point p e S
 * @return the  first  Voronoi  vertex  on  the  boundary  of  the Voronoi region associated with p
 */
vertexCircle firstVoronoiVertexAssociatedWith(vertex p);

/**
 * returns  the  next  Voronoi  edge incident to e.a, following e in the clockwise direction
 * @param e
 * @return
 */
edgeCircle clockwiseNextVoronoiEdge(edgeCircle e);

/**
 * returns  the  Voronoi  edge following e along the boundary of its Voronoi region
 * @param e
 * @return
 */
edgeCircle nextVoronoiEdgeOnBoudary(edgeCircle e);


#endif /* SRC_VORONOI_H_ */