pfMeshNumFaces man page on IRIX

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



pfMesh(3pf)	OpenGL Performer 3.2.2 libpf C Reference Pages	   pfMesh(3pf)

NAME
     pfNewMesh, pfGetMeshClassType, pfMeshFlags, pfGetMeshFlags, pfMeshVal,
     pfGetMeshVal, pfMeshAttr, pfGetMeshAttr, pfGetMeshNumVertices,
     pfMeshNumVertices, pfGetMeshVertex, pfGetMeshVertexCoords,
     pfGetMeshEdgeType, pfGetMeshNumFaces, pfMeshNumFaces, pfMeshAddGeoSet,
     pfMeshAddTriangle, pfMeshAddFace, pfGetMeshTriangle, pfGetMeshFace,
     pfGetMeshBBox, pfMeshBBox, pfGetMeshGridBsphere, pfMeshGridBsphere,
     pfMeshSplitVertices, pfMeshUpdateMesh - Keeps track of topology of an
     object

FUNCTION SPECIFICATION
     #include <Performer/pf.h>

     pfMesh*	     pfNewMesh(void *arena);

     pfType*	     pfGetMeshClassType(void);

     void	     pfMeshFlags(pfMesh* mesh, int which, int value);

     int	     pfGetMeshFlags(pfMesh* mesh, int which);

     void	     pfMeshVal(pfMesh* mesh, int which, float  val);

     void	     pfGetMeshVal(pfMesh* mesh, int which, float *val);

     void	     pfMeshAttr(pfMesh* mesh, int which, void *attr);

     void	     pfGetMeshAttr(pfMesh* mesh, int which, void **attr);

     int	     pfGetMeshNumVertices(pfMesh* mesh);

     void	     pfMeshNumVertices(pfMesh* mesh, int num);

     pfMeshVertex*   pfGetMeshVertex(pfMesh* mesh, int i);

     pfVec3*	     pfGetMeshVertexCoords(pfMesh* mesh, int i);

     int	     pfGetMeshEdgeType(pfMesh* mesh, int v, int v1);

     int	     pfGetMeshNumFaces(pfMesh* mesh);

     void	     pfMeshNumFaces(pfMesh* mesh, int num);

     void	     pfMeshAddGeoSet(pfMesh* mesh, pfGeoSet *gset,
		       int currentPart, pfMatrix *xform);

     int	     pfMeshAddTriangle(pfMesh* mesh, pfVec3 *v1, pfVec3 *v2,
		       pfVec3 *v3, pfMatrix *xform, int part,
		       pfGeoState *gstate);

									Page 1

pfMesh(3pf)	OpenGL Performer 3.2.2 libpf C Reference Pages	   pfMesh(3pf)

     int	     pfMeshAddFace(pfMesh* mesh, pfVec3 **verts, int num,
		       pfMatrix *xform, int part, pfGeoState *gstate);

     void	     pfGetMeshTriangle(pfMesh* mesh, int t, int *v1, int *v2,
		       int *v3);

     pfMeshFace*     pfGetMeshFace(pfMesh* mesh, int t);

     pfBox*	     pfGetMeshBBox(pfMesh* mesh);

     void	     pfMeshBBox(pfMesh* mesh, pfBox *b);

     pfSphere*	     pfGetMeshGridBsphere(pfMesh* mesh);

     void	     pfMeshGridBsphere(pfMesh* mesh, pfSphere *b);

     void	     pfMeshSplitVertices(pfMesh* mesh);

     void	     pfMeshUpdateMesh(pfMesh* mesh);

PARENT CLASS FUNCTIONS
     The OpenGL Performer class pfMesh is derived from the parent class
     pfObject, so each of these member functions of class pfObject are also
     directly usable with objects of class pfMesh.  Casting an object of class
     pfMesh to an object of class pfObject is taken care of automatically.
     This is also true for casts to objects of ancestor classes 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 pfMesh 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);

									Page 2

