pfGeoSetCB man page on IRIX

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



pfGeoSetCB(3pf)		      OpenGL Performer 3.2.2 libpr C++ Reference Pages

NAME
     pfGeoSetCB - A geometry set with a draw callback.

FUNCTION SPECIFICATION
     #include <Performer/pr/pfGeoSetCB.h>

		       pfGeoSetCB::pfGeoSetCB()

     static pfType *   pfGeoSetCB::getClassType(void);

     void	       pfGeoSetCB::setDrawCB(pfGSetCBType cb, void *data);

     pfGSetCBType      pfGeoSetCB::getDrawCB(void);

     void*	       pfGeoSetCB::getDrawCBData(void);

	  typedef void (*pfGSetCBType)(pfGeoSet *, void *);

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

     void	       pfGeoSet::compile(void);
     void	       pfGeoSet::draw(void);
     void	       pfGeoSet::drawHlightOnly(void);
     void	       pfGeoSet::setNumPrims(int num);
     int	       pfGeoSet::getNumPrims(void);
     void	       pfGeoSet::setPrimType(int type);
     int	       pfGeoSet::getPrimType(void);
     void	       pfGeoSet::setPrimLengths(int *lengths);
     int *	       pfGeoSet::getPrimLengths(void);
     int *	       pfGeoSet::getPrimLength(int i);
     void	       pfGeoSet::setAttr(int attr, int bind, void *alist,
			 ushort *ilist);
     int	       pfGeoSet::getAttrBind(int attr);
     void	       pfGeoSet::getAttrLists(int attr, void **alist,
			 ushort **ilist);
     int	       pfGeoSet::getAttrRange(int attr, int *minIndex,
			 int *maxIndex);
     void	       pfGeoSet::setMultiAttr(int attr, int index, int bind,
			 void *alist, ushort *ilist);
     int	       pfGeoSet::getMultiAttrBind(int attr, int index);
     void	       pfGeoSet::getMultiAttrLists(int attr, int index,
			 void **alist, ushort **ilist);

									Page 1

pfGeoSetCB(3pf)		      OpenGL Performer 3.2.2 libpr C++ Reference Pages

     int	       pfGeoSet::getMultiAttrRange(int attr, int index,
			 int *minIndex, int *maxIndex);
     void	       pfGeoSet::setDrawMode(int mode, int val);
     int	       pfGeoSet::getDrawMode(int mode);
     void	       pfGeoSet::setDecalPlane(pfPlane *plane);
     pfPlane *	       pfGeoSet::getDecalPlane(int mode);
     void	       pfGeoSet::setGState(pfGeoState *gstate);
     pfGeoState *      pfGeoSet::getGState(void);
     void	       pfGeoSet::setGStateIndex(int id);
     int	       pfGeoSet::getGStateIndex(void);
     void	       pfGeoSet::setLineWidth(float width);
     float	       pfGeoSet::getLineWidth(void);
     void	       pfGeoSet::setPntSize(float size);
     float	       pfGeoSet::getPntSize(void);
     void	       pfGeoSet::setHlight(pfHighlight *hlight);
     pfHighlight *     pfGeoSet::getHlight(void);
     void	       pfGeoSet::setDrawBin(short bin);
     int	       pfGeoSet::getDrawBin(void);
     void	       pfGeoSet::setDrawOrder(unsigned int order);
     unsigned int      pfGeoSet::getDrawOrder(void);
     void	       pfGeoSet::hideStripPrim(int i);
     void	       pfGeoSet::unhideStripPrim(int i);
     int	       pfGeoSet::isStripPrimHidden(int i);
     int	       pfGeoSet::query(uint which, void* dst);
     int	       pfGeoSet::mQuery(uint* which, void* dst);
     void	       pfGeoSet::setBound(pfBox *bbox, int mode);
     int	       pfGeoSet::getBound(pfBox *bbox);
     void	       pfGeoSet::setBoundFlux(pfFlux *flux);
     pfFlux*	       pfGeoSet::getBoundFlux(void);
     void	       pfGeoSet::setIsectMask(uint mask, int setMode,
			 int bitOp);
     uint	       pfGeoSet::getIsectMask(void);
     int	       pfGeoSet::isect(pfSegSet *segSet, pfHit **hits[]);
     void	       pfGeoSet::setPassList(pfPassList *passList_);
     pfPassList*       pfGeoSet::getPassList();
     void	       pfGeoSet::updateCteRefs(void);
     void	       pfGeoSet::calcTexBBox(void);
     void	       pfGeoSet::setTexBBox(uint centerS, uint centerT,
			 uint halfwidth, uint halfheight);
     void	       pfGeoSet::setTexBBox(float minS, float maxS,
			 float minT, float maxT);
     int	       pfGeoSet::getTexBBox(uint* centerS, uint* centerT,
			 uint* halfwidth, uint* halfheight);
     int	       pfGeoSet::getTexBBox(float* minS, float* maxS,
			 float* minT, float* maxT);
     void	       pfGeoSet::setCteAttr(int which, void* val);
     void*	       pfGeoSet::getCteAttr(int which);
     void	       pfGeoSet::setAppearance(islAppearance *appearance);
     islAppearance *   pfGeoSet::getAppearance(void);
     int	       pfGeoSet::isShaded(void);

									Page 2

