Ignore:
Timestamp:
Jan 13, 2011, 9:18:11 AM (13 years ago)
Author:
Torben Dannhauer
Message:

osgVisual now compiles and configure cloudlayer via XML.

todo at all:
cluster: channelname is currently not defined by XML. Should it be?
sky: precipitation has to be activated
XML: model configuration must be implemented
XML: only lowercase in attribute names
XML: cloudlayer should be crapped in a node called cloudlayers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • osgVisual/trunk/src/sky_Silverlining/visual_skySilverLining.cpp

    r197 r198  
    753753                float density = -1.0, rate_mmPerHour_rain = -1.0, rate_mmPerHour_drySnow = -1.0, rate_mmPerHour_wetSnow = -1.0, rate_mmPerHour_sleet = -1.0;
    754754                CloudTypes ctype = CUMULUS_CONGESTUS;
    755 
    756 
    757755
    758756                xmlAttr  *attr = cloudlayerNode_->properties;
     
    798796                }
    799797
    800                 cloudlayerNode_ = cloudlayerNode_->children;
    801                 if(!cloudlayerNode_)
     798                if(!cloudlayerNode_->children)
    802799                {
    803800                        OSG_NOTIFY( osg::ALWAYS ) << "ERROR - visual_skySilverLining::configureCloudlayerbyXML: Missing geometry specification for a cloudlayer." << std::endl;
     
    805802                }
    806803
    807                 for (xmlNode *cur_node = cloudlayerNode_; cur_node; cur_node = cur_node->next)
    808                 {
     804                for (xmlNode *cur_node = cloudlayerNode_->children; cur_node; cur_node = cur_node->next)
     805                {
     806                        node_name=reinterpret_cast<const char*>(cur_node->name);
    809807                        if(cur_node->type == XML_ELEMENT_NODE && node_name == "geometry")
    810808                        {
    811                                 xmlAttr  *attr = cloudlayerNode_->properties;
     809                                xmlAttr  *attr = cur_node->properties;
    812810                                while ( attr )
    813811                                {
     
    845843                        if(cur_node->type == XML_ELEMENT_NODE && node_name == "precipitation")
    846844                        {
    847                                 xmlAttr  *attr = cloudlayerNode_->properties;
     845                                xmlAttr  *attr = cur_node->properties;
    848846                                while ( attr )
    849847                                {
Note: See TracChangeset for help on using the changeset viewer.