Re: [Plib-users] (Again) accessing vertex infos of a loaded model
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2001-10-19 22:46:16
|
Filippo Di Natale wrote: > I would like to load a model created with a 3d app into an ssgEntity and > then access the vertex info of it, from what I can understand it's not > possible... Yes - of course it's possible. There are lots of calls to any kind of ssgLeaf node to allow you to access the vertices, normals, texcoords and colours. Read the documentation for ssgLeaf, ssgVtxArray, etc. *MANY* (actually, probably *ALL*) of my games have a need to occasionally delve into the vertex structures of ssgEntities. Just take a look at Prettypoly for example - it is a complete 3D modeller written around SSG - you can drag vertices around with the mouse, mess with their textures coordinates, etc, etc. So - you are mistaken - it is a primary design goal of SSG that it does not "hide" things from the application program. > seems I'll have to steal the loader source code and insert > it in my little game. You shouldn't need to do that (and if you do...beware of the LGPL...if you use even a small part of our loader code in your actual game code, you could have to license the entire game under LGPL). > I need to access vertex infos because I want to try a collision > detection library that needs vertex infos of a model. > I would like to use a detailed model for the graphics, and a much lower > resolution model to load into the collision detection object. OK - no problem - just load the two versions of the model into separate scene graphs - use one for ssgCullAndDraw, use your own software to traverse the tree structure of the other to extract the vertex and polygon data for passing to the collision detection library. ----------------------------- Steve Baker ------------------------------- Mail : <sjb...@ai...> WorkMail: <sj...@li...> URLs : http://web2.airmail.net/sjbaker1 http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net http://freeglut.sf.net http://toobular.sf.net http://lodestone.sf.net |