void    GLUI_Translation::iaction_draw_active_area_ortho( void )
{
  /********* Draw emboss circles around arcball control *********/
  float radius;
  radius = (float)(h-22)/2.0;  /*  MIN((float)w/2.0, (float)h/2.0); */
  glLineWidth( 1.0 );

  draw_emboss_box( (int) -radius-2, (int)radius+2,
		   (int)-radius-2, (int)radius+2 );

  glMatrixMode( GL_MODELVIEW );
  glPushMatrix();
  glTranslatef( .5, .5, .5 );
  /*  glScalef( radius-1.0, radius-1.0, radius-1.0 ); */
  if ( trans_type == GLUI_TRANSLATION_Z )
    draw_2d_z_arrows((int)radius-1);
  else if ( trans_type == GLUI_TRANSLATION_XY )
    draw_2d_xy_arrows((int)radius-1);
  else if ( trans_type == GLUI_TRANSLATION_X )
    draw_2d_x_arrows((int)radius-1);
  else if ( trans_type == GLUI_TRANSLATION_Y )
    draw_2d_y_arrows((int)radius-1);

  glPopMatrix();
}
Esempio n. 2
0
void    GLUI_Translation::iaction_draw_active_area_ortho( void )
{
  int orig, state;

  if ( NOT can_draw() )
    return;

  orig = set_to_glut_window();
  state = glui->set_front_draw_buffer();

  /********* Draw emboss circles around arcball control *********/
  float radius;
  radius = (float)(h-22)/2.0;  /*  MIN((float)w/2.0, (float)h/2.0); */
  glLineWidth( 1.0 );

  draw_emboss_box( (int) -radius-2, (int)radius+2, 
		   (int)-radius-2, (int)radius+2 );

  glMatrixMode( GL_MODELVIEW );
  glPushMatrix();
  glTranslatef( .5, .5, .5 );
  /*  glScalef( radius-1.0, radius-1.0, radius-1.0 ); */
  if ( trans_type == GLUI_TRANSLATION_Z )
    draw_2d_z_arrows((int)radius-1);
  else if ( trans_type == GLUI_TRANSLATION_XY )
    draw_2d_xy_arrows((int)radius-1);
  else if ( trans_type == GLUI_TRANSLATION_X )
    draw_2d_x_arrows((int)radius-1);
  else if ( trans_type == GLUI_TRANSLATION_Y )
    draw_2d_y_arrows((int)radius-1);

  glPopMatrix();

  glui->restore_draw_buffer(state);
  restore_window( orig );

}