A triangle always has three vertices (by definition); why would you be doing any dynamic allocation at all (or for that matter, storing a vertex count)?
In fact, what your "build" functions are doing is
exactly what the constructors should be doing. And since it has to happen
sometime, you're not going to sell me any performance arguments :P (But you *do* know about initialization lists, yes? Oh, and "contacted" sure sounds like it should be a boolean value...)
And what's a g_vector, anyway?
triangle::triangle(const vector& V1, const vector& V2, const vector& V3) : r(0), g(1), b(0), contacted(false), plane(V1, V2, V3) { vertices[0] = V1; vertices[1] = V2; vertices[2] = V3; lines[0] = line(V1, V2 - V1); lines[1] = line(V2, V3 - V2); lines[2] = line(V3, V1 - V3);}
(And that's ignoring potential deeper design problems, such as redundancy in the stored data...)