CAViewer::SetCameraPosition

CAViewer class

Sets the camera position.

BOOL SetCameraPosition(
  float xpos,
  float ypos,
  float zpos
  );

Parameters

xpos
The X position.

ypos
The Y position.

zpos
The Z position.

Return Value

Returns TRUE if the operation was successful; otherwise, FALSE.

Remarks

This function can be used to adjust the virtual camera position for 3D graphs (that is, Height Plot and Vector Graphs with 3 or 4 components). The graph is defined as existing within a volume defined by (0, 0, 0) and (1, 1, 1).

For example, if the camera position is set to (0.5, 0.5, 2.0), and the center of interest (the position which the camera is pointed toward is (0.5, 0.5, 0.0), the viewpoint will appear to be directly over the graph.

See Also

CAViewer::GetCameraPosition, CAViewer::SetCameraCoi