##### Ninja Library - View Function

# njTranslateViewVRelative

Moves the view location along the X, Y, and Z axes (relative move)

### FORMAT

`

  void njTranslateViewVRelative( *v, *p )
  NJS_VIEW *v
  NJS_POINT3 *p

`

### PARAMETER

  `*v` | Pointer to view structure
  `*p` | Amount of movement along the X, Y, and Z axes (relative amount)

### RETURN

  None

### DESCRIPTION

  Moves the view location along the X, Y, and Z axes by relative amount. The view's current location will be the origin of this movement.

### EXAMPLE

      The following moves the view located at (0, 0, 3000) and directed toward (0, 0, -1)
      (into the screen) by 100 in the X direction, 200 in the Y direction, and 300
      in the Z direction, without changing the view direction.

      NJS_VIEW v;
      NJS_POINT3 p;
      #define VIEW_PX 0.f
      #define VIEW_PY 0.f
      #define VIEW_PZ 3000.f
      #define VIEW_VX 0.f
      #define VIEW_VY 0.f
      #define VIEW_VZ -1.f
      #define VIEW_ROLL 0
      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);
      p.x = 100.f;
      p.y = 200.f;
      p.z = 300.f;
      njTranslateViewRelative(&v, &p);
      njSetView( &v );

### NOTE

  When parameter v is NULL, the current view is moved.

### REFERENCE

  `njInitView()
  njSetView()
  `

njTranslateViewVRelative

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999