##### Ninja Library - View Function

# njForwardViewRelative

Moves the view location along the viewline (Relative move)

### FORMAT

`

  njForwardViewRelative( *v, x)
  NJS_VIEW *v
  Float x

`

### PARAMETER

  `*v` | Pointer to view structure
  `x` | Movement distance (relative value)

### RETURN

  None

### DESCRIPTION

  Moves the view location along the viewline by a relative amount.

### EXAMPLE

      The following moves the view located at (0, 0, 0) and directed
      toward (1, 1, -1) (toward the inside of the upper right of the screen)
      by 10 in the direction of the view.

      #define VIEW_PX 0.f
      #define VIEW_PY 0.f
      #define VIEW_PZ 0.f
      #define VIEW_VX 1.f
      #define VIEW_VY 1.f
      #define VIEW_VZ -1.f
      #define VIEW_ROLL 0
      NJS_VIEW v;
      v.px = VIEW_PX;
      v.py = VIEW_PY;
      v.pz = VIEW_PZ;
      v.vx = VIEW_VX;
      v.vy = VIEW_VY;
      v.vz = VIEW_VZ;
      v.roll = NJM_DEG_ANG(VIEW_ROLL);
      njUnitViewVector( &v );
      njForwardViewRelative(&v, 10.f);
      njSetView( &v );
      njClearMatrix();

### NOTE

  When parameter v is NULL, this function acts on the current view.

### REFERENCE

  `njUnitViewVector()
  njSetView()
  njClearMatrix()
  `

njForwardViewRelative

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999