IBM Visualization Data Explorer Programmer's Reference

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

DXSetOrthographic, DXGetOrthographic

Function

Sets and retrieves an orthographic camera view.

Syntax

#include <dx/dx.h>

Camera DXSetOrthographic(Camera c, double width, double aspect)
Camera DXGetOrthographic(Camera c, double width, double aspect)

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.

DXSetOrthographic defines the volume of interest for an orthographic camera c. This can be thought of as a box that is centered on the to point, with its z axis parallel to the to-from vector, and infinite in length. Its y axis is perpendicular to the to-from vector in the direction of the up vector. Its x axis is perpendicular to its y and z axes. The x and y dimensions of the box are given by the width and aspect parameters of the camera respectively, where aspect is defined as the ration of the height to width.

In orthographic projection, objects do not appear smaller as they get more distant, and in fact, distance between the object and viewer have no effect on the appearance of the object. The distance between the to and from points is irrelevant; only the direction is important.

DXGetOrthographic returns the width and aspect parameters of an orthographic camera c. If width is not NULL, the camera width is returned in *width. If aspect is not NULL, the camera aspect is returned in *aspect.

Return Value

DXSetOrthographic returns the camera or returns NULL and sets an error code.

DXGetOrthographic returns the parameters or returns NULL (if the camera is not orthographic) and sets an error code (if c is not a valid camera).

See Also

DXGetCameraMatrix, DXGetCameraRotation, DXGetCameraMatrixWithFuzz, DXNewCamera, DXRender, DXSetPerspective, DXGetPerspective, DXSetResolution, DXGetCameraResolution, DXSetView, DXGetView

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 | Contact Data Explorer | Same document on Data Explorer Home Page ]


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