pfDoubleSCS(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
NAMEpfDoubleSCS - Create and get matrix for a static coordinate system node.
FUNCTION SPECIFICATION
#include <Performer/pf/pfDoubleSCS.h>
pfDoubleSCS::pfDoubleSCS(pfMatrix4d mat);
static pfType * pfDoubleSCS::getClassType(void);
void pfDoubleSCS::getMat(pfMatrix4d &mat);
const pfMatrix4d* pfDoubleSCS::getMatPtr(void);
PARENT CLASS FUNCTIONS
The OpenGL Performer class pfDoubleSCS is derived from the parent class
pfGroup, so each of these member functions of class pfGroup are also
directly usable with objects of class pfDoubleSCS. 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 pfDoubleSCS 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
pfDoubleSCS(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
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 pfDoubleSCS 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 pfDoubleSCS 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 pfDoubleSCS node represents a static coordinate system -- a modeling
transform that cannot be changed once created. pfDoubleSCS nodes are
similar to but less flexible than pfDoubleDCS nodes. What they lack in
Page 2
pfDoubleSCS(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
changeability they make up in performance.
new pfDoubleSCS creates and returns a handle to a pfDoubleSCS. Like
other pfNodes, pfDoubleSCSes are always allocated from shared memory and
cannot be created statically, on the stack or in arrays. pfDoubleSCSes
should be deleted using pfDelete rather than the delete operator.
new pfDoubleSCS creates a pfDoubleSCS using mat as the transformation
matrix.
By default a pfDoubleSCS 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
pfDoubleSCS encompasses all B(i)*mat, where B(i) is the bound for the
child 'i' and mat is the transformation matrix of the pfDoubleSCS.
pfDoubleSCS::getClassType returns the pfType* for the class pfDoubleSCS.
The pfType* returned by pfDoubleSCS::getClassType is the same as the
pfType* returned by invoking the virtual function getType on any instance
of class pfDoubleSCS. 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 pfDoubleSCS 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 DoubleSCSb
is below DoubleSCSa in the scene graph, any geometry G below DoubleSCSa
is transformed as G*DoubleSCSb*DoubleSCSa.
Static transformations represented by pfDoubleSCSes 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 pfDoubleSCSes to the
identity matrix. Flattening is recommended when available memory and
scene graph structure allow it. See pfNode for more details.
pfDoubleSCS::getMat copies the transformation matrix for the pfDoubleSCS
into mat. For faster matrix access, pfDoubleSCS::getMatPtr returns a
const pointer to the pfDoubleSCS's matrix.
Both pre and post CULL and DRAW callbacks attached to a pfDoubleSCS (-
pfNode::setTravFuncs) will be affected by the transformation represented
by the pfDoubleSCS, i.e. - the pfDoubleSCS 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, pfSCS, pfMatrix4d, pfNode, pfTraverser, pfDelete
Page 3