From: DANIEL BASS (BASSD++at++aaicorp.com)
Date: 02/19/2001 08:59:14
Question: Is it possible to change the value of the ChanTravMask during a traversal?
Here is what I am really trying to do:
I have many models, say cars, each with several sub-assemblies , say tires. Each model
has several LOD's and each LOD will have the sub-assemblies. The application can
state which (none, some, all) of the sub-assemblies are shown for each model.
My thought was to set unique NodeTravMasks for each "tire", though the masks would
be consistent from model to model (e.g. Left Front = 0x01, Right Front = 0x02,
Left Rear = 0x04, Right Rear = 0x08). Then I would set a callback in each model instance
to set the ChanTravMask, e.g. Model 1 sets the ChanTravMask to 14 and all but the lft front are drawn,
while Model 2 sets the ChanTravMask to 3 and only the front tires appear.
However when I tried doing this, it seemed that all changes to the ChanTravMask were
ignored during the traversal, except that the last value set was used in the subsequent traversal.
Is this not a valid use of the ChanTravMask ?
Is the ChanTravMask tucked away somewhere at the beginning of the channel
and not loaded again until the next channel?
Could I be putting the callbacks on the wrong
traversal? (I think I used a pre-draw callback.)
If I can't do this, can anyone offer an alternative to mask out portions of the model? My next
thought is to using pfSwitch nodes, but it seems that I would need one switch for each
sub-assembly child of each LOD, that could make for a lot of switches and redundant switch
setting.
Thanks,
--daniel
This archive was generated by hypermail 2b29 : Mon Feb 19 2001 - 09:00:40 PST