Re: [Plib-users] Pre/Post draw callbacks on ssgBranches.
Brought to you by:
sjbaker
From: Jon A. <jan...@on...> - 2000-09-20 14:31:25
|
> >So why don't you do the tesselation inside the 'cull' function of the >ssgTerrain? After you've done tesselating, you can just call: > > ssgBranch::cull( {whatever} ); > >...to do the actual culling of the daughter objects. Yes, after poring over the ssg code last night, I think I'll do this. > > > I have some misc. utility functions defined like getHeight(), but I'd > like to > > make it work for ssgHOT, etc. > >Right - those typically need "exact" answers - irrespective of how the terrain >is currently triangulated in the visuals. Also, the terrain may not have >been triangulated by ROAM if that patch has never been in the field of view. > >Hence, I think you'll have to call the tesselator function for some region >around >the intersection inside both isect and hot member functions. Actually, since the terrain has a pointer to all the height field data. I have been just referencing that data directly, rather than trying to intersect the resulting mesh. > > > Anyway, you can take a look at the code. > >With pleasure. > >Incidentally, I'm assuming this is something that we'd put into ssgAux rather >into the main scene graph API - since not everyone will want it. So we'd >better >talk about ssgaTerrain rather than ssgTerrain. Sure. This is definitely more of a auxiliary. It's a pretty simple implementation right now, with limited flexibility. Maybe I'll try implementing some things like the variance calculation function as call backs to allow an end programmer to customize it better. >Maybe I should 'donate' the "feature placement" code from TuxAQFH or TuxKart >too. That's a parser for a simple file format that contains names of objects >and their location in the world - with the option to have them 'planted' onto >the terrain in Z - and optionally in Roll/Pitch also. That would definitely be cool. In fact, I was just about to the point of adding that to my little "Walk a quake2 character around on a ROAM terrain" game. =) Jon |