示例#1
0
文件: material.cpp 项目: GLVis/glvis
void Set_Material_And_Light (int m, int l)
{
   Current_Material = l;
   Set_Light();
   Current_Material = m;
   Set_Material();
}
示例#2
0
void VisualizationScene::CenterObject2D()
{
   glMatrixMode (GL_MODELVIEW);
   glLoadIdentity();
   glGetDoublev (GL_MODELVIEW_MATRIX, translmat);
   Set_Light();
   glGetDoublev (GL_MODELVIEW_MATRIX, rotmat);
}
示例#3
0
文件: material.cpp 项目: GLVis/glvis
int Next_Material_And_Light()
{
   Current_Material = (Current_Material + 1) % Num_Materials;
   Set_Material();
   Set_Light();

   return Current_Material+1;
}
示例#4
0
void VisualizationScene::CenterObject()
{
   glMatrixMode (GL_MODELVIEW);
   glLoadIdentity();
   glGetDoublev (GL_MODELVIEW_MATRIX, translmat);

   Set_Light();

   glRotatef(-60.0, 1.0f, 0.0f, 0.0f);
   glRotatef(-40.0, 0.0f, 0.0f, 1.0f);
   glGetDoublev (GL_MODELVIEW_MATRIX, rotmat);
}