pfParaSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
NAMEpfParaSurface - A trimmed parametric surface.
FUNCTION SPECIFICATION
#include <Performer/pf/pfParaSurface.h>
static pfType * pfParaSurface::getClassType(void);
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();
int pfParaSurface::getTopoId();
int pfParaSurface::getSolidId();
int pfParaSurface::getSurfaceId();
void pfParaSurface::getHandednessHint(pfBool _clockWise);
pfBool pfParaSurface::getHandednessHint();
Page 1
pfParaSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
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();
PARENT CLASS FUNCTIONS
The OpenGL Performer class pfParaSurface is derived from the parent class
pfGeode, so each of these member functions of class pfGeode are also
directly usable with objects of class pfParaSurface. This is also true
for ancestor classes 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);
Page 2
pfParaSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
Since the class pfGeode is itself derived from the parent class pfGeode,
objects of class pfParaSurface 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 pfParaSurface 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);
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 pfParaSurface 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);
Page 3
pfParaSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
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 pfParaSurface 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 parametric surface is a mapping from 2D UV space (parametric space) to
3D XYZ space (object space) with the domain being a rectangle specified
by [beginU, endU] X [beginV, endV].
A trimmed parametric surface is a parametric surface with some number of
trim loops which redefines the domain by, intuitively speaking, cutting
holes in the domain rectangle. Each trim loop divides the UV plane into
two areas: the one enclosed by this loop and the one outside this loop.
If a trim loop is oriented counter-clock wise, the area enclosed by this
loop is retained (as part of the domain), and the part outside is
discarded. If a trim loop is oriented clock wise, the area enclosed by
this loop is discarded, and the part outside is retained.
It is assumed that any two trim loops do not intersect, and each trim
loop does not intersect itself. If any of these conditions are violated,
the result of the tessellation is not defined.
The following suggestions should help to clarify these conventions. The
outmost trim loop should be counter clockwise. The one immediately
enclosed by this outmost trim loop should be clockwise, etc.
Page 4
pfParaSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
pfParaSurface::getClassType returns the pfType* for the class
pfParaSurface. The pfType* returned by pfParaSurface::getClassType is
the same as the pfType* returned by invoking the virtual function getType
on any instance of class pfParaSurface. 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.
pfParaSurface::addTrimCurve takes an input trim curve as specified by (c,
d), and stick it to the end of the trim loop as indexed by loopNum. It is
an error if the loop is already closed before adding this curve.
pfParaSurface::clearTessellation removes all the data resulted from
previous tessellation. This allows this surface to be retessellated with
a different tolerance. For each trim curve, the disCurve is deleted if
the contCurve is not NULL. The xyzBoundary in its boundary structure (-
pfBoundary) is deleted. Also the tessellated triangles (pfGeoSets) are
removed.
pfParaSurface::eval evaluates the point, all the first and second order
partial derivatives.
pfParaSurface::evalD evaluates the directional derivatives along the
direction which has the angle theta relative to u-axis. The deriatives
are stored in D.
pfParaSurface::evalDD evaluates the second order directional derivatives
along the direction which has the angle theta relative to u-axis. The
deriatives are stored in DD.
pfParaSurface::evalDu evaluates the partial derivatives of the surface
with respect to parameter u at (u,v). The result is stored in Du.
pfParaSurface:evalDuu evaluates the second order partial derivatives of
the surface with respect to parameter u at (u,v). The result is stored
in Duu.
pfParaSurface::evalDuv evaluates the second order mixed derivatives of
the surface at (u,v). The result is stored in Duv.
pfParaSurface::evalDv evaluates the partial derivatives of the surface
with respect to parameter v at (u,v). The result is stored in Dv.
pfParaSurface::evalDvv evaluates the second order partial derivatives of
the surface with respect to parameter v at (u,v). The result is stored
in Dvv.
pfParaSurface::evalNorm evaluates the surface normal at (u, v). The
result is stored in norm.
Page 5
pfParaSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
pfParaSurface::evalPt evaluates the xyz in the object space at (u, v).
The result is stored in pnt.
pfParaSurface::getBeginU returns beginU.
pfParaSurface::getBeginV returns beginV.
pfParaSurface::getEndU returns endU.
pfParaSurface::getEndV returns endV.
pfParaSurface::getHandednessHint returns true if clockwise, false
otherwise.
pfParaSurface::getSolidId returns the solidId.
pfParaSurface::getSurfaceId returns the surfaceId.
pfParaSurface::getTopo returns the topology of the surface.
pfParaSurface::getTopoId returns the topoId.
pfParaSurface::getTrimCurve returns the trim curve indexed by loopNum and
curveNum.
pfParaSurface::getTrimCurveCount returns the number of trim curves of the
loop loopNum.
pfParaSurface::getTrimLoopClosed returns the closedness (PFLOOP_OPEN,
PFLOOP_CLOSED, PFLOOP_PERIODIC, PFLOOP_UNRESOLVED) of the loop.
pfParaSurface::getTrimLoopCount returns the number of trim loops.
pfParaSurface::insertTrimCurve takes an input trim curve as specified by
(c, d), and linearly searches all the trim curves in the loop (specified
by loopNum) to find any existing trim curve whose end point matches one
or both the input curve's end point.
If no matches are found, it is appended to at the end of the loop.
pfParaSurface::setBeginU sets beginU to be u, and updates du.
pfParaSurface::setBeginV sets beginV to be v, and updates dv.
pfParaSurface::setEndU sets endU to be u, and updates du.
pfParaSurface::setEndV sets endV to be v, and updates dv.
pfParaSurface::setHandednessHint set a handedness hint about the surface.
False means counter-clockwise (right-handed).
pfParaSurface::solidId sets solidId.
Page 6
pfParaSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
pfParaSurface::solidId sets surfaceId.
pfParaSurface::solidId sets topoId.
pfParaSurface::setTrimLoopClosed set trimLoopClosed[loopNum] to be
closed.
pfParaSurface::getGState returns a pointer to the geostate used for
tessellation of this surface.
pfParaSurface::setGState sets the pointer for the geostate to be used
during tessellation of this surface. Returns 1 if successful and -1
otherwise.
BUGSSEE ALSO
pfTopo, pfEdge, pfCurve2d, pfDisCurve2d, pfBoundary, pfGeode, pfRep,
pfGeoState, pfGeoSet, pfdTessellateGeometry
Page 7