Most of the standard math operators (=,+,-,*,/,+=,-=,*=,/=,==) are overloaded to work with vectors. The 'vec' member can be used to directly access the float array.
pfVec3 vector; CAVEGetVector(CAVE_WAND_FRONT,vector.vec); vector *= 3.0f; z = vector[2];Class methods are also provided for more advanced vector operations:
Most of the standard math operators (=,+,-,*,/,+=,-=,*=,==) are overloaded to work with matrices. The 'mat' member can be used to directly access the float array.
Methods are also available for creating transformation matrices (translate, rotate, scale), for adding transformations to existing matrices, and for inverting matrices.
pfQuat includes methods for mathematical operations on quaternions, and for interpolating quaternions.
pfMatrix::makeQuat(q) builds a matrix for the rotation defined by the quaternion q.
pfNode::getBound(&sphere) returns the bounding sphere for a node (including its children).
The contains(v) method tests whether a point is inside a bounding volume.
Performer's trigonometric functions provide faster, although less accurate, versions of the standard math library functions:
Last modified 5 February 1996.
Dave Pape, pape@evl.uic.edu