pfDoubleSCS(3pf) OpenGL Performer 3.2.2 libpf C Reference Pages
NAME
pfNewDoubleSCS, pfGetDoubleSCSClassType, pfGetDoubleSCSMat,
pfGetDoubleSCSMatPtr - Create and get matrix for a static coordinate
system node.
FUNCTION SPECIFICATION
#include <Performer/pf.h>
pfDoubleSCS * pfNewDoubleSCS(pfMatrix4d mat);
pfType * pfGetDoubleSCSClassType(void);
void pfGetDoubleSCSMat(pfDoubleSCS *scs, pfMatrix4d mat);
const pfMatrix4d* pfGetDoubleSCSMatPtr(pfDoubleSCS *scs);
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. Casting an object of
class pfDoubleSCS to an object of class pfGroup is taken care of
automatically. This is also true for casts to objects of ancestor
classes of class pfGroup.
int pfAddChild(pfGroup *group, pfNode *child);
int pfInsertChild(pfGroup *group, int index, pfNode *child);
int pfReplaceChild(pfGroup *group, pfNode *old, pfNode *new);
int pfRemoveChild(pfGroup *group, pfNode* child);
int pfSearchChild(pfGroup *group, pfNode* child);
pfNode * pfGetChild(const pfGroup *group, int index);
int pfGetNumChildren(const pfGroup *group);
int pfBufferAddChild(pfGroup *group, pfNode *child);
int pfBufferRemoveChild(pfGroup *group, 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 * pfGetParent(const pfNode *node, int i);
int pfGetNumParents(const pfNode *node);
void pfNodeBSphere(pfNode *node, pfSphere *bsph, int mode);
int pfGetNodeBSphere(pfNode *node, pfSphere *bsph);
pfNode* pfClone(pfNode *node, int mode);
pfNode* pfBufferClone(pfNode *node, int mode, pfBuffer *buf);
int pfFlatten(pfNode *node, int mode);
int pfNodeName(pfNode *node, const char *name);
const char * pfGetNodeName(const pfNode *node);
pfNode* pfFindNode(pfNode *node, const char *pathName,
pfType *type);
Page 1
pfDoubleSCS(3pf) OpenGL Performer 3.2.2 libpf C Reference Pages
pfNode* pfLookupNode(const char *name, pfType* type);
int pfNodeIsectSegs(pfNode *node, pfSegSet *segSet,
pfHit **hits[]);
void pfNodeTravMask(pfNode *node, int which, uint mask,
int setMode, int bitOp);
uint pfGetNodeTravMask(const pfNode *node, int which);
void pfNodeTravFuncs(pfNode* node, int which,
pfNodeTravFuncType pre, pfNodeTravFuncType post);
void pfGetNodeTravFuncs(const pfNode* node, int which,
pfNodeTravFuncType *pre, pfNodeTravFuncType *post);
void pfNodeTravData(pfNode *node, int which, void *data);
void * pfGetNodeTravData(const pfNode *node, int which);
void pfNodeTravMode(pfNode* node, int which, int mode,
int val);
int pfGetNodeTravMode(const pfNode* node, int which,
int mode);
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 pfUserDataSlot(pfObject *obj, int slot, void *data);
void pfUserData(pfObject *obj, void *data);
void* pfGetUserDataSlot(pfObject *obj, int slot);
void* pfGetUserData(pfObject *obj);
int pfGetNumUserData(pfObject *obj);
int pfGetNamedUserDataSlot(const char *name);
const char* pfGetUserDataSlotName(int slot);
int pfGetNumNamedUserDataSlots(void);
int pfDeleteGLHandle(pfObject *obj);
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.
pfType * pfGetType(const void *ptr);
int pfIsOfType(const void *ptr, pfType *type);
int pfIsExactType(const void *ptr, pfType *type);
const char * pfGetTypeName(const void *ptr);
int pfRef(void *ptr);
int pfUnref(void *ptr);
int pfUnrefDelete(void *ptr);
int pfUnrefGetRef(void *ptr);
int pfGetRef(const void *ptr);
int pfCopy(void *dst, void *src);
int pfDelete(void *ptr);
int pfIsFluxed(void *ptr);
int pfCompare(const void *ptr1, const void *ptr2);
Page 2
pfDoubleSCS(3pf) OpenGL Performer 3.2.2 libpf C Reference Pages
void pfPrint(const void *ptr, uint which, uint verbose,
FILE *file);
void * pfGetArena(void *ptr);
PARAMETERS
scs identifies a pfDoubleSCS
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
changeability they make up in performance.
pfNewDoubleSCS creates and returns a handle to a pfDoubleSCS. Like other
pfNodes, pfDoubleSCSes are always allocated from shared memory and can be
deleted using pfDelete.
pfNewDoubleSCS 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 pfNodeBSphere. 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.
pfGetDoubleSCSClassType returns the pfType* for the class pfDoubleSCS.
The pfType* returned by pfGetDoubleSCSClassType is the same as the
pfType* returned by invoking pfGetType 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 pfIsOfType 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. pfFlatten 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 pfFlatten for more details.
pfGetDoubleSCSMat copies the transformation matrix for scs into mat. For
faster matrix access, pfGetDoubleSCSMatPtr returns a const pointer to
scs's matrix.
Page 3
pfDoubleSCS(3pf) OpenGL Performer 3.2.2 libpf C Reference Pages
Both pre and post CULL and DRAW callbacks attached to a pfDoubleSCS (-
pfNodeTravFuncs) 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, pfLookupNode, pfFlatten, pfSCS, pfMatrix4d, pfNode, pfTraverser,
pfDelete
Page 4