Lines Matching refs:light
36 import com.jme3.light.DirectionalLight;
37 import com.jme3.light.Light;
38 import com.jme3.light.PointLight;
39 import com.jme3.light.SpotLight;
74 private Light light;
100 light = null;
145 checkTopNode("light");
148 if (light instanceof DirectionalLight)
149 ((DirectionalLight) light).setDirection(parseVector3(attribs));
150 else if (light instanceof SpotLight){
151 ((SpotLight) light).setDirection(parseVector3(attribs));
158 checkTopNode("light");
160 if (light instanceof PointLight || light instanceof SpotLight){
175 if (light instanceof PointLight){
176 ((PointLight) light).setRadius(range);
178 ((SpotLight)light).setSpotRange(range);
184 checkTopNode("light");
189 if (!(light instanceof SpotLight)){
191 + "can only appear under 'spot' light elements");
194 SpotLight sl = (SpotLight) light;
201 throw new SAXException("dotScene parse error: light can only appear under a node");
207 light = new PointLight();
209 light = new DirectionalLight();
211 ((DirectionalLight)light).setDirection(Vector3f.UNIT_Z);
213 light = new SpotLight();
217 logger.log(Level.FINEST, "{0} created.", light);
224 if (light != null)
225 node.getParent().addLight(light);
345 } else if (qName.equals("light")) {
348 if (elementStack.peek().equals("light")){
349 if (light != null){
350 light.setColor(parseColor(attribs));
356 checkTopNode("light");
376 }else if (qName.equals("light")){
377 // apply the node's world transform on the light..
379 if (light != null){
380 if (light instanceof DirectionalLight){
381 DirectionalLight dl = (DirectionalLight) light;
386 }else if (light instanceof PointLight){
387 PointLight pl = (PointLight) light;
390 }else if (light instanceof SpotLight){
391 SpotLight sl = (SpotLight) light;
402 light = null;