pfLine2d(3pf) OpenGL Performer 3.2.2 libpf C Reference Pages pfLine2d(3pf)NAME
pfGetLine2dClassType, pfNewLine2d, pfLine2dPoint1, pfLine2dPoint2,
pfGetLine2dPoint1, pfGetLine2dPoint2, pfLine2dEvalPt - A two-dimensional
parametric line
FUNCTION SPECIFICATION
#include <Performer/pf.h>
pfType * pfGetLine2dClassType(void);
pfLine2d * pfNewLine2d(void *arena);
void pfLine2dPoint1(pfLine2d *l, pfReal x1, pfReal y1,
pfReal t1);
void pfLine2dPoint2(pfLine2d *l, pfReal x2, pfReal y2,
pfReal t2);
void pfGetLine2dPoint1(pfLine2d *l, pfReal *x1, pfReal *y1,
pfReal *t1);
void pfGetLine2dPoint2(pfLine2d *l, pfReal *x2, pfReal *y2,
pfReal *t2);
void pfLine2dEvalPt(pfLine2d *curve, pfReal t, pfVec2 &pt);
PARENT CLASS FUNCTIONS
The OpenGL Performer class pfLine2d is derived from the parent class
pfCurve2d, so each of these member functions of class pfCurve2d are also
directly usable with objects of class pfLine2d. Casting an object of
class pfLine2d to an object of class pfCurve2d is taken care of
automatically. This is also true for casts to objects of ancestor
classes of class pfCurve2d.
void pfCurve2dBeginT(pfCurve2d *curve, pfReal t);
void pfCurve2dEndT(pfCurve2d *curve, pfReal t);
pfReal pfGetCurve2dBeginT(pfCurve2d *curve);
pfReal pfGetCurve2dEndT(pfCurve2d *curve);
void pfCurve2dSetClosed(pfCurve2d *curve, pfLoop loopVal);
pfLoop pfGetCurve2dClosed(pfCurve2d *curve);
void pfCurve2dClosedTol(pfCurve2d *curve, pfReal tol);
pfReal pfGetCurve2dClosedTol(pfCurve2d *curve);
void pfCurve2dEvalPt(pfCurve2d *curve, pfReal t, pfVec2 &pt);
void pfCurve2dEvalTan(pfCurve2d *curve, pfReal t, pfVec2 &pt);
void pfCurve2dEvalNorm(pfCurve2d *curve, pfReal t, pfVec2 &pt);
void pfCurve2dEvalCurv(pfCurve2d *curve, pfReal *curv);
void pfCurve2dEvalAll(pfCurve2d *curve, pfReal t, pfVec2 &pt,
pfVec2 &tan, pfReal *curv, pfVec2 norm);
Page 1
pfLine2d(3pf) OpenGL Performer 3.2.2 libpf C Reference Pages pfLine2d(3pf)
Since the class pfCurve2d is itself derived from the parent class pfRep,
objects of class pfLine2d can also be used with these functions designed
for objects of class pfRep.
void pfRepOrigin(pfRep *rep, const pfVec3 origin);
void pfRepOrient(pfRep *rep, const pfMatrix mat);
void pfGetRepOrigin(pfRep *rep, pfVec3* origin);
void pfGetRepOrient(pfRep *rep, pfMatrix *mat);
Since the class pfRep is itself derived from the parent class pfGeode,
objects of class pfLine2d can also be used with these functions designed
for objects of class pfGeode.
int pfAddGSet(pfGeode* geode, pfGeoSet* gset);
int pfRemoveGSet(pfGeode* geode, pfGeoSet* gset);
int pfInsertGSet(pfGeode* geode, int index, pfGeoSet* gset);
int pfReplaceGSet(pfGeode* geode, pfGeoSet* old, pfGeoSet* new);
pfGeoSet * pfGetGSet(const pfGeode* geode, int index);
int pfGetNumGSets(const pfGeode* geode);
Since the class pfGeode is itself derived from the parent class pfNode,
objects of class pfLine2d can also be used with these functions designed
for objects of class pfNode.
pfGroup * pfGetParent(const pfNode *node, int i);
int pfGetNumParents(const pfNode *node);
void pfNodeBSphere(pfNode *node, pfSphere *bsph, int mode);
int pfGetNodeBSphere(pfNode *node, pfSphere *bsph);
pfNode* pfClone(pfNode *node, int mode);
pfNode* pfBufferClone(pfNode *node, int mode, pfBuffer *buf);
int pfFlatten(pfNode *node, int mode);
int pfNodeName(pfNode *node, const char *name);
const char * pfGetNodeName(const pfNode *node);
pfNode* pfFindNode(pfNode *node, const char *pathName,
pfType *type);
pfNode* pfLookupNode(const char *name, pfType* type);
int pfNodeIsectSegs(pfNode *node, pfSegSet *segSet,
pfHit **hits[]);
void pfNodeTravMask(pfNode *node, int which, uint mask,
int setMode, int bitOp);
uint pfGetNodeTravMask(const pfNode *node, int which);
void pfNodeTravFuncs(pfNode* node, int which,
pfNodeTravFuncType pre, pfNodeTravFuncType post);
void pfGetNodeTravFuncs(const pfNode* node, int which,
pfNodeTravFuncType *pre, pfNodeTravFuncType *post);
void pfNodeTravData(pfNode *node, int which, void *data);
void * pfGetNodeTravData(const pfNode *node, int which);
void pfNodeTravMode(pfNode* node, int which, int mode,
int val);
Page 2
pfLine2d(3pf) OpenGL Performer 3.2.2 libpf C Reference Pages pfLine2d(3pf)
int pfGetNodeTravMode(const pfNode* node, int which,
int mode);
Since the class pfNode is itself derived from the parent class pfObject,
objects of class pfLine2d can also be used with these functions designed
for objects of class pfObject.
void pfUserDataSlot(pfObject *obj, int slot, void *data);
void pfUserData(pfObject *obj, void *data);
void* pfGetUserDataSlot(pfObject *obj, int slot);
void* pfGetUserData(pfObject *obj);
int pfGetNumUserData(pfObject *obj);
int pfGetNamedUserDataSlot(const char *name);
const char* pfGetUserDataSlotName(int slot);
int pfGetNumNamedUserDataSlots(void);
int pfDeleteGLHandle(pfObject *obj);
Since the class pfObject is itself derived from the parent class
pfMemory, objects of class pfLine2d can also be used with these functions
designed for objects of class pfMemory.
pfType * pfGetType(const void *ptr);
int pfIsOfType(const void *ptr, pfType *type);
int pfIsExactType(const void *ptr, pfType *type);
const char * pfGetTypeName(const void *ptr);
int pfRef(void *ptr);
int pfUnref(void *ptr);
int pfUnrefDelete(void *ptr);
int pfUnrefGetRef(void *ptr);
int pfGetRef(const void *ptr);
int pfCopy(void *dst, void *src);
int pfDelete(void *ptr);
int pfIsFluxed(void *ptr);
int pfCompare(const void *ptr1, const void *ptr2);
void pfPrint(const void *ptr, uint which, uint verbose,
FILE *file);
void * pfGetArena(void *ptr);
DESCRIPTION
A two-dimensional parametric line is defined by two points in 2D space
and parametric space, so that the spatial (x,y) and parametric, t, values
vary linearly from one point to the other.
pfGetLine2dClassType returns the pfType* for the class pfLine2d. The
pfType* returned by pfGetLine2dClassType is the same as the pfType*
returned by invoking pfGetType on any instance of class pfLine2d.
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 pfIsOfType 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.
Page 3
pfLine2d(3pf) OpenGL Performer 3.2.2 libpf C Reference Pages pfLine2d(3pf)
pfNewLine2d creates an instance of an pfLine2d. By default the parametric
domain is defined as [0..1].
pfLine2dPoint1 Sets the first endpoint of the line as per the above
description.
pfLine2dPoint2 Sets the second endpoint of the line as per the above
description.
pfGetLine2dPoint1 returns the values set by pfLine2dPoint1.
pfGetLine2dPoint2 returns the values set by pfLine2dPoint2.
pfLine2dEvalPt Evaluates the line at parametric value t. The evaluator
performs linear extrapolation of the line when the values of t are
outside the domain of t1 and t2.
SEE ALSO
pfRep, pfGeode, pfCurve2d
Page 4