Loading Objects

pfdLoadObject(filename) (defined in <Performer/pfdu.h> and libpfdu) loads objects in several different standard formats. It returns a pointer to a pfNode, which can be added to a scene graph.

The object format is determined by the extension of the file name.

Supported formats include:

pfFilePath(path) defines a search path for the loaders to use when looking for data files. path is a list of directories similar to the PATH environment variable. e.g.:

	pfe, scale),  for adding transformations to
existing matrices, and for inverting matrices.


Class: pfQuat (subclass of pfVec4)

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.

Bounding volumes

Classes: pfSphere, pfCylinder, pfBox

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.

Fast math

Macro versions of most of the vector and matrix operations are also available.

Performer's trigonometric functions provide faster, although less accurate, versions of the standard math library functions:

Previous page    Next page

Last modified 21 July 1997.

Dave Pape, pape@evl.uic.edu