bez.setWorldBound(new BoundingSphere()); bez.setForceView(true);
bez.setModelBound(new BoundingSphere()); bez.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("Scene Root Node");        root.attachChild(scene);        ZBufferState buf = display.getRenderer().getZBufferState();        buf.setEnabled(true);        buf.setFunction(ZBufferState.CF_LEQUAL);        scene.setRenderState(buf);        cam.update();        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);        ms.setEnabled(true);        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();        lightstate.setEnabled(true);        lightNode = new LightNode("Light Node",lightstate);        lightNode.setLight(pl);        lightNode.setTarget(bez);                Vector3f min = new Vector3f(-0.15f, -0.15f, -0.15f);        Vector3f max = new Vector3f(0.15f,0.15f,0.15f);        Box lightBox = new Box("box", min,max);                        lightNode.attachChild(lightBox);        lightNode.setForceView(true);                scene.attachChild(lightNode);                TextureState ts = display.getRenderer().getTextureState();        ts.setEnabled(true);        ts.setTexture(            TextureManager.loadTexture(                TestBezierMesh.class.getClassLoader().getResource("jmetest/data/images/Monkey.jpg"),                Texture.MM_LINEAR,                Texture.FM_LINEAR,                true));        bez.setRenderState(ts);        scene.updateGeometricState(0.0f, true);    }