GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
vpCurrentMatrix(3) FreeBSD Library Functions Manual vpCurrentMatrix(3)

vpCurrentMatrix - choose the current transformation matrix

#include <volpack.h>
vpResult
vpCurrentMatrix(vpc, option)
vpContext *vpc;
int option;

vpc
VolPack context from vpCreateContext.
option
A code specifying one of the VolPack transformation matrices (VP_MODEL, VP_VIEW or VP_PROJECT).

vpCurrentMatrix is used to choose the current transformation matrix. The option parameter must be one of the following:
VP_MODEL modeling transformation
 
VP_VIEW viewing transformation
 
VP_PROJECT projection transformation
Subsequent calls to the matrix transformation functions ( vpIdentityMatrix, vpTranslate, vpRotate, vpScale, vpMultMatrix and vpSetMatrix) are applied to the new current transformation matrix.
Typically the modeling transformation is used to specify a transformation from object coordinates to world coordinates. In object coordinates the volume data is located inside a unit cube centered at the origin (corners at (-0.5, -0.5, -0.5) and (0.5, 0.5, 0.5)). The default modeling transformation is the identity, so the volume is initially located inside the unit cube in world coordinates. By default, the current matrix is VP_MODEL. The modeling transformation is also applied to light direction vectors (see vpSetLight(3)).
The viewing transformation is used for transforming world coordinates into eye coordinates. In eye coordinates the viewer is looking down the Z axis in the negative direction. The default value of the matrix is also the identity, so the viewer is looking down the Z axis in world coordinates as well. Typically this transformation matrix is used to specify the location and direction of the viewer. It is also possible to combine the modeling and viewing matrices (as in the OpenGL viewing model), in which case you can store the composite transformation in either the model or the view matrix set the other matrix to the identity.
The projection transformation specifies the transformation from eye coordinates to clip coordinates. In the clip coordinate system the entire viewing frustum lies inside a cube defined by the planes X=1, X=-1, Y=1, Y=-1, Z=1 and Z=-1. This transformation also specifies the type of projection used to produce a 2D image. The 2D image is computed by projecting along the Z axis in the clip coordinate system and then scaling in the X and Y dimensions to the final image size. The routines vpWindow and vpWindowPHIGS are useful for computing projection transformations.

The current transformation matrix code can be retrieved with the following state variable codes (see vpGeti(3)): VP_CURRENT_MATRIX.

The normal return value is VP_OK. The following error return value is possible:
VPERROR_BAD_OPTION
The option argument is invalid.

VolPack(3), vpCreateContext(3), vpGetMatrix(3)
VolPack

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.