lightBox.setModelBound(new BoundingSphere()); lightBox.updateModelBound();
    protected void initGame() {        AlphaState as1 = display.getRenderer().getAlphaState();        as1.setBlendEnabled(true);        as1.setSrcFunction(AlphaState.SB_SRC_ALPHA);        as1.setDstFunction(AlphaState.DB_ONE);        as1.setTestEnabled(true);        as1.setTestFunction(AlphaState.TF_GREATER);                scene = new Node("3D Scene Node");        root = new Node("Root Node");        root.attachChild(scene);        ZBufferState buf = display.getRenderer().getZBufferState();        buf.setEnabled(true);        buf.setFunction(ZBufferState.CF_LEQUAL);        scene.setRenderState(buf);        cam.update();        //      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(1, 0, 0, 1);        colors[1] = new ColorRGBA(1, 0, 0, 1);        colors[2] = new ColorRGBA(1, 0, 0, 1);        colors[3] = new ColorRGBA(1, 0, 0, 1);        curve.setColors(colors);                        BezierPatch bp = new BezierPatch();        bp.setAnchor(0, 0, new Vector3f(-0.75f, -0.75f, -0.5f));        bp.setAnchor(0, 1, new Vector3f(-0.25f, -0.75f, 0.0f));        bp.setAnchor(0, 2, new Vector3f(0.25f, -0.75f, 0.5f));        bp.setAnchor(0, 3, new Vector3f(0.75f, -0.75f, 0.5f));        bp.setAnchor(1, 0, new Vector3f(-0.75f, -0.25f, -0.75f));        bp.setAnchor(1, 1, new Vector3f(-0.25f, -0.25f, 0.5f));        bp.setAnchor(1, 2, new Vector3f(0.25f, -0.25f, 0.5f));        bp.setAnchor(1, 3, new Vector3f(0.75f, -0.25f, 0.75f));        bp.setAnchor(2, 0, new Vector3f(-0.75f, 0.25f, -0.5f));        bp.setAnchor(2, 1, new Vector3f(-0.25f, 0.25f, -0.5f));        bp.setAnchor(2, 2, new Vector3f(0.25f, 0.25f, -0.5f));        bp.setAnchor(2, 3, new Vector3f(0.75f, 0.25f, 0.0f));        bp.setAnchor(3, 0, new Vector3f(-0.75f, 0.75f, -0.5f));        bp.setAnchor(3, 1, new Vector3f(-0.25f, 0.75f, -1.0f));        bp.setAnchor(3, 2, new Vector3f(0.25f, 0.75f, -1.0f));        bp.setAnchor(3, 3, new Vector3f(0.75f, 0.75f, -0.5f));        bp.setDetailLevel(100);        BezierMesh bez = new BezierMesh("Bezier Mesh");        bez.setPatch(bp);        bez.setWorldBound(new BoundingSphere());        bez.setForceView(true);        scene.attachChild(bez);        MaterialState ms = display.getRenderer().getMaterialState();        ms.setEmissive(new ColorRGBA(0, 0, 0.4f, 1.0f));        ms.setAmbient(new ColorRGBA(0.5f, 0.5f, 0.5f, 1.0f));        ms.setDiffuse(new ColorRGBA(1.0f, 0.85f, 0.75f, 1.0f));        ms.setSpecular(new ColorRGBA(0.8f, 0.8f, 0.8f, 1.0f));        ms.setShininess(128.0f);        bez.setRenderState(ms);        pl = new PointLight();        pl.setAmbient(new ColorRGBA(0, 0, 0, 1));        pl.setDiffuse(new ColorRGBA(1, 1, 1, 1));        pl.setSpecular(new ColorRGBA(0, 0, 1, 1));        pl.setEnabled(true);        lightstate = display.getRenderer().getLightState();        lightNode = new LightNode("Light Node", lightstate);        lightNode.setLight(pl);        lightNode.setTarget(bez);                CurveController cc = new CurveController(curve, lightNode);        lightNode.addController(cc);        cc.setRepeatType(Controller.RT_CYCLE);                Vector3f min = new Vector3f(-0.15f, -0.15f, -0.15f);        Vector3f max = new Vector3f(0.15f, 0.15f, 0.15f);        Box lightBox = new Box("Light Box", min, max);        lightNode.attachChild(lightBox);        lightNode.setForceView(true);        scene.attachChild(lightNode);        scene.attachChild(curve);        TextureState ts = display.getRenderer().getTextureState();        ts.setEnabled(true);        ts.setTexture(            TextureManager.loadTexture(                TestMilestone3.class.getClassLoader().getResource("jmetest/data/images/Monkey.jpg"),                Texture.MM_LINEAR,                Texture.FM_LINEAR,                true));        bez.setRenderState(ts);        scene.updateGeometricState(0.0f, true);    }