spotlight2.setDirection(new Vector3f(0, 0, 0));
spotlight2.setDirection(new Vector3f(1, -0.5f, 0));
    public void init(WidgetViewport vp, WidgetViewportCameraController cameraController) {        vp.detachAllChildren();        if (scene == null) {            BezierCurve curve;            DisplaySystem display = DisplaySystem.getDisplaySystem();            TriMesh t, t2, t3, t4;            TriMesh box;            timer = Timer.getTimer(display.getRendererType().getName());            //create control Points            Vector3f[] points = new Vector3f[4];            points[0] = new Vector3f(-4, 0, 0);            points[1] = new Vector3f(-2, 3, 2);            points[2] = new Vector3f(2, -3, -2);            points[3] = new Vector3f(4, 0, 0);            curve = new BezierCurve("Bezier Curve", points);            ColorRGBA[] colors = new ColorRGBA[4];            colors[0] = new ColorRGBA(0, 1, 0, 1);            colors[1] = new ColorRGBA(1, 0, 0, 1);            colors[2] = new ColorRGBA(1, 1, 0, 1);            colors[3] = new ColorRGBA(0, 0, 1, 1);            curve.setColors(colors);            Vector3f min = new Vector3f(-0.1f, -0.1f, -0.1f);            Vector3f max = new Vector3f(0.1f, 0.1f, 0.1f);            ZBufferState buf = display.getRenderer().getZBufferState();            buf.setEnabled(true);            buf.setFunction(ZBufferState.CF_LEQUAL);            t = new Box("Box 1", min, max);            t.setModelBound(new BoundingSphere());            t.updateModelBound();            t.setLocalTranslation(points[0]);            t2 = new Box("Box 2", min, max);            t2.setModelBound(new BoundingSphere());            t2.updateModelBound();            t2.setLocalTranslation(points[1]);            t3 = new Box("Box 3", min, max);            t3.setModelBound(new BoundingSphere());            t3.updateModelBound();            t3.setLocalTranslation(points[2]);            t4 = new Box("Box 4", min, max);            t4.setModelBound(new BoundingSphere());            t4.updateModelBound();            t4.setLocalTranslation(points[3]);            box = new Box("Box 5", min.mult(5), max.mult(5));            box.setModelBound(new BoundingSphere());            box.updateModelBound();            box.setLocalTranslation(points[0]);            CurveController cc = new CurveController(curve, box);            box.addController(cc);            cc.setRepeatType(Controller.RT_CYCLE);            cc.setUpVector(new Vector3f(0, 1, 0));            TextureState ts = display.getRenderer().getTextureState();            ts.setEnabled(true);            ts.setTexture(                TextureManager.loadTexture(                    TestScene2.class.getClassLoader().getResource("jmetest/data/images/Monkey.jpg"),                    Texture.MM_LINEAR,                    Texture.FM_LINEAR,                    true));            box.setRenderState(ts);            AmbientLight am = new AmbientLight();            am.setDiffuse(new ColorRGBA(0.05f, 0.05f, 0.05f, 1.0f));            am.setAmbient(new ColorRGBA(0.05f, 0.05f, 0.05f, 1.0f));            spotlight1 = new SpotLight();            spotlight1.setDiffuse(new ColorRGBA(0.0f, 1.0f, 0.0f, 1.0f));            spotlight1.setAmbient(new ColorRGBA(0.5f, 0.5f, 0.5f, 1.0f));            spotlight1.setDirection(new Vector3f(0, 0, 0));            spotlight1.setLocation(new Vector3f(25, 10, 0));            spotlight1.setAngle(15);            spotlight2 = new SpotLight();            spotlight2.setDiffuse(new ColorRGBA(1.0f, 0.0f, 0.0f, 1.0f));            spotlight2.setAmbient(new ColorRGBA(0.5f, 0.5f, 0.5f, 1.0f));            spotlight2.setDirection(new Vector3f(0, 0, 0));            spotlight2.setLocation(new Vector3f(-25, 10, 0));            spotlight2.setAngle(15);            dr = new DirectionalLight();            dr.setDiffuse(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f));            dr.setAmbient(new ColorRGBA(0.5f, 0.5f, 0.5f, 1.0f));            //dr.setSpecular(new ColorRGBA(1.0f, 0.0f, 0.0f, 1.0f));            dr.setDirection(new Vector3f(0, 0, -1));            LightState lightState = display.getRenderer().getLightState();            lightState.attach(am);            lightState.attach(dr);            lightState.attach(spotlight1);            lightState.attach(spotlight2);            lightState.setEnabled(true);            am.setEnabled(true);            spotlight1.setEnabled(true);            spotlight2.setEnabled(true);            dr.setEnabled(true);            scene = new Node("Scene Node");            scene.setRenderState(lightState);            scene.setRenderState(buf);            scene.attachChild(t);            scene.attachChild(t2);            scene.attachChild(t3);            scene.attachChild(t4);            scene.attachChild(box);            scene.attachChild(curve);            scene.updateGeometricState(0.0f, true);        }        vp.setCameraController(cameraController);        vp.attachChild(scene);        vp.setBorder(new WidgetBorder(1, 1, 1, 1, WidgetBorderType.FLAT));        vp.setInsets(new WidgetInsets(2, 2, 2, 2));        vp.setBgColor(new ColorRGBA(0, 0, 0, 1));    }