c                            
c   Copyright (c) 1992  by  Dwight Meglan     
c           
      subroutine Display3DStatus( CMND,OPT3D,MRK_FLG,SEG_FLG,FRC_FLG,JNT_FLG,
     &                            AVG_FLG,CYC_FLG,EMG_FLG,OPT_FLG )
      implicit none

      include 'show3d.inc'             
     
      include '..\anz\a_const.inc'
      include '..\anz\a_struct.inc'
      include '..\anz\a_names.inc'
      include '..\anz\a_prm.inc'

      record /CmndLine/    CMND
      record /options_3d/  OPT3D

      record /marker_flag/    MRK_FLG
      record /segment_flag/   SEG_FLG
      record /force_flag/     FRC_FLG      
      record /joint_flag/     JNT_FLG
      record /avg_pos_flag/   AVG_FLG                                   
      record /cycle_flag/     CYC_FLG
      record /emg_flag/       EMG_FLG
      record /option_flag/    OPT_FLG

      integer*4 i

      if ( CMND.CmndText(2) .eq. 'OPT' ) then
        write(6,10) OPT3D.StartFrm,OPT3D.EndFrm,OPT3D.FrmInc
10      format(/' Starting frame : ',i4/
     &          ' Ending frame   : ',i4/
     &          ' Frame increment: ',i4/)
        if ( OPT3D.StepControl ) then
          if ( OPT3D.EraseFrm ) then
            write(6,20)
20          format(' Previous frame erased in 3DS keyboard step mode')
          else
            write(6,30)
30          format(' No frames erased in 3DS keyboard step mode')
          end if
        else
          if ( OPT3D.Continuous ) then
             write(6,50)
 50          format(' 3DS mode will give continuous display')
          else
             write(6,51)
 51          format(' 3DS mode will give single run through display')
          end if
        end if
        if ( OPT3D.WireFrame ) then
          if ( OPT3D.HiddenLine ) then
            write(6,100)
100         format(' Show wireframe with hidden line removal')
          else if ( OPT3D.HideFace ) then
            write(6,110)
110         format(' Show wireframe with hidden face removal')
          else
            write(6,120)
120         format(' Show wireframe')
          end if
        end if
        if ( OPT3D.StickFigure ) write(6,130)
130     format(' Show stick figure')
        if ( OPT3D.SegCentered ) write(6,140) seg_names(OPT3D.CntrSegNum)
140     format(' Display centered on ',a4,' segment')
        if ( OPT3D.JntCentered ) write(6,150) jnt_names(OPT3D.CntrJntNum)
150     format(' Display centered on ',a4,' joint')
        if ( OPT3D.ShowSegCntr ) write(6,160)
160     format(' Display segment center')
        if ( OPT3D.ShowSegLCS ) write(6,170)
170     format(' Display segment local coordinate system')
        if ( OPT3D.ShowGCS ) write(6,180)
180     format(' Display global coordinate system')
        if ( OPT3D.ShowFrcPlt ) write(6,190)
190     format(' Display force plate outline')
        if ( OPT3D.ShowFrmNum ) write(6,195)
195     format(' Display frame number in 3DM')
        if ( OPT3D.USeInitRotCor ) write(6,200)
200     format(' Correct segment orientation')
        if ( OPT3D.Print ) then
          if ( OPT3D.UseMonoDisplay ) then
            write(6,220)
220         format(' Generate monochrome display')
          else
            write(6,210)
210         format(' Generate print file')
          end if
        end if
        if ( OPT3D.Screen ) write(6,225)
225     format(' Display on screen')
        if ( OPT3D.UseManWin ) write(6,235)
235     format(' Use manual window width')
        write(6,230) OPT3D.WindowWidth,(OPT3D.ManVwPnt(i),i=1,3),
     &               (OPT3D.ManVwDir(i),i=1,3),(OPT3D.ManUpVec(i),i=1,3),
     &               (OPT3D.ManVwCntr(i),i=1,3)
230     format(/' Window width       : ',f8.3/
     &          ' Manual viewpoint   : ',3(f8.3,1x)/
     &          ' Manual vw direction: ',3(f8.5,1x)/
     &          ' Manual up direction: ',3(f8.5,1x)/
     &          ' Manual view center : ',3(f8.3,1x)/)
        if ( OPT3D.ShowCP ) write(6,250)
250     format(' Display center of pressure points')
        if ( OPT3D.ShowGRF ) write(6,260)
260     format(' Display ground reaction load force component')
        if ( OPT3D.ShowGRM ) write(6,270)
270     format(' Display ground reaction load moment component')
        write(6,280) OPT3D.ScaleFRC,OPT3D.ScaleMOM
280     format(/' Force scale factor  : ',f8.3/
     &          ' Moment scale factor : ',f8.3/)
      else ! link into ANZ status routines
        call DisplayStatus( CMND,MRK_FLG,SEG_FLG,FRC_FLG,JNT_FLG,AVG_FLG,
     &                      CYC_FLG,EMG_FLG,OPT_FLG )
      end if
      return
      end   
