Okay then.
Can I use you guys to bounce ideas around???
I'm just curious how I should construct my code to maximize the use and efficiency of OOP.
Okay, I allocate a base particle set which I will use as vertices for my triangulation. I don't think this needs the use of any in-line members or functions as it's too specific. I'm not writing a generic allocation routine, I'm allocating a Cartesian distribution with positions (0, 0, 0) to (7, 7, 7) for 512 points.
I build a root tetrahedron for the insertion algorithm.
I figure one good use of objects is in my tetrahedron structure.
Code:
struct tetra {
struct particle *p[4]; // 4 vertices per tetrahedron
struct tetra *ngb[4]; //4 neighbouring tetrahedra
double a[4], b[4], c[4], d[4]; // half-plane data (stored for the sake of point location performance)
void mallocTetra(struct tetra *t); //allocate memory for a non-local address (I should do this, right?)
int allocTetra(struct tetra *t, struct particle *p0, struct particle *p1, struct particle *p2, struct particle *p3) /* take a non-local address to a tetrahedron and assign points, half-plane data and initialize neighbours to NULL */
};
Granted, I still need to add to this but this is the general idea of an OO approach, right? Sorry if this all seems to nooby, never done this before.