pfSCS(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages pfSCS(3pf)NAMEpfSCS - Create and get matrix for a static coordinate system node.
FUNCTION SPECIFICATION
#include <Performer/pf/pfSCS.h>
pfSCS::pfSCS(pfMatrix mat);
static pfType * pfSCS::getClassType(void);
void pfSCS::getMat(pfMatrix &mat);
const pfMatrix* pfSCS::getMatPtr(void);
PARENT CLASS FUNCTIONS
The OpenGL Performer class pfSCS is derived from the parent class
pfGroup, so each of these member functions of class pfGroup are also
directly usable with objects of class pfSCS. This is also true for
ancestor classes of class pfGroup.
int pfGroup::addChild(pfNode *child);
int pfGroup::insertChild(int index, pfNode *child);
int pfGroup::replaceChild(pfNode *old, pfNode *new);
int pfGroup::removeChild(pfNode* child);
int pfGroup::searchChild(pfNode* child);
pfNode * pfGroup::getChild(int index);
int pfGroup::getNumChildren(void);
int pfGroup::bufferAddChild(pfNode *child);
int pfGroup::bufferRemoveChild(pfNode *child);
Since the class pfGroup is itself derived from the parent class pfNode,
objects of class pfSCS can also be used with these functions designed for
objects of class pfNode.
pfGroup * pfNode::getParent(int i);
int pfNode::getNumParents(void);
void pfNode::setBound(pfSphere *bsph, int mode);
int pfNode::getBound(pfSphere *bsph);
pfNode* pfNode::clone(int mode);
pfNode* pfNode::bufferClone(int mode, pfBuffer *buf);
int pfNode::flatten(int mode);
int pfNode::setName(const char *name);
const char * pfNode::getName(void);
pfNode* pfNode::find(const char *pathName, pfType *type);
pfNode* pfNode::lookup(const char *name, pfType* type);
int pfNode::isect(pfSegSet *segSet, pfHit **hits[]);
void pfNode::setTravMask(int which, uint mask, int setMode,
int bitOp);
uint pfNode::getTravMask(int which);
Page 1
pfSCS(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages pfSCS(3pf)
void pfNode::setTravFuncs(int which, pfNodeTravFuncType pre,
pfNodeTravFuncType post);
void pfNode::getTravFuncs(int which, pfNodeTravFuncType *pre,
pfNodeTravFuncType *post);
void pfNode::setTravData(int which, void *data);
void * pfNode::getTravData(int which);
void pfNode::setTravMode(int which, int mode, int val);
int pfNode::getTravMode(int which, int mode) const;
Since the class pfNode is itself derived from the parent class pfObject,
objects of class pfSCS can also be used with these functions designed for
objects of class pfObject.
void* pfObject::operator new(size_t);
void* pfObject::operator new(size_t, pfFluxMemory *fmem);
void pfObject::setUserData(void *data);
void pfObject::setUserData(int slot, void *data);
void* pfObject::getUserData(pfObject *obj);
void* pfObject::getUserData(pfObject *obj, int slot);
int pfObject::getNumUserData();
Since the class pfObject is itself derived from the parent class
pfMemory, objects of class pfSCS can also be used with these functions
designed for objects of class pfMemory.
void* pfMemory::getData(const void *ptr);
pfType * pfMemory::getType();
int pfMemory::isOfType(pfType *type);
int pfMemory::isExactType(pfType *type);
const char * pfMemory::getTypeName();
int pfMemory::copy(pfMemory *src);
int pfMemory::compare(const pfMemory *mem);
void pfMemory::print(uint which, uint verbose, char *prefix,
FILE *file);
int pfMemory::getArena(void *ptr);
void* pfMemory::getArena();
int pfMemory::ref();
int pfMemory::unref();
int pfMemory::unrefDelete();
int pfMemory::unrefGetRef();
int pfMemory::getRef();
int pfMemory::checkDelete();
int pfMemory::isFluxed();
void * pfMemory::getArena();
int pfMemory::getSize();
DESCRIPTION
A pfSCS node represents a static coordinate system -- a modeling
transform that cannot be changed once created. pfSCS nodes are similar
to but less flexible than pfDCS nodes. What they lack in changeability
Page 2
pfSCS(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages pfSCS(3pf)
they make up in performance.
new pfSCS creates and returns a handle to a pfSCS. Like other pfNodes,
pfSCSes are always allocated from shared memory and cannot be created
statically, on the stack or in arrays. pfSCSes should be deleted using
pfDelete rather than the delete operator.
new pfSCS creates a pfSCS using mat as the transformation matrix.
By default a pfSCS uses a dynamic bounding volume so it is automatically
updated when children are added, deleted or changed. This behavior may
be changed using pfNode::setBound. The bound for a pfSCS encompasses all
B(i)*mat, where B(i) is the bound for the child 'i' and mat is the
transformation matrix of the pfSCS.
pfSCS::getClassType returns the pfType* for the class pfSCS. The pfType*
returned by pfSCS::getClassType is the same as the pfType* returned by
invoking the virtual function getType on any instance of class pfSCS.
Because OpenGL Performer allows subclassing of built-in types, when
decisions are made based on the type of an object, it is usually better
to use the member function isOfType to test if an object is of a type
derived from a Performer type rather than to test for strict equality of
the pfType*'s.
The transformation of a pfSCS affects all its children. As the hierarchy
is traversed from top to bottom, each new matrix is pre-multiplied to
create the new transformation. For example, if SCSb is below SCSa in the
scene graph, any geometry G below SCSa is transformed as G*SCSb*SCSa.
Static transformations represented by pfSCSes may be 'flattened' in a
pre-processing step for improved intersection, culling, and drawing
performance. pfNode::flatten accumulates transformations in a scene
graph, applies them to geometry, and sets flattened pfSCSes to the
identity matrix. Flattening is recommended when available memory and
scene graph structure allow it. See pfNode for more details.
pfSCS::getMat copies the transformation matrix for the pfSCS into mat.
For faster matrix access, pfSCS::getMatPtr returns a const pointer to the
pfSCS's matrix.
Both pre and post CULL and DRAW callbacks attached to a pfSCS (-
pfNode::setTravFuncs) will be affected by the transformation represented
by the pfSCS, i.e. - the pfSCS matrix will already have been applied to
the matrix stack before the pre callback is called and will be popped
only after the post callback is called.
SEE ALSO
pfGroup, pfMatrix, pfNode, pfTraverser, pfDelete
Page 3