Marcus (giraffe.asd.sgi.com!sgi.sgi.com!uunet.uu.net!multigen!Marcus)
Fri, 18 Aug 1995 18:00:52 PST
Mario ... you have access to the entire scene graph. Briefly:
1) Enable the OpenFlight loader's callback function and get the
specific objects of interest including the associated pfNode.
See the readme file and pfflt.h for details [or I can email you].
2) Traverse the pfScene looking for the pfNode or pfObject of interest.
Once you have the pfNode you can attach pre/post draw callbacks to
enable/disable the pfLight(s). If the light is left on it will affect the
scene elements drawn afterwards. Also the light's position is
determined by the current GL ModelView matrix at the time it's
enabled (pfLightOn).
Alternatively, you can search down to the pfGeoSet's and fetch their
pfGeoState's and attach pfLight's to them. But you have to be sure that
only the pfGeoSets of interest are using that geostate.
BTW: OpenFlight V14.2 allows you to model the light sources directly.
Regards,
Marcus Barnes, Member Technical Staff
MultiGen Inc., 550 S. Winchester Blvd. Suite 500, San Jose CA, 95128
PH: 1-408-556-2654 FX: 1-408-261-4102
EMAIL: multigen!marcus++at++uunet.UU.NET
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:48 PDT