#include <iostream>
#include "origin.h"
Go to the source code of this file.
Macro defined for identifying 3 points that rotate anticlockwise
Macro defined for identifying 3 points that rotate clockwise
Macro defined for identifying 3 collinear points
Bool Check Below.
Check the location of the two DCEL Vertices
double x
Definition: DCELVertex.h:8
double y
Definition: DCELVertex.h:9
| void form_vertex_type |
( |
| ) |
|
form_vertex_type
Check whether START_VERTEX, SPLIT_VERTEX, MERGE_VERTEX, REGULAR_VERTEX
58 for (
int i = 0; i <
vlen; i++) {
int type
Definition: DCELVertex.h:15
DCELHalfEdge * edge
Definition: DCELVertex.h:10
DCELHalfEdge * twin
Definition: DCELHalfEdge.h:14
int orientation(DCELVertex *a, DCELVertex *b, DCELVertex *c)
Orientation.
Definition: monotone.h:26
VertexList Vertices
Definition: origin.h:13
#define START_VERTEX
Definition: monotone.h:5
DCELVertex * origin
Definition: DCELHalfEdge.h:17
bool below(DCELVertex *v1, DCELVertex *v2)
Bool Check Below.
Definition: monotone.h:41
#define END_VERTEX
Definition: monotone.h:6
int vlen
Definition: monotone.h:20
Definition: DCELVertex.h:2
#define SPLIT_VERTEX
Definition: monotone.h:8
DCELHalfEdge * getPrev()
Half Edges.
Definition: DCELHalfEdge.h:36
#define REGULAR_VERTEX
Definition: monotone.h:4
#define MERGE_VERTEX
Definition: monotone.h:7
int length
Definition: VertexList.h:13
#define CLOCKWISE
Definition: monotone.h:10
DCELVertex * next
Definition: DCELVertex.h:18
DCELVertex * head
Definition: VertexList.h:9
VERTEX HANDLING.
Hepler For Handling End Vertex
int type
Definition: DCELVertex.h:15
DCELHalfEdge * edge
Definition: DCELVertex.h:10
void insertDiagonal(DCELVertex *v1, DCELVertex *v2)
Definition: origin.h:105
DCELHalfEdge * getPrev()
Half Edges.
Definition: DCELHalfEdge.h:36
DCELVertex * helper
Definition: DCELHalfEdge.h:18
#define MERGE_VERTEX
Definition: monotone.h:7
set< DCELHalfEdge *, func > tree
Definition: monotone.h:18
116 set<DCELHalfEdge *, func>::iterator it;
118 if (it !=
tree.begin()) {
int type
Definition: DCELVertex.h:15
DCELHalfEdge * edge
Definition: DCELVertex.h:10
void insertDiagonal(DCELVertex *v1, DCELVertex *v2)
Definition: origin.h:105
DCELHalfEdge * getPrev()
Half Edges.
Definition: DCELHalfEdge.h:36
DCELVertex * helper
Definition: DCELHalfEdge.h:18
#define MERGE_VERTEX
Definition: monotone.h:7
bool left_edgeto_vertex(const DCELHalfEdge *e1, const DCELHalfEdge *e2)
Definition: monotone.h:47
set< DCELHalfEdge *, func > tree
Definition: monotone.h:18
Definition: DCELHalfEdge.h:8
139 set<DCELHalfEdge *, func>::iterator it;
141 if (it !=
tree.begin()) {
int type
Definition: DCELVertex.h:15
DCELHalfEdge * edge
Definition: DCELVertex.h:10
DCELHalfEdge * twin
Definition: DCELHalfEdge.h:14
DCELVertex * origin
Definition: DCELHalfEdge.h:17
void insertDiagonal(DCELVertex *v1, DCELVertex *v2)
Definition: origin.h:105
bool below(DCELVertex *v1, DCELVertex *v2)
Bool Check Below.
Definition: monotone.h:41
DCELHalfEdge * getPrev()
Half Edges.
Definition: DCELHalfEdge.h:36
DCELVertex * helper
Definition: DCELHalfEdge.h:18
#define MERGE_VERTEX
Definition: monotone.h:7
bool left_edgeto_vertex(const DCELHalfEdge *e1, const DCELHalfEdge *e2)
Definition: monotone.h:47
set< DCELHalfEdge *, func > tree
Definition: monotone.h:18
Definition: DCELHalfEdge.h:8
98 set<DCELHalfEdge *, func>::iterator it;
100 if (it !=
tree.begin()) {
DCELHalfEdge * edge
Definition: DCELVertex.h:10
void insertDiagonal(DCELVertex *v1, DCELVertex *v2)
Definition: origin.h:105
DCELVertex * helper
Definition: DCELHalfEdge.h:18
bool left_edgeto_vertex(const DCELHalfEdge *e1, const DCELHalfEdge *e2)
Definition: monotone.h:47
set< DCELHalfEdge *, func > tree
Definition: monotone.h:18
Definition: DCELHalfEdge.h:8
form_vertex_type
Hepler For Handling STart Vertex
DCELHalfEdge * edge
Definition: DCELVertex.h:10
DCELVertex * helper
Definition: DCELHalfEdge.h:18
set< DCELHalfEdge *, func > tree
Definition: monotone.h:18
DCELVertex * origin
Definition: DCELHalfEdge.h:17
double x
Definition: DCELVertex.h:8
double y
Definition: DCELVertex.h:9
Orientation.
This function is used to calculate orientation of 3 points namely clockwise, anticlockwise and collinear. The idea here is to to get the difference between slopes of 2 lines by assuming a particular direction as a result the result obtained determines the direction of turn of the three points.
28 dif = (b->
y - a->
y) * (c->
x - b->
x) - (b->
x - a->
x) * (c->
y - b->
y);
31 }
else if (dif > 0 ) {
#define COLLINEAR
Definition: monotone.h:9
double x
Definition: DCELVertex.h:8
double y
Definition: DCELVertex.h:9
#define CLOCKWISE
Definition: monotone.h:10
#define ANTICLOCKWISE
Definition: monotone.h:11
| void split_into_monotone |
( |
| ) |
|
VERTEX HANDLING.
Splitting into montone pieces in the polygon
168 }
int type
Definition: DCELVertex.h:15
VertexList Vertices
Definition: origin.h:13
#define START_VERTEX
Definition: monotone.h:5
void HANDLE_REGULAR_VERTEX(DCELVertex *v)
Definition: monotone.h:129
void form_vertex_type()
form_vertex_type
Definition: monotone.h:55
void HANDLE_SPLIT_VERTEX(DCELVertex *v)
Definition: monotone.h:97
#define END_VERTEX
Definition: monotone.h:6
Definition: DCELVertex.h:2
#define SPLIT_VERTEX
Definition: monotone.h:8
#define REGULAR_VERTEX
Definition: monotone.h:4
#define MERGE_VERTEX
Definition: monotone.h:7
void HANDLE_END_VERTEX(DCELVertex *v)
VERTEX HANDLING.
Definition: monotone.h:89
void HANDLE_START_VERTEX(DCELVertex *v)
form_vertex_type
Definition: monotone.h:81
DCELVertex * next
Definition: DCELVertex.h:18
void HANDLE_MERGE_VERTEX(DCELVertex *v)
Definition: monotone.h:110
DCELVertex * head
Definition: VertexList.h:9