예제 #1
0
    void apply(Environment& env, Ocean& ocean)
    {
        if (chop.isSet())
        {
            ocean.SetChoppiness(chop.get());
            chop.clear();
        }

        if (seaState.isSet())
        {
            env.SimulateSeaState(seaState.get(), 0.0);
            seaState.clear();
        }

        //if (alpha.isSet())
        //{
        //    triton->setAlpha( alpha.get() );
        //}
    }
    void apply(Environment& env, Ocean& ocean)
    {
        if (chop.isSet())
        {
            ocean.SetChoppiness(chop.get());
            chop.clear();
        }

        if (seaState.isSet())
        {
            env.SimulateSeaState(seaState.get(), 0.0);
            seaState.clear();
        }

        osg::ref_ptr<TritonLayer> layer;
        if (alpha.isSet() && tritonLayer.lock(layer))
        {
            layer->setOpacity(alpha.value());
            alpha.clear();
        }
    }