void PMJuliaFractal::readAttributes( const PMXMLHelper& h ) { m_juliaParameter = h.vectorAttribute( "julia_parameter", c_defaultJuliaParameter ); m_algebraType = stringToAlgebraType( h.stringAttribute( "algebra_type", c_defaultAlgebraString ) ); m_functionType = stringToFunctionType( h.stringAttribute( "function_type", c_defaultFunctionString ) ); m_maxIterations = h.intAttribute( "max_iterations", c_defaultMaxIterations ); m_precision = h.doubleAttribute( "precision", c_defaultPrecision ); m_sliceNormal = h.vectorAttribute( "slice_normal", c_defaultSliceNormal ); m_sliceDistance = h.doubleAttribute( "slice_distance", c_defaultSliceDistance ); m_exponent = h.vectorAttribute( "exponent", c_defaultExponent ); Base::readAttributes( h ); }
void PMMaterialMap::readAttributes( const PMXMLHelper& h ) { QString str; str = h.stringAttribute( "bitmap_type", "sys" ); if( str == "gif" ) m_bitmapType = BitmapGif; else if( str == "tga" ) m_bitmapType = BitmapTga; else if( str == "iff" ) m_bitmapType = BitmapIff; else if( str == "ppm" ) m_bitmapType = BitmapPpm; else if( str == "pgm" ) m_bitmapType = BitmapPgm; else if( str == "png" ) m_bitmapType = BitmapPng; else if( str == "jpeg" ) m_bitmapType = BitmapJpeg; else if( str == "tiff" ) m_bitmapType = BitmapTiff; else if( str == "sys" ) m_bitmapType = BitmapSys; m_bitmapFile = h.stringAttribute( "file_name", bitmapFileDefault ); m_once = h.boolAttribute( "once", onceDefault ); str = h.stringAttribute( "map_type", "planar" ); if( str == "planar" ) m_mapType = MapPlanar; else if( str == "spherical" ) m_mapType = MapSpherical; else if( str == "cylindrical" ) m_mapType = MapCylindrical; else if( str == "toroidal" ) m_mapType = MapToroidal; str = h.stringAttribute( "interpolate", "none" ); if( str == "none" ) m_interpolateType = InterpolateNone; else if( str == "bilinear" ) m_interpolateType = InterpolateBilinear; else if( str == "normalized" ) m_interpolateType = InterpolateNormalized; Base::readAttributes( h ); }
void PMText::readAttributes( const PMXMLHelper& h ) { m_font = h.stringAttribute( "font", c_defaultFont ); m_text = h.stringAttribute( "text", c_defaultText ); m_thickness = h.doubleAttribute( "thickness", c_defaultThickness ); m_offset = h.vectorAttribute( "offset", c_defaultOffset ); Base::readAttributes( h ); }
void PMListPattern::readAttributes( const PMXMLHelper& h ) { QString str = h.stringAttribute( "listtype", "checker" ); if( str == "checker" ) m_listType = ListPatternChecker; else if( str == "brick" ) m_listType = ListPatternBrick; else m_listType = ListPatternHexagon; m_brickSize = h.vectorAttribute( "bricksize", brickSizeDefault ); m_mortar = h.doubleAttribute( "mortar", mortarDefault ); Base::readAttributes( h ); }
void PMTextureMapBase::readAttributes( const PMXMLHelper& h ) { stringToValues( h.stringAttribute( "map_values", "" ) ); Base::readAttributes( h ); }