Understanding LightState, Light and LightNode

Hi!



I currently program a visual scene graph manager in Netbeans.

The scenegraph is visually presented using the Node API of Netbeans.



Let's say that thera is a root node and a model node and I want to apply a light to the model so that the light source follows the model if it moves (e.g. the model is a person and the light is a lamp holded by the person). Of course, I have to attach a LightNode to the model. I also have to set the Light to the LightNode. What I don't understand is the paradigma of States. A light state for example can hold up to 8 lights but does this mean that for EACH moving node there SHOULD be an own LightState and for ALL OTHER models I create in future that there SHOULD be an own light state for each of them?



In short: If you have an object and you would like to add a light source to it, would you "save" the LightState instance in the instance of this Model object and attach each Light for THIS model to THIS LightState only? Is the reason that you can add up to 8 Light objects to a single LightState that you can "design" different light effects or do 8 Lights attached to a single LightState realy mean 8 Lights in form of light sources (e.g. 8 lamps in a room or one lamp which is described through 8 lights resulting in a single light effect)?



Thanks,

Equilibrium