Webots Reference Manual

previous page go up next page

Thanks

1. Introduction

2. Node Chart

3. Nodes and API Functions

4. Prototypes

5. Physics Plugin

6. Fast2D Plugin

7. MTN Functions

8. Webots World Files

     

3.45 Viewpoint

Viewpoint {
  SFFloat      fieldOfView    0.785398  # (0,pi)
  SFRotation   orientation    0 0 1 0   # [-1,1],(-inf,inf)
  SFVec3f      position       0 0 10    # (-inf,inf)
  SFString     description    ""
  SFFloat      far            50        # [0,inf)
  SFFloat      near           0.05      # [0,inf)
}

The Viewpoint node defines a specific location in the local coordinate system from which the user may view the scene.

The position and orientation fields of the Viewpoint node specify absolute locations in the coordinate system. In the default position and orientation, the viewer is on the Z-axis, looking down the -Z-axis toward the origin with +X to the right and +Y straight up.

Navigating in the 3D view by dragging the mouse pointer dynamically changes the position and the orientation fields of the Viewpoint node.

The fieldOfView field specifies the viewing angle in radians. A small field of view roughly corresponds to a telephoto lens; a large field of view roughly corresponds to a wide-angle lens.

The near and far fields define the distance from the camera to the near and far clipping planes. These planes are parallel to the projection plane for the 3D display in the main window. Along with the fieldOfView field, they define the viewing frustum. Any 3D shape outside this frustum won't be rendered. Hence, shapes too far away (beyond the far plane) won't appear. Similarly, shapes too close (standing before the near plane) won't appear either.

previous page go up next page
^ page top ^

  E-mail to webmaster Last updated: Copyright © 2008 Cyberbotics Ltd.