From b4fa6b9c97b3876340ddabcf2420d9e4daa87aff Mon Sep 17 00:00:00 2001 From: ganovelli Date: Thu, 24 Jul 2008 12:37:18 +0000 Subject: [PATCH] -missing template type added in CameraDistance -bug in DrawPoints removed --- wrap/gl/trimesh.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wrap/gl/trimesh.h b/wrap/gl/trimesh.h index 54045d6f..5612a7e4 100644 --- a/wrap/gl/trimesh.h +++ b/wrap/gl/trimesh.h @@ -622,10 +622,10 @@ void DrawPointsBase() /// Utility function that computes in eyespace the current distance between the camera and the center of the bbox of the mesh double CameraDistance(){ - Point3f res; - Matrix44f mm; + Point3 res; + Matrix44 mm; glGetv(GL_MODELVIEW_MATRIX,mm); - Point3f c=m->bbox.Center(); + Point3 c=m->bbox.Center(); res=mm*c; return Norm(res); } @@ -653,7 +653,7 @@ void DrawPoints() glEnableClientState (GL_NORMAL_ARRAY); glNormalPointer(GL_FLOAT,sizeof(typename MESH_TYPE::VertexType),&(m->vert.begin()->N()[0])); } - if (cm==CMPerVert) glEnableClientState (GL_COLOR_ARRAY); + if (cm==CMPerVert) { glEnableClientState (GL_COLOR_ARRAY); glColorPointer(4,GL_UNSIGNED_BYTE,sizeof(typename MESH_TYPE::VertexType),&(m->vert.begin()->C()[0]));