Exemple #1
0
void PMNormal::restoreMemento( PMMemento* s )
{
   PMMementoDataIterator it( s );
   PMMementoData* data;

   for( ; it.current( ); ++it )
   {
      data = it.current( );
      if( data->objectType( ) == s_pMetaObject )
      {
         switch( data->valueID( ) )
         {
            case PMEnableBumpSizeID:
               enableBumpSize( data->boolData( ) );
               break;
            case PMBumpSizeID:
               setBumpSize( data->doubleData( ) );
               break;
            case PMAccuracyID:
               setAccuracy( data->doubleData( ) );
               break;
            case PMUVMappingID:
               setUVMapping( data->boolData( ) );
               break;
            default:
               kdError( PMArea ) << "Wrong ID in PMNormal::restoreMemento\n";
               break;
         }
      }
   }
   Base::restoreMemento( s );
}
Exemple #2
0
void PMDetailObject::restoreMemento( PMMemento* s )
{
   PMMementoDataIterator it( s );
   PMMementoData* data;

   for( ; it.current( ); ++it )
   {
      data = it.current( );
      if( data->objectType( ) == s_pMetaObject )
      {
         switch( data->valueID( ) )
         {
            case PMGlobalDetailID:
               setGlobalDetail( data->boolData( ) );
               break;
            case PMLocalDetailLevelID:
               setLocalDetailLevel( data->intData( ) );
               break;
            default:
               kdError( PMArea ) << "Wrong ID in PMDetailObject::restoreMemento\n";
               break;
         }
      }
   }
   Base::restoreMemento( s );
}
Exemple #3
0
void PMMaterialMap::restoreMemento( PMMemento* s )
{
   PMMementoDataIterator it( s );
   PMMementoData* data;

   for( ; it.current( ); ++it )
   {
      data = it.current( );
      if( data->objectType( ) == s_pMetaObject )
      {
         switch( data->valueID( ) )
         {
            case PMBitmapTypeID:
               setBitmapType( ( PMBitmapType )data->intData( ) );
               break;
            case PMBitmapFileID:
               setBitmapFileName( data->stringData( ) );
               break;
            case PMOnceID:
               enableOnce( data->boolData( ) );
               break;
            case PMMapTypeID:
               setMapType( ( PMMapType )data->intData( ) );
               break;
            case PMInterpolateID:
               setInterpolateType( ( PMInterpolateType )data->intData( ) );
               break;
            default:
               kdError( PMArea ) << "Wrong ID in PMMaterialMap::restoreMemento\n";
               break;
         }
      }
   }
   Base::restoreMemento( s );
}
Exemple #4
0
void PMCone::restoreMemento( PMMemento * s )
{
   PMMementoDataIterator it( s );
   PMMementoData* data;

   for( ; it.current( ); ++it )
   {
      data = it.current( );
      if( data->objectType( ) == s_pMetaObject )
      {
         switch( data->valueID( ) )
         {
            case PMEnd1ID:
               setEnd1( data->vectorData( ) );
            break;
            case PMEnd2ID:
               setEnd2( data->vectorData( ) );
            break;
            case PMRadius1ID:
               setRadius1( data->doubleData( ) );
            break;
            case PMRadius2ID:
               setRadius2( data->doubleData( ) );
            break;
            case PMOpenID:
               setOpen( data->boolData( ) );
            break;
            default:
               kdError( PMArea ) << "Wrong ID in PMCone::restoreMemento\n";
            break;
         }
      }
   }
   Base::restoreMemento (s);
}
Exemple #5
0
void PMTorus::restoreMemento( PMMemento* s )
{
   PMMementoDataIterator it( s );
   PMMementoData* data;

   for( ; it.current( ); ++it )
   {
      data = it.current( );
      if( data->objectType( ) == s_pMetaObject )
      {
         switch( data->valueID( ) )
         {
            case PMMinorRadiusID:
               setMinorRadius( data->doubleData( ) );
               break;
            case PMMajorRadiusID:
               setMajorRadius( data->doubleData( ) );
               break;
            case PMSturmID:
               setSturm( data->boolData( ) );
            default:
               kdError( PMArea ) << "Wrong ID in PMTorus::restoreMemento\n";
               break;
         }
      }
   }
   Base::restoreMemento( s );

}
Exemple #6
0
void PMPigment::restoreMemento( PMMemento *s )
{
   PMMementoDataIterator it( s );
   PMMementoData* data;

   for( ; it.current( ); ++it )
   {
      data = it.current( );
      if( data->objectType( ) == s_pMetaObject )
      {
         switch( data->valueID( ) )
         {
            case PMUVMappingID:
               setUVMapping( data->boolData( ) );
               break;
            default:
               kdError( PMArea ) << "Wrong ID in PMPigment::restoreMemento\n";
               break;
         }
      }
   }
   Base::restoreMemento( s );
}
Exemple #7
0
void PMFinish::restoreMemento( PMMemento* s )
{
   PMMementoDataIterator it( s );
   PMMementoData* data;

   for( ; it.current( ); ++it )
   {
      data = it.current( );
      if( data->objectType( ) == s_pMetaObject )
      {
         switch( data->valueID( ) )
         {
            case PMAmbientColorID:
               setAmbientColor( data->colorData( ) );
               break;
            case PMDiffuseID:
               setDiffuse( data->doubleData( ) );
               break;
            case PMBrillianceID:
               setBrilliance( data->doubleData( ) );
               break;
            case PMCrandID:
               setCrand( data->doubleData( ) );
               break;
            case PMConserveEnergyID:
               setConserveEnergy( data->boolData( ) );
            case PMPhongID:
               setPhong( data->doubleData( ) );
               break;
            case PMPhongSizeID:
               setPhongSize( data->doubleData( ) );
               break;
            case PMMetallicID:
               setMetallic( data->doubleData( ) );
               break;
            case PMSpecularID:
               setSpecular( data->doubleData( ) );
               break;
            case PMRoughnessID:
               setRoughness( data->doubleData( ) );
               break;
            case PMIridID:
               setIrid( data->boolData( ) );
               break;
            case PMIridAmountID:
               setIridAmount( data->doubleData( ) );
               break;
            case PMIridThicknessID:
               setIridThickness( data->doubleData( ) );
               break;
            case PMIridTurbulenceID:
               setIridTurbulence( data->doubleData( ) );
               break;
            case PMReflectionColorID:
               setReflectionColor( data->colorData( ) );
               break;
            case PMReflectionMinColorID:
               setReflectionMinColor( data->colorData( ) );
               break;
            case PMReflectionFresnelID:
               setReflectionFresnel( data->boolData( ) );
               break;
            case PMReflectionFalloffID:
               setReflectionFalloff( data->doubleData( ) );
               break;
            case PMReflectionExponentID:
               setReflectionExponent( data->doubleData( ) );
               break;
            case PMReflectionMetallicID:
               setReflectionMetallic( data->doubleData( ) );
               break;
            case PMEnableAmbientID:
               enableAmbient( data->boolData( ) );
               break;
            case PMEnablePhongID:
               enablePhong( data->boolData( ) );
               break;
            case PMEnablePhongSizeID:
               enablePhongSize( data->boolData( ) );
               break;
            case PMEnableDiffuseID:
               enableDiffuse( data->boolData( ) );
               break;
            case PMEnableBrillianceID:
               enableBrilliance( data->boolData( ) );
               break;
            case PMEnableCrandID:
               enableCrand( data->boolData( ) );
               break;
            case PMEnableSpecularID:
               enableSpecular( data->boolData( ) );
               break;
            case PMEnableRoughnessID:
               enableRoughness( data->boolData( ) );
               break;
            case PMEnableMetallicID:
               enableMetallic( data->boolData( ) );
               break;
            case PMEnableReflectionID:
               enableReflection( data->boolData( ) );
               break;
            case PMEnableReflectionMinID:
               enableReflectionMin( data->boolData( ) );
               break;
            case PMEnableRefFalloffID:
               enableRefFalloff( data->boolData( ) );
               break;
            case PMEnableRefExponentID:
               enableRefExponent( data->boolData( ) );
               break;
            case PMEnableRefMetallicID:
               enableRefMetallic( data->boolData( ) );
               break;
            default:
               kdError( PMArea ) << "Wrong ID in PMFinish::restoreMemento\n";
               break;
         }
      }
   }
   Base::restoreMemento( s );
}