RE: [Plib-devel] An example of ssgVtxArray usage
Brought to you by:
sjbaker
From: Dave M. <Dav...@dy...> - 2000-08-10 00:48:25
|
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.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. |