diff --git a/wrap/gl/space.h b/wrap/gl/space.h index 7fa82867..6ad80a5e 100644 --- a/wrap/gl/space.h +++ b/wrap/gl/space.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.9 2007/05/08 18:55:38 ganovelli +glTriangle added + Revision 1.8 2007/01/18 01:26:23 cignoni Added cast for mac compiling @@ -256,12 +259,22 @@ inline void glBoxClip(const Box3 & b) template inline void glTriangle3( TriangleType & c ) { + vcg::Point3 n = vcg::Normal(c); glBegin(GL_TRIANGLES); + glNormal(n); glVertex(c.P(0)); glVertex(c.P(1)); glVertex(c.P(2)); glEnd(); } +template + inline void glTetra3( TetraType & c ) { + glTriangle3(Triangle3(c.P(0),c.P(1),c.P(2))); + glTriangle3(Triangle3(c.P(1),c.P(3),c.P(2))); + glTriangle3(Triangle3(c.P(0),c.P(2),c.P(3))); + glTriangle3(Triangle3(c.P(1),c.P(0),c.P(3))); + } + }//namespace #endif