I have this function that I want to generate normals for on it's own.It work's fine. But Its really ugly and tacky. I just wanna be able to call it and that is it. But I have a function normalise. But I doubt that will determine what way it is supposely be looking at.

MATH_INLINE void glNormal3d(Vec3& p1, Vec3& p2)

{

Vec3 v = Vec3(x, y, z);

Vec3 v1 = p1 - v;

Vec3 v2 = p2 - p1;

Vec3 normal = Vec3(v1.cross(v2));

normal.normalise();

normal.printVec3();

glNormal3dv(normal.ptr());

}

glBegin(GL_TRIANGLES);

verts[0].glNormal3d(verts[1], verts[2]); verts[0].glVertex3d();

verts[1].glNormal3d(verts[2], verts[0]); verts[1].glVertex3d();

verts[2].glNormal3d(verts[0], verts[1]); verts[2].glVertex3d();

glEnd();