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); }
spotblend = FastMath.clamp(spotblend, 0, 1); float innerAngle = outerAngle * (1 - spotblend); ((SpotLight) light).setSpotInnerAngle(innerAngle); break; case 3:// Hemi
@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.setSpotInnerAngle(5*FastMath.DEG_TO_RAD); spot.setSpotOuterAngle(10*FastMath.DEG_TO_RAD); spot.setPosition(new Vector3f(77.70334f, 34.013165f, 27.1017f));
sl.setDirection(sl.getPosition().mult(-1)); sl.setSpotOuterAngle(0.1f); sl.setSpotInnerAngle(0.004f); rootNode.addLight(sl);
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.setSpotInnerAngle(5f * FastMath.DEG_TO_RAD); spot.setSpotOuterAngle(10 * FastMath.DEG_TO_RAD); spot.setPosition(new Vector3f(70.70334f, 34.013165f, 27.1017f));
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)); rootNode.addLight(spot);
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); }