pfDisCurve2d man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



pfDisCurve2d(3pf)	      OpenGL Performer 3.2.2 libpf C++ Reference Pages

NAME
     pfDisCurve2d - Base class for all discrete 2D parametric curves.

FUNCTION SPECIFICATION
     #include <Performer/pf/pfDisCurve2d.h>

     static pfType*   pfDisCurve2d::getClassType(void);

		      pfDisCurve2d::pfDisCurve2d();

		      pfDisCurve2d::pfDisCurve2d(int nPoints, pfReal *points);

     pfVec2	      pfDisCurve2d::getBeginPt();

     pfVec2	      pfDisCurve2d::getEndPt();

     void	      pfDisCurve2d::setClosed(int loopVal);

     int	      pfDisCurve2d::getClosed();

     void	      pfDisCurve2d::setPoint(int i, const pfVec2& pnt);

     void	      pfDisCurve2d::getPoint(int i, pfVec2& pnt);

     void	      pfDisCurve2d::getPointCount();

     pfVec2	      pfDisCurve2d::getTangent(int i);

     pfVec2	      pfDisCurve2d::getNormal(int i);

     pfVec2	      pfDisCurve2d::getCurvature(int i);

     void	      pfDisCurve2d::computeTangents();

     void	      pfDisCurve2d::computeNormals();

     void	      pfDisCurve2d::computeCurvatures();

     void	      pfDisCurve2d::computeDerivatives();

PARENT CLASS FUNCTIONS
     The OpenGL Performer class pfDisCurve2d is derived from the parent class
     pfRep, so each of these member functions of class pfRep are also directly
     usable with objects of class pfDisCurve2d.	 This is also true for
     ancestor classes of class pfRep.

     void   pfRep::setOrigin(const pfVec3 *origin);
     void   pfRep::setOrient(const pfMatrix *mat);
     void   pfRep::getOrigin(pfVec3& origin);
     void   pfRep::getOrient(pfMatrix& matrix);

									Page 1

pfDisCurve2d(3pf)	      OpenGL Performer 3.2.2 libpf C++ Reference Pages

     Since the class pfRep is itself derived from the parent class pfGeode,
     objects of class pfDisCurve2d 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 pfDisCurve2d 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 pfDisCurve2d 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 2

pfDisCurve2d(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 pfDisCurve2d 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 discrete 2D curve is an array of 2D points.  The tangent at each point
     is defined as the first order derivative of the curve with respect to arc
     length, and is approximated by a finite central difference (forward or
     backward difference is used for the first and the last point):

     0.5 * ((p[i+1]-p[i])/||p[i+1]-p[i]|| + (p[i]-p[i-1])/||p[i]-p[i-1]|| )

     where ||p[i]-p[i-1]|| is the Euclidean distance.  Notice that the tangent
     is not normalized.
     The principal normal at each point is defined as the second order
     derivative of the curve with respect to the arc length, and is also
     approximated by finite central difference over tangents. Notice that the
     normals are not normalized.

     The curvature at each point is defined as the length of the principal
     normal.

     Each discrete 2D curve keeps a flag that indicates whether the curve is
     closed or not.  If the curve is closed, then it is thought of as having a
     line that connects the last point to the first point. This affects the
     derivative (tangent, normal, etc) computations at the first and last
     point.

									Page 3

pfDisCurve2d(3pf)	      OpenGL Performer 3.2.2 libpf C++ Reference Pages

     pfDisCurve2d::getClassType returns the pfType* for the class
     pfDisCurve2d.  The pfType* returned by pfDisCurve2d::getClassType is the
     same as the pfType* returned by invoking the virtual function getType on
     any instance of class pfDisCurve2d.  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.

     pfDisCurve2d::pfDisCurve2d() creates an instance of an pfDisCurve2d. By
     default the parametric domain is defined as [0..1].

     pfDisCurve2d::pfDisCurve2d(int nPoints,pfReal *points) creates an
     instance of a pfDisCurve2d while copying the coordinates from points. The
     coordinates of the point i should be stored in points[2*i] and
     points[2*i+1].

     pfDisCurve2d::getBeginPt returns the first point.	pfDisCurve2d::getEndPt
     returns the last point.

     pfDisCurve2d::setClosed sets the flag that indicates whether this curve
     is closed or not.

     pfDisCurve2d::getClosed returns a flag indicating whether this curve is
     closed or not.

     pfDisCurve2d::set the coordinates of the points points. The coordinates
     of the point i should be stored in points[2*i] and points[2*i+1].

     pfDisCurve2d::getPointCount returns the number of points.

     pfDisCurve2d::setPoint sets the i'th point.

     pfDisCurve2d::getPoint returns the i'th point

     pfDisCurve2d::getCurvature returns the ith curvature.

     pfDisCurve2d::computeNormals computes all the normals. The results can be
     accessed using ::getNormal. The user needs to call ::computeTangents
     before calling this function.

     pfDisCurve2d::computeCurvatures computes all the curvatures. The results
     can be accessed using ::getCurvature. The user needs to call
     ::computeCurvatures before calling this function.

     pfDisCurve2d::computeDerivatives computes all the tangents, normals and
     curvatures. The results can be accessed using ::getTangent, ::getNormal
     and ::getCurvature.

     pfDisCurve2d::getTangent returns the i'th tangent.
     pfDisCurve2d::getNormal returns the i'th normal.

									Page 4

pfDisCurve2d(3pf)	      OpenGL Performer 3.2.2 libpf C++ Reference Pages

     pfDisCurve2d::getCurvature returns the i'th curvature.

SEE ALSO
     pfRep, pfGeode

									Page 5

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net