#include <iostream>
#include <bits/stdc++.h>
#include <typeinfo>
#include "HalfEdgeList.h"
#include "VertexList.h"
Go to the source code of this file.
102 }
while (walker != v1->
edge);
DCELHalfEdge * edge
Definition: DCELVertex.h:10
DCELHalfEdge * twin
Definition: DCELHalfEdge.h:14
DCELHalfEdge * next
Definition: DCELHalfEdge.h:15
DCELVertex * origin
Definition: DCELHalfEdge.h:17
Definition: DCELHalfEdge.h:8
88 {face = walker->
face;
break;}
90 }
while (twinWalker != v2->
edge);
92 }
while (walker != v1->
edge && !face);
DCELHalfEdge * edge
Definition: DCELVertex.h:10
DCELHalfEdge * twin
Definition: DCELHalfEdge.h:14
DCELHalfEdge * next
Definition: DCELHalfEdge.h:15
DCELFace * face
Definition: DCELHalfEdge.h:16
Definition: DCELHalfEdge.h:8
bool bordered
Definition: DCELFace.h:8
| void getPolygon |
( |
char const * |
filename | ) |
|
Extract Data from Input File.
getPolygon is the main extractor function that builds the collations. Vertices are expected to be received in an anticlockwise order.
30 in_file.open(filename);
31 while (in_file.is_open()) {
34 while (in_file >> a >> b >> c) {
43 LaggingTwin->
face = outer;
44 outer->
edge = LaggingTwin;
DCELHalfEdge * edge
Definition: DCELVertex.h:10
DCELHalfEdge * twin
Definition: DCELHalfEdge.h:14
void addToList(DCELHalfEdge *newEdge)
Definition: HalfEdgeList.h:33
DCELHalfEdge * next
Definition: DCELHalfEdge.h:15
void setCoords(double a, double b)
Definition: DCELVertex.h:30
FaceList Faces
Definition: origin.h:15
VertexList Vertices
Definition: origin.h:13
void addToList(DCELFace *newFace)
CREATE FACES.
Definition: FaceList.h:28
DCELVertex * origin
Definition: DCELHalfEdge.h:17
DCELHalfEdge * head
Definition: HalfEdgeList.h:13
DCELFace * face
Definition: DCELHalfEdge.h:16
Definition: DCELVertex.h:2
DCELHalfEdge * tail
Definition: HalfEdgeList.h:14
int length
Definition: VertexList.h:13
HalfEdgeList Edges
Definition: origin.h:14
void addToList(DCELVertex *newVertex)
Definition: VertexList.h:38
DCELHalfEdge * addTwinTo(DCELHalfEdge *edge, DCELHalfEdge *LaggingTwin)
GETTTING THE HALF EDGE LIST.
Definition: HalfEdgeList.h:51
Definition: DCELHalfEdge.h:8
bool bordered
Definition: DCELFace.h:8
DCELHalfEdge * edge
Definition: DCELFace.h:7
106 if (v1 == v2)
return;
FaceList Faces
Definition: origin.h:15
void removeFromList(DCELFace *face)
CREATE FACES.
Definition: FaceList.h:58
void addToList(DCELFace *newFace)
CREATE FACES.
Definition: FaceList.h:28
DCELFace * getFaceCommonTo(DCELVertex *v1, DCELVertex *v2)
Definition: origin.h:81
bool checkEdge(DCELVertex *v1, DCELVertex *v2)
Definition: origin.h:95
HalfEdgeList Edges
Definition: origin.h:14
DCELFace * addEdgeBetween(DCELVertex *v1, DCELVertex *v2, DCELFace *face)
GETTTING THE HALF EDGE LIST.
Definition: HalfEdgeList.h:75
61 cout <<
"OFF" << endl;
68 edgeWalker = walker->
edge;
72 edgeWalker = edgeWalker->
next;
73 }
while (edgeWalker != walker->
edge);
74 cout << (double)rand() / RAND_MAX <<
" " << (double)rand() / RAND_MAX <<
" " << (double)rand() / RAND_MAX;
77 walker = walker->
next;
DCELHalfEdge * next
Definition: DCELHalfEdge.h:15
FaceList Faces
Definition: origin.h:15
VertexList Vertices
Definition: origin.h:13
DCELVertex * origin
Definition: DCELHalfEdge.h:17
DCELFace * head
Definition: FaceList.h:9
int length()
Definition: FaceList.h:42
int boundaryLength()
Definition: DCELFace.h:22
DCELFace * next
Definition: DCELFace.h:9
void echo()
Definition: VertexList.h:26
int index
Definition: DCELVertex.h:16
int length
Definition: VertexList.h:13
Definition: DCELHalfEdge.h:8
bool bordered
Definition: DCELFace.h:8
DCELHalfEdge * edge
Definition: DCELFace.h:7