IBM Visualization Data Explorer Programmer's Reference

[ Bottom of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]

DXSetView, DXGetView

Function

Specify Camera position and orientation.

Syntax

#include <dx/dx.h>


Camera DXSetView(Camera c, Point from, Point to, Vector up)
Camera DXGetView(Camera c, Point *from, Point *to, Vector *up)

Functional Details

A camera defines the position and orientation of the viewer, the volume of interest of the object being viewed, and the size of the image to contain the resulting view.

The position and orientation of the view are defined by where the viewer is standing, the from position, where the viewer is looking, the to position, and the tilt of the viewer's head, the up vector.

The image is always in a plane perpendicular to the from-to vector. The up vector is projected onto this plane and the Object and camera (the up vector) are rotated around the from-to vector until up is aligned with the image y axis. It is not necessary that the from-to vector and the up vector be perpendicular; if they are coincident, up becomes undefined and the top of the object, relative to the image, becomes undefined.

DXSetView sets the parameters from, to, and up for camera c.

DXGetView, for camera c, if from is not NULL, returns in from the from position. If to is not NULL, it returns in to the to position. If up is not NULL, it returns in up the up vector.

Return Value

DXSetView returns NULL and sets an error code.

DXGetView returns the camera parameters or returns NULL and sets an error code.

See Also

DXGetCameraMatrix, DXGetCameraRotation, DXGetCameraMatrixWithFuzz, DXNewCamera, DXRender, DXSetOrthographic, DXGetOrthographic, DXSetPerspective, DXGetPerspective, DXSetResolution, DXGetCameraResolution

16.7 , "Camera Class".


[ Top of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]
[Data Explorer Documentation | QuickStart Guide | User's Guide | User's Reference | Programmer's Reference | Installation and Configuration Guide ]

[Data Explorer Home Page]


[IBM Home Page | Order | Search | Contact IBM | Legal ]