pfCylinderSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
NAMEpfCylinderSurface - A parametric cylinder
FUNCTION SPECIFICATION
#include <Performer/pf/pfCylinderSurface.h>
static pfType * pfCylinderSurface::getClassType(void);
pfCylinderSurface::pfCylinderSurface();
pfCylinderSurface::pfCylinderSurface(pfReal radius,
pfReal height);
void pfCylinderSurface::setRadius(pfReal radiusVal);
pfReal pfCylinderSurface::getRadius();
void pfCylinderSurface::setHeight(pfReal height);
pfReal pfCylinderSurface::setHeight();
void pfCylinderSurface::evalPt(pfReal u, pfReal v,
pfVec3& pnt);
void pfCylinderSurface::evalNorm(pfReal u, pfReal v,
pfVec3& norm);
PARENT CLASS FUNCTIONS
The OpenGL Performer class pfCylinderSurface is derived from the parent
class pfParaSurface, so each of these member functions of class
pfParaSurface are also directly usable with objects of class
pfCylinderSurface. This is also true for ancestor classes of class
pfParaSurface.
void pfParaSurface::setBeginU(pfReal u);
void pfParaSurface::setEndU(pfReal u);
void pfParaSurface::setBeginV(pfReal v);
void pfParaSurface::setEndV(pfReal v);
void pfParaSurface::setSolidId(int solidId);
void pfParaSurface::setTopoId(int topoId);
void pfParaSurface::setSurfaceId(int surfaceId);
pfReal pfParaSurface::getBeginU(pfParaSurface* surf);
pfReal pfParaSurface::getEndU(pfParaSurface* surf);
pfReal pfParaSurface::getBeginV(pfParaSurface* surf);
pfReal pfParaSurface::getEndV(pfParaSurface* surf);
int pfParaSurface::getTrimLoopCount(pfParaSurface* surf);
pfLoop pfParaSurface::getTrimLoopClosed(int loopNum);
int pfParaSurface::getTrimCurveCount(int loopNum);
pfEdge* pfParaSurface::getTrimCurve(int loopNum, int curveNum);
pfTopo* pfParaSurface::getTopo();
Page 1
pfCylinderSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
int pfParaSurface::getTopoId();
int pfParaSurface::getSolidId();
int pfParaSurface::getSurfaceId();
void pfParaSurface::getHandednessHint(pfBool _clockWise);
pfBool pfParaSurface::getHandednessHint();
void pfParaSurface::insertTrimCurve(int loopNum, pfCurve2d *c,
pfDisCurve2d *d);
void pfParaSurface::addTrimCurve(int loopNum, pfCurve2d *c,
pfDisCurve2d *d);
void pfParaSurface::setTrimLoopClosed(int loopNum,
pfLoop closed);
void pfParaSurface::evalPt(pfReal u, pfReal v, pfVec3& pnt);
void pfParaSurface::evalDu(pfReal u, pfReal v, pfVec3& Du);
void pfParaSurface::evalDv(pfReal u, pfReal v, pfVec3& Dv);
void pfParaSurface::evalDuu(pfReal u, pfReal v, pfVec3& Duu);
void pfParaSurface::evalDvv(pfReal u, pfReal v, pfVec3& Dvv);
void pfParaSurface::evalDuv(pfReal u, pfReal v, pfVec3& Duv);
void pfParaSurface::evalNorm(pfReal u, pfReal v, pfVec3& norm);
void pfParaSurface::evalD(pfReal u, pfReal v, pfReal theta,
pfVec3& D);
void pfParaSurface::evalDD(pfReal u, pfReal v, pfReal theta,
pfVec3& DD);
int pfParaSurface::setGState(pfGeoState *gState);
pfGeoState* pfParaSurface::getGState();
void pfParaSurface::clearTessellation();
Since the class pfParaSurface is itself derived from the parent class
pfGeode, objects of class pfCylinderSurface can also be used with these
functions designed for objects of class pfGeode.
void pfRep::setOrigin(const pfVec3 *origin);
void pfRep::setOrient(const pfMatrix *mat);
void pfRep::getOrigin(pfVec3& origin);
void pfRep::getOrient(pfMatrix& matrix);
Since the class pfGeode is itself derived from the parent class pfGeode,
objects of class pfCylinderSurface can also be used with these functions
designed for objects 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 pfCylinderSurface can also be used with these functions
designed for objects of class pfNode.
Page 2
pfCylinderSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
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);
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 pfCylinderSurface 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 pfCylinderSurface 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);
Page 3
pfCylinderSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
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 cylinder is a parametric surface defined by taking a circle in the x/y
plane and sweeping it a fixed distance along the z-axis in the positive
and negative directions. The radius of the circle defines the radius of
the cylinder. The sweeping distance is referred to as the half height of
the cylinder. Since the cylinder is centered at the origin, the total
height twice the sweeping distance.
The surface is defined as:
x(u,v) = radius * cos(u)
y(u,v) = radius * sin(u)
z(u,v) = v
The u parameter is mapped radially about the cylinder and has a domain of
0 to 2*PI. The v parameter is mapped to the height (from -height/2 to
height/2). To obtain an arbitrarily oriented cylinder, use the pfRep
orientation matrix.
pfCylinderSurface::getClassType returns the pfType* for the class
pfCylinderSurface. The pfType* returned by
pfCylinderSurface::getClassType is the same as the pfType* returned by
invoking the virtual function getType on any instance of class
pfCylinderSurface. 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.
pfCylinderSurface::pfCylinderSurface creates an instance of
pfCylinderSurface with radius set to radius and a length specified by
height. The default value for the height is 2 and 1 for the radius.
pfCylinderSurface::setRadius sets the cylinder's radius.
pfCylinderSurface::setHeight sets the cylinder's length.
pfCylinderSurface::getRadius returns the cylinder's radius.
pfCylinderSurface::getHeight returns the cylinder's height.
Page 4
pfCylinderSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
pfCylinderSurface::evalPt evaluates the surface value of the cylinder at
parametric values u and v and stores the result in pnt. The value of u is
assumed to be in radians with a domain of 0 to 2*PI. Values outside of
this domain may produce undefined results.
pfCylinderSurface::evalNorm evaluates the normal of the cylinder at
parametric values u and v stores the result in norm. The value of u is
assumed to be assumed to be in radians with a domain of 0 to 2*PI. Values
outside this domain may produce undefined results.
The normal is defined as the right hand rule cross product of
<du/dx,du/dy,du/dz> and <dv/dx,dv/dy,dv/dz>.
SEE ALSO
pfRep, pfGeode, pfParaSurface
Page 5