This is one of the two cameras properties Nodes. The PerspectiveCamera node produces a perspective projection from a given viewpoint. This node is similar in context to the SoPerspectiveCamera available in Open Inventor.
FILE FORMAT/DEFAULTS
PerspectiveCamera {
position 0 0 1 # SFVec3f
orientation 0 0 1 0 # SFRotation
focalDistance 5 # SFFloat
heightAngle 0.785398 # SFFloat
}
The default values for this node places the camera at (0,0,1). As with the OrthographicCamera node, this node looks back along the negative z-axis in this default but altering the values of the position and orientation fields can be used to change this view.
The viewing volume for a the PerspectiveCamera node is a truncated right pyramid. The heightAngle field defines the total vertical angle of the viewing volume. At the same time, the widthAngle of the viewing volume is determined by multiplying the heightAngle by the aspect ratio.
As with the OrthographicCamera node, you can use this node to define the initial location from where a viewer will enter the VRML world. A VRML browser, again however, usually modifies the camera allowing you to move through the virtual world.
Remember that both camera nodes will be affected by the current transformation. This means that you can position a camera by placing a transformation node in front of it in the scene graph.
Example Use
The following code fragment is from Castle.wrl.
DEF Courtyard PerspectiveCamera {position 20 5 -10orientation 0 1 0 -4}