/******************************************************************************
             Copyright (c) 1999 Unigraphics Solutions, Inc.
                       Unpublished - All Rights Reserved

*******************************************************************************/
/*
The following example asks the user to input a vector. The mode will
default to the +YC axis. A temporary conehead will be displayed at
the vector specified by the user.
*/

#include <stdio.h>
#include <uf.h>
#include <uf_ui.h>
void ufusr (char *param ,int *retcod, int param_len)
{
  double  vec[3], pnt[3];
  int  mode = UF_UI_YC_AXIS;
  int  disp_flag = UF_UI_DISP_TEMP_VECTOR;
  int  response = 0;
  int  ifail;
 
  UF_initialize();
  ifail =  UF_UI_specify_vector( "Choose a Vector",
                                 &mode,
                                 disp_flag,
                                 vec,
                                 pnt,
                                 &response );
  if ( ifail != 0 || response != UF_UI_OK )
     printf( "No vector selected \n" );
  else
     printf( "Vect base (%f, %f, %f), direction (%f, %f, %f) \n",
             pnt[0], pnt[1], pnt[2], vec[0], vec[1], vec[2] );

  fflush( stdout );

  UF_terminate();
}

