-missing template type added in CameraDistance
-bug in DrawPoints removed
This commit is contained in:
parent
d89a3da4ea
commit
b4fa6b9c97
|
@ -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
|
/// Utility function that computes in eyespace the current distance between the camera and the center of the bbox of the mesh
|
||||||
double CameraDistance(){
|
double CameraDistance(){
|
||||||
Point3f res;
|
Point3<typename MESH_TYPE::ScalarType> res;
|
||||||
Matrix44f mm;
|
Matrix44<typename MESH_TYPE::ScalarType> mm;
|
||||||
glGetv(GL_MODELVIEW_MATRIX,mm);
|
glGetv(GL_MODELVIEW_MATRIX,mm);
|
||||||
Point3f c=m->bbox.Center();
|
Point3<typename MESH_TYPE::ScalarType> c=m->bbox.Center();
|
||||||
res=mm*c;
|
res=mm*c;
|
||||||
return Norm(res);
|
return Norm(res);
|
||||||
}
|
}
|
||||||
|
@ -653,7 +653,7 @@ void DrawPoints()
|
||||||
glEnableClientState (GL_NORMAL_ARRAY);
|
glEnableClientState (GL_NORMAL_ARRAY);
|
||||||
glNormalPointer(GL_FLOAT,sizeof(typename MESH_TYPE::VertexType),&(m->vert.begin()->N()[0]));
|
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);
|
glEnableClientState (GL_COLOR_ARRAY);
|
||||||
glColorPointer(4,GL_UNSIGNED_BYTE,sizeof(typename MESH_TYPE::VertexType),&(m->vert.begin()->C()[0]));
|
glColorPointer(4,GL_UNSIGNED_BYTE,sizeof(typename MESH_TYPE::VertexType),&(m->vert.begin()->C()[0]));
|
||||||
|
|
Loading…
Reference in New Issue