RE: [Plib-devel] An example of ssgVtxArray usage
Brought to you by:
sjbaker
From: Vallevand, M. K <Mar...@UN...> - 2000-08-10 15:10:54
|
Thanks. I'd have put it in myself, but I still am fighting cvs/ssh to commit changes. The class still has bugs (I've already fixed some since I posted it), and really needs commentary. But, it was fun to write. I'm working another class for ocean waves. That's cool. I've got it mostly working, but I'm waiting for the library to get me a copy of a 1986 SIGGRAPH article that has the details of the technique I'm using. The articles and source code that I have as examples are incomplete and uncommented. Regards. Mark K Vallevand ma...@rs... Never try and teach a pig to sing: it's a waste of time, and it annoys the pig. -----Original Message----- From: Dave McClurg [mailto:Dav...@dy...] Sent: Wednesday, August 09, 2000 7:48 PM To: 'pli...@li...' Subject: RE: [Plib-devel] An example of ssgVtxArray usage pretty cool. i wrote a glut main() for it and added it to plib cvs (in examples/src/ssg/tux). it's a good example of how to manually setup a leaf without using a loader. --Dave > I've uploaded a very preliminary version of a useful class for > animation in games. Its also useful for seeing how ssgVtxArray > can be used and its limitations. > > http://vallevand.homepage.com/plib/WavingFlag.h <http://vallevand.homepage.com/plib/WavingFlag.h> > http://vallevand.homepage.com/plib/WavingFlag.cpp <http://vallevand.homepage.com/plib/WavingFlag.cpp> > > The class implements a flag waving in the wind. Its optionally > textured on both sides. The flag is 1.0 by 1.0 units and is in > the y-plane with lower left coords (0,0,0) and upper right coords > (1,0,1). The wind blows from -x to +x. You can translate and > scale it as needed, and rotate it around the z-axis for wind > direction. But, it should not be rotated about other axis because > you'll loose the effect. > > The class illustrates ssgVtxArray usage to share vertex info > between triangle strips. It also illustrates one limitation: > if a vertex is used for both faces of an object, the normal for > the vertex will be outward-facing on one side and inward-facing > on the other. So far, this hasn't caused any problems for me. > > Regards. > Mark K Vallevand ma...@rs... > Never try and teach a pig to sing: it's a waste of time, and it annoys > the pig. |