pfGeoSetCB(3pf)		      OpenGL Performer 3.2.2 libpr C++ Reference Pages

     void	       pfGeoSet::quickCopy(pfGeoSet *src);
     void	       pfGeoSet::quickSetAttr(int _attr, void* _alist,
			 unsigned short* _ilist);
     void	       pfGeoSet::quickSetMultiAttr(int _attr, int _index,
			 void* _alist, unsigned short* _ilist);
     void	       pfGeoSet::quickSetPrimLengths(int *_lengths);
     void	       pfGeoSet::quickReset(int extRefOnly);
     void	       pfGeoSet::setOptimize(int _state);
     int	       pfGeoSet::getOptimize(void);
     int	       pfFluxedGSetInit(pfFluxMemory *fmem);

     Since the class pfGeoSet is itself derived from the parent class
     pfObject, objects of class pfGeoSetCB 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, void *arena);
     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 pfGeoSetCB 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();

									Page 3

pfGeoSetCB(3pf)		      OpenGL Performer 3.2.2 libpr C++ Reference Pages

DESCRIPTION
     A pfGetSetCB is a subclass of pfGeoSet. It provides a back door for
     complete application control over the drawing operation of some geometry.
     A pfGetSetCB never draws its internal geometry. It doesn't even have to
     have any attributes specified. Instead, the application has to specify a
     callback frunction for drawing the pfGetSetCB. Performer calls this
     callback function When this pfGetSetCB has to be drawn.

     new(arena) allocates a pfGeoSetCB from the specified memory arena, or
     from the process heap if arena is NULL.  new allocates a pfGeoSetCB from
     the default memory arena (see pfGetSharedArena).  Like other pfObjects,
     pfGeoSetCBs cannot be created statically, automatically on the stack or
     in arrays.	 pfGeoSetCBs should be deleted with pfDelete rather than the
     delete operator.

     pfGeoSetCB::setDrawCB sets the draw callback and user data for a
     pfGetSetCB. The provided callback function is called when this pfGeoSetCB
     is drawn.

     pfGeoSetCB::getDrawCB and pfGeoSetCB::getDrawCBData return the contents
     of the current draw callback and callback-data on a pfGeoSetCB.

     Subclassing a pfGeoSet isn't very useful because almost none its methods
     are virtual (for perfofmance reasons).  pfGeoSetCB uses a virtual
     function pfGeoSetCB::pf_virtualDraw for drawing itself. This means that
     applications can subclass pfGeoSetCB and replace its drawing behavior.

   Code examples
     The following code sample creates a pfGeoSetCB, sets a static bounding
     box, adds a transparent pfGeoState, and adds the pfGeoSetCB to a pfGeode.
     The draw callback drawCB will be called when Performer draws the
     transparent bin.

	      pfGeode	  *geode = new pfGeode;
	      pfGeoSetCB  *gsetCB = new pfGeoSetCB;
	      pfBox	  box;
	      pfGeoState  *gstate = new pfGeoState;

	      box . min[0] = -SIZE;
	      box . min[1] = -SIZE;
	      box . min[2] = -SIZE;
	      box . max[0] = SIZE;
	      box . max[1] = SIZE;
	      box . max[2] = SIZE;

	      // Must set a static bounding box on the geoset. This geoset has no
	      // explicit geometry so Performer has no way to compute its bounding
	      // box.

	      gsetCB -> setBound (&box, PFBOUND_STATIC);

									Page 4

pfGeoSetCB(3pf)		      OpenGL Performer 3.2.2 libpr C++ Reference Pages

	      gsetCB -> setDrawCB(drawCB, NULL);

	      gstate -> makeBasic();

	      // Request high-quality transparency. This geoset will be
	      // drawn in the transparent bin - following all opaque geometry.
	      // In other words, the draw callback will be called after drawing all
	      // opaque geometry.

	      gstate -> setMode(PFSTATE_TRANSPARENCY, PFTR_HIGH_QUALITY);

	      gsetCB -> setGState(gstate);

	      geode -> addGSet(gsetCB);

NOTES
     Performer sorts a pfGeoSetCB - just like any other pfGeoSet - based on
     its pfGeoState. For example, setting the pfGeoState mode using
     pfGeoState::setMode(PFSTATE_TRANSPARENCY, PFTR_HIGH_QUALITY); the
     pfGeoSetCB is drawn in the transparent bin, following all opaque
     geometry.

     Performer doesn't know the extent of the geometry that the draw callback
     draws. Therefore, it can not automatically compute the bounding box of a
     pfGeoSetCB. It is the application responsibility to set the pfGeoSetCB
     bounding box using pfGeoSet::setBound(..., PFBOUND_STATIC).

     Performer invokes the draw callback after loading the pfGeoState on this
     pfGeoSetCB into OpenGL. Any state changes that the drawing callback makes
     must be restored to their original state before returning control. The
     pfGeoSetCB is a light-weight callback, hence Performer doesn't call state
     push/pop around the callback.

SEE ALSO
     pfGeoSet, pfApplyGState, pfColortable, pfCopy, pfCycleBuffer, pfDecal,
     pfDelete, pfDisable, pfDispList, pfEnable, pfFlux, pfFluxMemory,
     pfGSetDrawMode, pfGeoState, pfHit, pfLPointState, pfMalloc, pfMaterial,
     pfNewHlight, pfObject, pfGSetIsectSegs, pfShadeModel, pfState,
     pfuFillGSetPackedAttrs, pfuTravCreatePackedAttrs, pfShader,
     pfShaderManager

									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