pfHsplineSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
NAMEpfHsplineSurface - A 3D Hermite Surface
FUNCTION SPECIFICATION
#include <Performer/pf/pfHsplineSurface.h>
static pfType * pfHsplineSurface::getClassType(void);
pfHsplineSurface::pfHsplineSurface();
pfHsplineSurface::pfHsplineSurface(pfReal *p,
pfReal *tu, pfReal *tv, pfReal *tuv, pfReal *uu,
pfReal *vv, int uKnotCount, int vKnotCount);
pfVec3& pfHsplineSurface::getP(int i, int j);
pfVec3& pfHsplineSurface::getTu(int i, int j);
pfVec3& pfHsplineSurface::getTv(int i, int j);
pfVec3& pfHsplineSurface::getTuv(int i, int j);
pfReal pfHsplineSurface::getUknot(int i);
pfReal pfHsplineSurface::getVknot(int j);
int pfHsplineSurface::getUknotCount();
int pfHsplineSurface::getVknotCount();
pfBool pfHsplineSurface::setCylindrical();
void pfHsplineSurface::setAll(pfReal *p, pfReal *tu,
pfReal *tv, pfReal *tuv, pfReal *uu, pfReal *vv,
int uKnotCount, int vKnotCount);
void pfHsplineSurface::setCylindrical(pfBool cylindrical);
void pfHsplineSurface::evalPt(pfReal u, pfReal v,
pfVec3& pnt);
PARENT CLASS FUNCTIONS
The OpenGL Performer class pfHsplineSurface is derived from the parent
class pfParaSurface, so each of these member functions of class
pfParaSurface are also directly usable with objects of class
pfHsplineSurface. This is also true for ancestor classes of class
pfParaSurface.
void pfParaSurface::setBeginU(pfReal u);
void pfParaSurface::setEndU(pfReal u);
Page 1
pfHsplineSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
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();
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 pfHsplineSurface 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);
Page 2
pfHsplineSurface(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 pfHsplineSurface 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 pfHsplineSurface 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 pfHsplineSurface 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
pfHsplineSurface(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 pfHsplineSurface 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();
DESCRIPTIONpfHsplineSurface defines an Hermite surface, parameterized by u and v. A
Hermite surface is defined by u-knot values uu, v-knot values vv, two
dimensional array of points p, tangents in u tu , tangents in v tv, and
cross derivatives tuv at these cross knot points.
The domain of the Hermite surface is a rectangle [beginU, endU], X [-
beginV, endV]. The domain limits are interited members from its
superclass pfParaSurface. By default, beginU is the first u knot value
and endU is the last knot value, and similarly for beginV and endV.
pfHsplineSurface keeps a flag named cylindrical which, when set to true,
indicates that the coordinates are cylindrical in which case evalPt
converts each point into cartesian coordinates: assuming the cylindrical
coordinates are (c0,c1,c2), then the cartesian coordinates (x0, x1, x2)
are
x0 = c1 * cos(c0);
x1 = c1 * sin(c0);
x2 = c2;
pfHsplineSurface::getClassType returns the pfType* for the class
pfHsplineSurface. The pfType* returned by pfHsplineSurface::getClassType
Page 4
pfHsplineSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
is the same as the pfType* returned by invoking the virtual function
getType on any instance of class pfHsplineSurface. 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.
pfHsplineSurface::pfHsplineSurface creates an instance of
pfHsplineSurface. No valid data is set.
pfNewHsplineSurface(pfReal *p,pfReal *tu,pfReal *tv,pfReal *tuv,pfReal
*uu,pfReal *vv,int uKnotCount,int vKnotCount) creates an instance of
pfHsplineSurface. p, tu, tv, tuv, uu, and vv are copied from p, tu, tv,
tuv, uu, and vv, respectively. uKnotCount is the length of uu, and
vKnotCount is the length of vv. The correspondence between p and p is the
following: p[i*vKnotCount + j] is copied to p[i][j] for i=0,...,
uKnotCount-1, and j=0, ..., vKnotCount-1.
pfHsplineSurface::getP returns the points of the surface at the cross
knot points (uu[i], vv[j]).
pfHsplineSurface::getTu returns the tangents in the u direction of the
surface at the cross knot points (uu[i], vv[j]).
pfHsplineSurface::getTv returns the tangents in the v direction of the
surface at the cross knot points (uu[i], vv[j]).
pfHsplineSurface::getTuv returns the cross derivatives of the surface at
the cross knot points (uu[i], vv[j]).
pfHsplineSurface::getUknot returns the u knot value uu[i].
pfHsplineSurface::getVknot returns the v knot value vv[j].
pfHsplineSurface::getUknotCount returns the number of u knot values.
pfHsplineSurface::getVknotCount returns the number of v knot values.
pfHsplineSurface::getCylindrical returns TRUE if the points and
derivatives are in cylindrical coordinates, FALSE otherwise.
pfHsplineSurface::setAll p, tu, tv, tuv, uu, and vv are copied from p,
tu, tv, tuv, uu, and vv, respectively. uKnotCount is the length of uu,
and vKnotCount is the length of vv. The correspondence between p and p is
the following: p[i*vKnotCount + j] is copied to p[i][j] for i=0,...,
uKnotCount-1, and j=0, ..., vKnotCount-1.
pfHsplineSurface::setCylindrical sets a flag then, when enabled, means
that the points and derivatives are in cylindrical coordinates.
pfHsplineSurface::evalPt evaluates the surface at (u, v). The evaluated
Page 5
pfHsplineSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
point is stored in pnt.
SEE ALSO
pfRep, pfGeode, pfParaSurface
Page 6