private void parseLightSpotLightRange(Attributes attribs) throws SAXException { checkTopNode("light"); float outer = SAXUtil.parseFloat(attribs.getValue("outer")); float inner = SAXUtil.parseFloat(attribs.getValue("inner")); if (!(light instanceof SpotLight)) { throw new SAXException("dotScene parse error: spotLightRange " + "can only appear under 'spot' light elements"); } SpotLight sl = (SpotLight) light; sl.setSpotInnerAngle(inner * 0.5f); sl.setSpotOuterAngle(outer * 0.5f); }
((SpotLight) light).setSpotOuterAngle(outerAngle);
@Override public void simpleInitApp() { makeTerrain(); flyCam.setMoveSpeed(50); sl = new SpotLight(); sl.setSpotRange(100); sl.setSpotOuterAngle(20 * FastMath.DEG_TO_RAD); sl.setSpotInnerAngle(15 * FastMath.DEG_TO_RAD); sl.setDirection(new Vector3f(-0.39820394f, -0.73094344f, 0.55421597f)); sl.setPosition(new Vector3f(-64.61567f, -87.615425f, -202.41328f)); rootNode.addLight(sl); AmbientLight ambLight = new AmbientLight(); ambLight.setColor(ColorRGBA.Black); rootNode.addLight(ambLight); cam.setLocation(new Vector3f(-41.219646f, 0.8363f, -171.67267f)); cam.setRotation(new Quaternion(-0.04562731f, 0.89917684f, -0.09668826f, -0.4243236f)); sl.setDirection(cam.getDirection()); sl.setPosition(cam.getLocation()); }
spot.setSpotOuterAngle(10*FastMath.DEG_TO_RAD); spot.setPosition(new Vector3f(77.70334f, 34.013165f, 27.1017f)); spot.setDirection(lightTarget.subtract(spot.getPosition()));
sl.setPosition(new Vector3f(1.2074411f, 10.6868908f, 4.1489987f)); sl.setDirection(sl.getPosition().mult(-1)); sl.setSpotOuterAngle(0.1f); sl.setSpotInnerAngle(0.004f); rootNode.addLight(sl);
spot.setSpotRange(13f); // distance spot.setSpotInnerAngle(15f * FastMath.DEG_TO_RAD); // inner light cone (central beam) spot.setSpotOuterAngle(20f * FastMath.DEG_TO_RAD); // outer light cone (edge of the light) spot.setColor(ColorRGBA.White.mult(1.3f)); // light color spot.setPosition(new Vector3f(192.0f, -1f, 192f));
spot.setSpotOuterAngle(10 * FastMath.DEG_TO_RAD); spot.setPosition(new Vector3f(70.70334f, 34.013165f, 27.1017f)); spot.setDirection(lightTarget.subtract(spot.getPosition()).normalizeLocal());
spotLight.setSpotOuterAngle(10 * FastMath.DEG_TO_RAD);
spotLight.setDirection(new Vector3f(1f,-1f,0f)); spotLight.setPosition(new Vector3f(-1f,3f,0f)); spotLight.setSpotOuterAngle(0.5f); spotLight.setColor(ColorRGBA.Green); Sphere sphere = new Sphere(8, 8, .1f);
spot.setDirection(new Vector3f(-1f, -1f, -1f).normalizeLocal()); spot.setColor(ColorRGBA.Blue.mult(5)); spot.setSpotOuterAngle(FastMath.DEG_TO_RAD * 20); spot.setSpotInnerAngle(FastMath.DEG_TO_RAD * 5); spot.setPosition(new Vector3f(10, 10, 20));
private void parseLightSpotLightRange(Attributes attribs) throws SAXException { checkTopNode("light"); float outer = SAXUtil.parseFloat(attribs.getValue("outer")); float inner = SAXUtil.parseFloat(attribs.getValue("inner")); if (!(light instanceof SpotLight)) { throw new SAXException("dotScene parse error: spotLightRange " + "can only appear under 'spot' light elements"); } SpotLight sl = (SpotLight) light; sl.setSpotInnerAngle(inner * 0.5f); sl.setSpotOuterAngle(outer * 0.5f); }
private void parseLightSpotLightRange(Attributes attribs) throws SAXException { checkTopNode("light"); float outer = SAXUtil.parseFloat(attribs.getValue("outer")); float inner = SAXUtil.parseFloat(attribs.getValue("inner")); if (!(light instanceof SpotLight)) { throw new SAXException("dotScene parse error: spotLightRange " + "can only appear under 'spot' light elements"); } SpotLight sl = (SpotLight) light; sl.setSpotInnerAngle(inner * 0.5f); sl.setSpotOuterAngle(outer * 0.5f); }
private void parseLightSpotLightRange(Attributes attribs) throws SAXException { checkTopNode("light"); float outer = SAXUtil.parseFloat(attribs.getValue("outer")); float inner = SAXUtil.parseFloat(attribs.getValue("inner")); if (!(light instanceof SpotLight)) { throw new SAXException("dotScene parse error: spotLightRange " + "can only appear under 'spot' light elements"); } SpotLight sl = (SpotLight) light; sl.setSpotInnerAngle(inner * 0.5f); sl.setSpotOuterAngle(outer * 0.5f); }