[Plib-users] repost - extending leaves etc
Brought to you by:
sjbaker
From: Simon <sim...@ho...> - 2004-05-06 23:34:52
|
Hi, this is another post that got lost in the void, are these not being forwarded on purpose? Just tell me and I=92ll shut up :=AC) =20 I think I=92m beginning to get my head around ssg. I=92ve read through = all the documentation several times now. What I want to do is add a few = functions and some variables to an object. I=92ve seen a few ways that might make = this possible and I was hoping someone could point me in the right direction. =20 Write a new class that extends an entity Write a new class that extends a leaf node Write a new class that extends a branch node (don=92t think it=92s this = one) Using function call backs on standard versions of the above that call my = new functions Store my variables in the standard versions using the user data section =20 The docs say: =93It is presumed that applications will add new kinds of leaves, = branches, states and textures to customise SSG to their needs.=94 =20 You see this is where I get confused. Leaves sound like the best choice = to add the extra functionality to each node, so I thought I should make a = new class based on ssgLeaf. But then I read up on adding user data. I understand I can pump lots of my own variables into this and that along = with pre/post draw call backs I can also call my own functions on an entity = that uses these variables. The problem I see with extending leaves is that = in my demo program I don=92t actually specify =93create a leaf of this = type=94. I just create an ssgRoot and add some ssgEntities to it. I=92m using = ssgLoad3ds to generate the model data for each entity so I=92m not sure if this = creates the leaves internally. =20 Thank you now and I=92ll say thank you later -Simon =20 |