Example #1
0
void DecorateShadowPlugin::initGlobalParameterSet(QAction *action, RichParameterSet &parset)
{
    switch(ID(action)){
        case DP_SHOW_SHADOW : {
            assert(!(parset.hasParameter(this->DecorateShadowMethod())));
            int method = SH_MAP_VSM_BLUR;
            parset.addParam(
                    new RichEnum(
                        this->DecorateShadowMethod(),
                        method,
                        getSHMethods(),
                        "Shader used to perform shadow mapping decoration",
                        "Shadow mapping method")
                    );
            break;
        }

        case DP_SHOW_SSAO : {
            assert(!(parset.hasParameter(this->DecorateShadowSSAORadius())));
            float radius = 0.25f;
            parset.addParam(
                    new RichFloat(this->DecorateShadowSSAORadius(),
                    radius,
                    "Uniform parameter for SSAO shader",
                    "SSAO radius"));
            break;
        }

        default: assert(0);
    }
}		
void DecorateBackgroundPlugin::initGlobalParameterSet(QAction *action, RichParameterSet &parset)
{
  switch(ID(action)){
  case DP_SHOW_CUBEMAPPED_ENV :
  if(!parset.hasParameter(CubeMapPathParam()))
      {
    QString cubemapDirPath = PluginManager::getBaseDirPath() + QString("/textures/cubemaps/uffizi.jpg");
    //parset.addParam(new RichString(CubeMapPathParam(), cubemapDirPath,"",""));
  }
  break;
  case DP_SHOW_GRID :
      parset.addParam(new RichFloat(BoxRatioParam(),2.0,"Box Ratio","The size of the grid around the object w.r.t. the bbox of the object"));
      parset.addParam(new RichFloat(GridMajorParam(),10,"Major Spacing",""));
      parset.addParam(new RichFloat(GridMinorParam(),1,"Minor Spacing",""));
      parset.addParam(new RichBool(GridBackParam(),true,"Front grid culling",""));
      parset.addParam(new RichBool(ShowShadowParam(),false,"Show silhouette",""));
      parset.addParam(new RichColor(GridColorBackParam(),QColor(Color4b::Gray),"Back Grid Color",""));
      parset.addParam(new RichColor(GridColorFrontParam(),QColor(Color4b::Gray),"Front grid Color",""));

    break;
  }
}