pfRep(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages pfRep(3pf)NAMEpfRep - Abstract base class for higher-order geometric representations.
FUNCTION SPECIFICATION
#include <Performer/pf/pfRep.h>
static pfType * pfRep::getClassType(void);
void pfRep::setOrigin(const pfVec3 *origin);
void pfRep::setOrient(const pfMatrix *mat);
void pfRep::getOrigin(pfVec3& origin);
void pfRep::getOrient(pfMatrix& matrix);
PARENT CLASS FUNCTIONS
The OpenGL Performer class pfRep is derived from the parent class
pfGeode, so each of these member functions of class pfGeode are also
directly usable with objects of class pfRep. This is also true for
ancestor classes of class pfGeode.
int pfGeode::addGSet(pfGeoSet* gset);
int pfGeode::removeGSet(pfGeoSet* gset);
int pfGeode::insertGSet(int index, pfGeoSet* gset);
int pfGeode::replaceGSet(pfGeoSet* old, pfGeoSet* new);
pfGeoSet * pfGeode::getGSet(int index);
int pfGeode::getNumGSets(void);
Since the class pfGeode is itself derived from the parent class pfNode,
objects of class pfRep 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);
void pfNode::setTravFuncs(int which, pfNodeTravFuncType pre,
pfNodeTravFuncType post);
Page 1
pfRep(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages pfRep(3pf)
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 pfRep 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 pfRep 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();
DESCRIPTIONpfRep is the base class for higher-order geometric objects, called
representations, that are stored in a OpenGL Performer scene graph.
Representations use geometric descriptions other than triangles and lists
of triangles. For example, a sphere, a plane, and a Non-Uniform Rational
B-Spline (NURB) are all reps. Theoretically there are an infinite number
Page 2
pfRep(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages pfRep(3pf)
of different reps: pfRep is the basic building block to define higher-
order geometric objects in an Performer application.
A rep has an origin and a 3x3 transformation matrix that transforms the
rep about the origin. These define a reference frame for the rep and are
used by derived classes during point evaluations: for example, a change
in origin affects the values of the points on a surface.
The reference frame is considered part of the rep's definition, not a
mechanism to place a rep in a scene (for this purpose use a pfDCS).
Rather, the reference frame is used to generalize primitives. For
example, an ellipsiod can be created from an pfSphereSurface with the
appropriate 3x3 matrix. This class works in conjunction with the
pfTessellateAction class to perform tessellation. The division between
pfTessellateAction and pfRep facilitates the arbitrary mapping of
tessellators to reps. It also minimizes the size of reps when
tessellators are shared among reps.
An pfRep is derived from pfGeode, and thus is always a leaf node in a
scene graph.
A pfRep can contain any number of pfGeoSets. pfGeoSets are added to and
removed from the pfRep using the pfGeode::addGSet and pfGeode::removeGSet
routines used with pfGeodes.
pfRep::getClassType returns the pfType* for the class pfRep. The pfType*
returned by pfRep::getClassType is the same as the pfType* returned by
invoking the virtual function getType on any instance of class pfRep.
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.
pfRep::setOrigin sets the origin to the value of the pfVec3 origin.
pfRep::getOrigin returns the currently set origin.
pfRep::setOrient sets the orientation matrix to the value pf the pfMatrix
mat.
pfRep::getOrient retusn the currently set orientation matrix.
SEE ALSO
pfGeode, pfNode, pfTessellateAction, pfTessParaSurfaceAction
Page 3