Modifying GeoSet Geometry...

New Message Reply Date view Thread view Subject view Author view

Roy W Latham (rlatham++at++shell.portal.com)
Tue, 3 Jan 1995 19:47:48 -0800


I am trying to modify the geomety (polygon vertices) of a pfGeoSet
object and have not found a solution for doing this yet.

I initially know of a several polygonal objects(say a pyramid and
cube) and I want to create 100 clones of the original objects, but
each having their geometry altered from the original model. For
example, depending on a certain parameter, the height of one pyramid
might be higher than another cloned pyramid. I have investigated the
following two solutions with no success:

1) I create the object in Performer by first creating a new
   pfGeoSet and setting the geometry of the object using:

   pfGSetAttr(gset, PFGS_COORD3, PFGS_PER_VERTEX, poly_list, NULL);

   where poly_list is a list of my geometry. Next, I set this pfGeoSet
   to a new pfGeode. I create a pfGeoState and pfMaterial for this
   pfGeoSet and give color, etc. This solution worked fine, except that
   when the object gets rendered, it is flat shaded. It has no shading at
   all, just a solid color.

   Any suggestions?????

2) I created master objects using i3dm and save the objects as sv format.
   When I use the sv loader, the objects are shaded correctly, but I
   cannot get access to their geometry. In order to make each cloned
   oject with its own geometry, I don't use pfClone, because, as I
   understand it, pfClone doesn't copy the object geometry. Therefore
   I use pfCopy for the objects pfGeoSet, pfGeoState, and pfMaterial.
   Once, the object has been completely copied, I querey the geometry
   list with:

   pfGetGSetAttrLists(gset, PFGS_COORDS3, (void**)poly_list, (ushort** i));

   The contents of poly_list is all zeros, not the geometry, yet when I
   querey the number of vertices and triangles in the pfGeoSet, the
   correct values get returned, I just a cannot get the old geomtry.

   Any suggestions?????

Thanks for any help,

Brian Theodore


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:48 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.