How to make Vertex Table, Edge Table and Surface Table to store geometric information of an object??
Vertex table consists of the array of vertices with the coordinate value of each vertex. In C++, a vertex table can be created by creating a class that has . For example
points = new Point3D();
Edge table consists of pointers back into vertex to identify the edges for each polygon. For example,
bool done; //1 if edge not to be drawn:
//0 if edge to be drawn, avoids multiple drawing of the edges
edge *adjsur; //pointer to adjacent surface's edge
ver1 = new vertex();
ver2 = new vertex();
done = false;
float A, B, C, D;
edges = new edge();
A = 0.0f;
B = 0.0f;
C = 0.0f;
D = 0.0f;
icolor = 0;
Rules for creating Geometric table:
1. Every vertex is listed as an end point for at least two edges.
2. Every edge is part of at least one polygon
3. Each polygon has at least one shared edge.
4. Every surface is close.