Vertex manipulations...

New Message Reply Date view Thread view Subject view Author view

Kowsik Guruswamy (kowsik++at++cory.coryphaeus.com)
Fri, 10 Mar 95 16:26:02 -0800


[slightly long posting...]

Hi there,
  I am trying to do some vertex manipulations (nothing complex) in Performer
  and I was having problems.

  I took care of the multibuffering by using 3 *copies* [copied at the
  GeoSet level] of the original geode and placing them under a pfSwitch and
  changing the value of the pfSwitchVal in the APP process. In any case I
  am running with the APPCULLDRAW configuration.

  The following is the scene graph:

  group pfSwitch
| |
   foo ------
|a / | \
   blah geode geode geode
| | | |
  geode[orig] gset1 gset2 gset3
| ^ ^ ^
   gset------------------|------|------|
    

  Every frame, I move the vertices in the switch node determined by the
  pfGetSwitchVal() in relation to the original GeoSet and then update the
  pfSwitchVal() to point to the next guy. [cyclically]

  The funniest part is that, this works great when the GeoSet primitive
  type is PFGS_FLAT_TRISTRIPS. For primitives other than this nothing
  ever seem to happen.

  The copies that I made of the original GeoSet are byte level copies. I
  printed out the addresses of the attribute lists at various points in the
  program and they match. I printed out the vertex information got
  out of pfGetGSetAttrLists(...) and they are definitely changing. [even
  if the primitive type is something other than PFGS_FLAT_TRISTRIPS]

  I replaced the Geode[orig] with pfSwitch [using pfReplaceChild()], saved
  the pointer and replaced it back at the end of the vertex manipulation.

  One more thing to note was this: If instead of making byte level copies
  of the attribute lists, I made the new Geosets' (gset1 to gset3)
  attribute lists point to the original, then during the vertex
  manipulation, the vertices change but not what is drawn on the screen.

  Somehow, this implied to me that the Geoset's internal pointers were not
  being updated. But according to the paper by John Rohlf and James Helman

  'pfGeoSets utilize application-supplied arrays for attributes such as
  coordinates and colors, consequently avoiding these advantages.
  Applications are free to modify these arrays for dynamic effects...'

Any insights, anyone?

Thanks,

K.
kowsik guruswamy


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:51:03 PDT

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