Changeset 219 for osgVisual/trunk/src/sky_Silverlining
- Timestamp:
- Feb 2, 2011, 9:59:08 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/trunk/src/sky_Silverlining/visual_skySilverLining.cpp
r201 r219 764 764 std::string attr_name=reinterpret_cast<const char*>(attr->name); 765 765 std::string attr_value=reinterpret_cast<const char*>(attr->children->content); 766 if( attr_name == "slot" ) 767 { 768 std::stringstream sstr(attr_value); 769 sstr >> slot; 770 } 771 if( attr_name == "enabled" ) 772 { 773 if(attr_value=="yes") 774 enabled = true; 775 else 776 enabled = false; 777 } 778 if( attr_name == "fadetime" ) 779 { 780 std::stringstream sstr(attr_value); 781 sstr >> fadetime; 782 } 766 if( attr_name == "slot" ) slot = util::strToInt(attr_value); 767 if( attr_name == "enabled" ) enabled = util::strToBool(attr_value); 768 if( attr_name == "fadetime" ) fadetime = util::strToInt(attr_value); 783 769 if( attr_name == "type" ) 784 770 { … … 817 803 std::string attr_name=reinterpret_cast<const char*>(attr->name); 818 804 std::string attr_value=reinterpret_cast<const char*>(attr->children->content); 819 if( attr_name == "baselength" ) 820 { 821 std::stringstream sstr(attr_value); 822 sstr >> baselength; 823 } 824 if( attr_name == "basewidth" ) 825 { 826 std::stringstream sstr(attr_value); 827 sstr >> basewidth; 828 } 829 if( attr_name == "thickness" ) 830 { 831 std::stringstream sstr(attr_value); 832 sstr >> thickness; 833 } 834 if( attr_name == "baseHeight" ) 835 { 836 std::stringstream sstr(attr_value); 837 sstr >> baseHeight; 838 } 839 if( attr_name == "density" ) 840 { 841 std::stringstream sstr(attr_value); 842 sstr >> density; 843 } 805 if( attr_name == "baselength" ) baselength = util::strToInt(attr_value); 806 if( attr_name == "basewidth" ) basewidth = util::strToInt(attr_value); 807 if( attr_name == "thickness" ) thickness = util::strToInt(attr_value); 808 if( attr_name == "baseHeight" ) baseHeight = util::strToInt(attr_value); 809 if( attr_name == "density" ) density = util::strToDouble(attr_value); 810 844 811 attr = attr->next; 845 812 } … … 853 820 std::string attr_name=reinterpret_cast<const char*>(attr->name); 854 821 std::string attr_value=reinterpret_cast<const char*>(attr->children->content); 855 if( attr_name == "rate_mmPerHour_rain" ) 856 { 857 std::stringstream sstr(attr_value); 858 sstr >> rate_mmPerHour_rain; 859 } 860 if( attr_name == "rate_mmPerHour_drySnow" ) 861 { 862 std::stringstream sstr(attr_value); 863 sstr >> rate_mmPerHour_drySnow; 864 } 865 if( attr_name == "rate_mmPerHour_wetSnow" ) 866 { 867 std::stringstream sstr(attr_value); 868 sstr >> rate_mmPerHour_wetSnow; 869 } 870 if( attr_name == "rate_mmPerHour_sleet" ) 871 { 872 std::stringstream sstr(attr_value); 873 sstr >> rate_mmPerHour_sleet; 874 } 822 if( attr_name == "rate_mmPerHour_rain" ) rate_mmPerHour_rain = util::strToDouble(attr_value); 823 if( attr_name == "rate_mmPerHour_drySnow" ) rate_mmPerHour_drySnow = util::strToDouble(attr_value); 824 if( attr_name == "rate_mmPerHour_wetSnow" ) rate_mmPerHour_wetSnow = util::strToDouble(attr_value); 825 if( attr_name == "rate_mmPerHour_sleet" ) rate_mmPerHour_sleet = util::strToDouble(attr_value); 826 875 827 attr = attr->next; 876 828 }
Note: See TracChangeset
for help on using the changeset viewer.