pfNurbSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
NAMEpfNurbSurface - NURB surface
FUNCTION SPECIFICATION
#include <Performer/pf/pfNurbSurface.h>
static pfType * pfNurbSurface::getClassType(void);
pfNurbSurface::pfNurbSurfaceSurface();
void pfNurbSurface::setControlHull(int iu, int iv,
const pfVec3& p);
void pfNurbSurface::setControlHull(int iu, int iv,
const pfVec4& p);
void pfNurbSurface::setWeight(int iu, int iv, pfReal w);
void pfNurbSurface::setUknot(int iu, pfReal u);
void pfNurbSurface::setVknot(int iv, pfReal v);
void pfNurbSurface::setControlHullUSize(int s);
void pfNurbSurface::setControlHullVSize(int s);
const pfVec3* pfNurbSurface::getControlHull(int iu, int iv);
int pfNurbSurface::getControlHullUSize();
int pfNurbSurface::getControlHullVSize();
pfReal pfNurbSurface::getWeight(int iu, int iv);
pfReal& pfNurbSurface::getUknot(int iu);
pfReal& pfNurbSurface::getVknot(int iv);
int pfNurbSurface::getUknotCount();
int pfNurbSurface::getVknotCount();
int pfNurbSurface::getUorder();
int pfNurbSurface::getVorder();
void pfNurbSurface::removeControlHullElm(int iu, int iv);
void pfNurbSurface::removeUknot(int iu);
Page 1
pfNurbSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
void pfNurbSurface::removeVknot(int iv);
void pfNurbSurface::flipUV();
virtual void pfNurbSurface::evalPt(pfReal u, pfReal v, pfVec3 &pnt);
virtual void pfNurbSurface::evalDu(pfReal u, pfReal v, pfVec3 &Du);
virtual void pfNurbSurface::evalDv(pfReal u, pfReal v, pfVec3 &Du);
virtual void pfNurbSurface::evalNorm(pfReal u, pfReal v,
pfVec3 &norm);
PARENT CLASS FUNCTIONS
The OpenGL Performer class pfNurbSurfaceSurface is derived from the
parent class pfParaSurface, so each of these member functions of class
pfParaSurface are also directly usable with objects of class
pfNurbSurfaceSurface. 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();
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);
Page 2
pfNurbSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
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 pfNurbSurfaceSurface 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 pfNurbSurfaceSurface 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 pfNurbSurfaceSurface 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);
Page 3
pfNurbSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
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 pfNurbSurfaceSurface 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 pfNurbSurfaceSurface 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();
Page 4
pfNurbSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
int pfMemory::getSize();
DESCRIPTION
Defines a Non-Uniform Rational BSpline surface. The control hull points
of a Nurb surface are arranged in a 2-dimensional array. To figure out
the ordering of these control points, notice that the point evaluation
formula can be expressed as
P(u,v) = sum_{iu,iv} B_iu(u)B_iv(v) C[iu][iv] / sum_{iu,iv} B_iu(u)B_iv(v) W[iu][iv]
where B_iu(u) are basis functions u along the u-axis, and B_iv(v) are
basis functions along v-axis, C is the control hull, and W is the
weights.
Both the control hull and the weight are two-dimensional arrays: The
number of control points along u-axis is equal to number_of_u_knots -
uorder, and the number of control points along v-axis is equal to
number_of_v_knots - vorder.
pfNurbSurfaceSurface::getClassType returns the pfType* for the class
pfNurbSurfaceSurface. The pfType* returned by
pfNurbSurfaceSurface::getClassType is the same as the pfType* returned by
invoking the virtual function getType on any instance of class
pfNurbSurfaceSurface. 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.
pfNurbSurfaceSurface::pfNurbSurfaceSurface creates an instance of
pfNurbSurfaceSurface but sets no valid data.
pfNurbSurface::setControlHull(int iu,int iv,const pfVec3& pt) Sets the
(iu,iv)'th point of the control hull to be p. This control point
corresponds to basis pair B_iu(u) and B_iv(v). The weight is set to 1.0
if it has't been set yet.
pfNurbSurface::setControlHull(int iu,int iv,const pfVec4& p) Sets the
(iu,iv)'th point of the control hull to p[0..2], and the weight to p[3].
This control point and weight correspond to basis pair B_iu(u) and
B_iv(v).
pfNurbSurface::setWeight Sets the (iu,iv)'th weight to be w. This weight
corresponds to basis pair B_iu(u) and B_iv(v).
pfNurbSurface::setUknot Sets the iu'th u-knot value to be u.
pfNurbSurface::setVknot Sets the iv'th vknot value to be v.
Page 5
pfNurbSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
pfNurbSurface::setControlHullUSize A hint on the number of control points
along the u-direction. It is used only as a hint for dynamically
allocating space for the arrays control hull and the weight. The
correctness of this number is not critical.
pfNurbSurface::setControlHullVSize A hint on the number of control points
along the v-direction. It is used only as a hint for dynamically
allocating space for the arrays control hull and the weight. The
correctness of this number is not critical.
pfNurbSurface::getControlHull Returns the (iu,iv)'th control point that
corresponds to basis B_iu(u) and B_iv(v).
pfNurbSurface::getControlHullUSize Returns the number of control points
along each u direction (v=constant).
pfNurbSurface::getControlHullVSize Returns the number of control points
along each v direction (u=constant).
pfNurbSurface::getWeight Returns the (iu,iv)'th weight value which
corresponds to basis B_iu(u) and B_iv(v).
pfNurbSurface::getUknot Returns the iu'th u-knot value.
pfNurbSurface::getVknot Returns the iv'th v-knot value.
pfNurbSurface::getUknotCount Returns the number of u-knot values.
pfNurbSurface::getVknotCount Returns the number of v-knot values.
::pfNurbSurface::getUorder Returns the order of basis functions along u-
direction.
::pfNurbSurface::getVorder Returns the order of basis functions along v-
direction.
pfNurbSurface::removeControlHullElm Removes the control hull element (iu,
iv), and the weight (iu, iv). If iu is the last u-element of the iv row
then the iv row is removed. Weights are treated similarly. The length
of the control hull and the weights are changed accordingly, but the
space allocated for control hull and weights is not modified.
pfNurbSurface::removeUknot Removes the iu_th u-knot. The u-knot length
decreases by one, but the total space allocated for u-knots remains the
same.
pfNurbSurface::removeVknot Removes the iv_th v-knot. The v-knot length
decreases by one, but the total space allocated for v-knots remains the
Page 6
pfNurbSurface(3pf) OpenGL Performer 3.2.2 libpf C++ Reference Pages
same.
LcpfFlipUVNurbSurfacepfNurbSurface::flipUV Transposes the U and V
coordinate system, control points and trim curves appropriately.
pfNurbSurface::evalPt Evaluates the point in object space at (u,v). The
result is stored in pnt.
pfNurbSurface::evalDu Evaluates the partial derivatives of the surface
with respect to parameter u at (u,v). The result is stored in Du.
pfNurbSurface::evalDv Evaluates the partial derivatives of the surface
with respect to parameter v at (u,v). The result is stored in Dv.
pfNurbSurface::evalNorm Evaluates the surface normal at (u, v). The
normal is stored in norm.
SEE ALSO
pfRep, pfGeode, pfParaSurface
Page 7