pfMesh(3pf)	OpenGL Performer 3.2.2 libpf C Reference Pages	   pfMesh(3pf)

     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 pfMesh is a high level OpenGL Performer class, it is derived from a
     pfObject for memory allocation purposes.  A pfMesh is used to store the
     information about a topology of an object.	 A pfMesh stores the object as
     a collection of pfMeshVertices and flat pfMeshFaces (these two classes
     are described their corresponding man pages). It is possible to query the
     mesh to determine the information about neighbors of a given vertex or a
     face. This information is required by various algorithms, for example,
     for evaluating subdivision surfaces or for simplification of objects.

     You can build a pfMesh for a given object in several ways.	 First, you
     can use the function pfdAffNodeToMesh that parses a given node and adds
     all its geometry to the mesh.  Second, you can write your own traverser
     and for each pfGeoSet you can call the function pfMeshAddGeoSet.  Third,
     you can call the function pfMeshAddTriangle or pfMeshAddFace and add each
     face separately.  Fourth, in case you would like to have full control
     over the topology stored in the pfMesh you can directly set the array of
     faces and vertices.  To do that you can create the corresponding arrays
     by calling pfMeshNumFaces and pfMeshNumVertices and then set each face
     and vertex separately. You can get the pointer to the array item by
     calling the function pfGetMeshVertex and pfGetMeshFace, respectively.

     When using function pfMeshAddGeoSet you can specify the pfGeoSet, the
     number of a mesh part and the current transformation. The information
     about parts can be used to mark edges.  Each edge is automatically marked
     as

	  PFM_EDGE_NORMAL    edge with two adjacent faces.

	  +PFM_EDGE_BOUNDARY edge with one adjacent face to the left of the
			     edge -PFM_EDGE_BOUNDARY edge with one adjacent
			     face to the right of the edge

	  PFM_EDGE_SPLIT     edge with more than one adjacent face (it can
			     happen in case of non-manifold surfaces).

     You can mark edges between different parts as  PFM_EDGE_CREASE, if flag
     PFM_FLAG_CREASES_BETWEEN_PARTS is set (see below). Note, that also edges
     between faces with different pfGeoState are usually marked as creases.

     The part index and the transformation is also provided to functions
     pfMeshAddTriangle and pfMeshAddFace.  In addition, you need to set also

									Page 3

pfMesh(3pf)	OpenGL Performer 3.2.2 libpf C Reference Pages	   pfMesh(3pf)

     the pfGeoState of the triangle or face.

     When setting vertices and faces directly and accessing them through a
     pointer you need to set all vertex and face parameters. See man page for
     pfMeshFace and pfMeshVertex.

     The function pfMeshSplitVertices has to be called after all vertices are
     set, regardless which of the four methods is used. This functions
     performs extra post-processing that cleans the mesh in cases the object
     is not a manifold (see man page for pfMeshVertex for more details).

     The following flags can be set to 0 or 1:

	  PFM_FLAG_TRIANGULATE	   if this flag is set quads and polygon
				   processed in pfMeshAddGeoSet are
				   triangulated.  Used, for example, for Loop
				   subdivision. It is off by default.

	  PFM_FLAG_TEST_ORIENTATION
				   if set the normal at the first vertex of a
				   face is compared with the face normal and
				   if they point in the opposite directions
				   the order of vertices is is changed. Off by
				   default.

	  PFM_FLAG_CREASES_BETWEEN_PARTS
				   automatically mark edges between different
				   parts as creases. On by default.

	  PFM_FLAG_CREASES_BETWEEN_GEOSTATES
				   automatically mark edges between pfGeoSets
				   with different pfGeoStates.	On by default.

	  PFM_FLAG_QUAD_TSTRIPS	   if set set triangle strips processed in
				   pfMeshAddGeoSet are converted to quads,
				   even if the quads are not planar. Off by
				   default.

	  PFM_FLAG_USE_VERTEX_GRID if set a grid is used when adding faces and
				   checking for existing vertices.  You have
				   to set the bounding sphere of the mesh to
				   be able to used the grid pfMeshGridBsphere.
				   Off by default.

     The following values can be set:

									Page 4

pfMesh(3pf)	OpenGL Performer 3.2.2 libpf C Reference Pages	   pfMesh(3pf)

	  PFM_EPSILON		  the epsilon is used when comparing vertices.
				  The default is 1e-6 or if the grid is
				  defined, 1e-6 multiplied by a ratio of grid
				  diameter to grid resolution along x axis.

	  PFM_VERTEX_GRID_SIZE_X

	  PFM_VERTEX_GRID_SIZE_Y

	  PFM_VERTEX_GRID_SIZE_Z

	  PFM_VERTEX_GRID_SIZE	  set the resolution of the grid used for
				  comparing vertices. Either one value at the
				  time, or all three at once.  The default
				  grid size is 32x32x32.

     You can also query the bounding box of the mesh using pfGetMeshBbox. This
     bounding box is computed automatically around the mesh vertices.

     You can use the function pfMeshUpdateMesh to automatically detect which
     vertices have been changed and marked them and the corresponding faces.
     This can be used in case of dynamic control meshes (see man page for
     pfSubdivSurface for an example). Since each vertex stores both the
     pointer to the original vertex location and the vertex coordinates any
     changes can be easily detected by comparing these values.

SEE ALSO
     pfMeshFace, pfMeshVertex, pfdAddNodeToMesh, pfSubdivSurface, pfObject,
     pfNode

									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