Changeset 247 for osgVisual/trunk/src


Ignore:
Timestamp:
Feb 18, 2011, 5:59:39 PM (13 years ago)
Author:
Torben Dannhauer
Message:

typo fix, clean up

Location:
osgVisual/trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • osgVisual/trunk/src/core/visual_core.cpp

    r240 r247  
    226226                if(cur_node->type == XML_ELEMENT_NODE && node_name == "datetime")
    227227                {
    228                         int hour, minute;
    229                         int day=0,month=0,year=0;
     228                        int day=-1,month=1-,year=-1, hour=-1, minute=-1;
    230229
    231230                        xmlAttr  *attr = cur_node->properties;
  • osgVisual/trunk/src/distortion/visual_distortion.cpp

    r221 r247  
    9797                                                        OSG_NOTIFY(osg::WARN) << "WARNING: Unable to parse Frustum values from '" << pre_cfg<<channelname<<post_cfg << "' -- continue without valid frustum values." << std::endl;
    9898                                        }
    99                                         if( attr_name == "renderimplemmentation" )
     99                                        if( attr_name == "renderimplementation" )
    100100                                        {
    101101                                                if(attr_value=="fbo")
  • osgVisual/trunk/src/object/object_updater.cpp

    r224 r247  
    2727        updater_rot_y_rad = object_->getName()+"_ROT_Y";
    2828        updater_rot_z_rad = object_->getName()+"_ROT_Z";
     29        updater_label = object_->getName()+"_LABEL";
     30        object_->addLabel("default", " ");
    2931}
    3032
     
    7981void object_updater::setUpdaterSlotNames( osgVisual::visual_object* object_, std::string lat_rad_, std::string lon_rad_, std::string alt_, std::string rot_x_rad_, std::string rot_y_rad_, std::string rot_z_rad_, std::string label_)
    8082{
    81         if(lat_rad_!="")
    82                 updater_lat_rad = lat_rad_;
    83         if(lon_rad_!="")
    84                 updater_lon_rad = lon_rad_;
    85         if(alt_!="")
    86                 updater_alt = alt_;
    87         if(rot_x_rad_!="")
    88                 updater_rot_x_rad = rot_x_rad_;
    89         if(rot_y_rad_!="")
    90                 updater_rot_y_rad = rot_y_rad_;
    91         if(rot_z_rad_!="")
    92                 updater_rot_z_rad = rot_z_rad_;
    93 
    94         if(label_!="")
    95                 updater_label = label_;
    96         else
    97         {
    98                 updater_label = object_->getName()+"_LABEL";
    99                 object_->addLabel("default", " ");
    100         }
     83        updater_lat_rad = lat_rad_;
     84        updater_lon_rad = lon_rad_;
     85        updater_alt = alt_;
     86        updater_rot_x_rad = rot_x_rad_;
     87        updater_rot_y_rad = rot_y_rad_;
     88        updater_rot_z_rad = rot_z_rad_;
     89        updater_label = label_;
    10190}
  • osgVisual/trunk/src/sky_Silverlining/visual_skySilverLining.cpp

    r221 r247  
    9595       
    9696        SilverLining::LocalTime t = atmosphere->GetConditions()->GetTime();
    97         t.SetHour( hour_ );
    98         t.SetMinutes( minute_ );
    99         t.SetSeconds( second_ );
     97        if(hour_) t.SetHour( hour_ );
     98        if(minute_) t.SetMinutes( minute_ );
     99        if(second_) t.SetSeconds( second_ );
    100100        atmosphere->GetConditions()->SetTime( t );
    101101}
     
    108108
    109109        SilverLining::LocalTime t = atmosphere->GetConditions()->GetTime();
    110         t.SetYear( year_ );
    111         t.SetMonth( month_ );
    112         t.SetDay( day_ );
     110        if(year_) t.SetYear( year_ );
     111        if(month_) t.SetMonth( month_ );
     112        if(day_) t.SetDay( day_ );
    113113}
    114114
Note: See TracChangeset for help on using the changeset viewer.