Changeset 10334

Show
Ignore:
Timestamp:
06/11/09 17:13:04 (5 years ago)
Author:
robert
Message:

Fixed copy constructor

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgParticle/PrecipitationEffect.cpp

    r10333 r10334  
    116116} 
    117117 
     118 
     119PrecipitationEffect::PrecipitationEffect(const PrecipitationEffect& copy, const osg::CopyOp& copyop): 
     120    osg::Node(copy,copyop), 
     121    _previousFrameTime(FLT_MAX) 
     122{ 
     123    setNumChildrenRequiringUpdateTraversal(getNumChildrenRequiringUpdateTraversal()+1); 
     124 
     125    _wind = copy._wind; 
     126    _particleSpeed = copy._particleSpeed; 
     127    _particleSize = copy._particleSize; 
     128    _particleColor = copy._particleColor; 
     129    _maximumParticleDensity = copy._maximumParticleDensity; 
     130    _cellSize = copy._cellSize; 
     131    _nearTransition = copy._nearTransition; 
     132    _farTransition = copy._farTransition; 
     133 
     134    _fog = copy._fog.valid() ? dynamic_cast<osg::Fog*>(copy._fog->clone(copyop)) : 0; 
     135 
     136 
     137    _useFarLineSegments = copy._useFarLineSegments; 
     138 
     139    _dirty = true; 
     140 
     141    update(); 
     142} 
     143 
    118144void PrecipitationEffect::rain(float intensity) 
    119145{ 
     
    161187    _dirty = true; 
    162188 
    163     update(); 
    164 } 
    165  
    166 PrecipitationEffect::PrecipitationEffect(const PrecipitationEffect& copy, const osg::CopyOp& copyop): 
    167     osg::Node(copy,copyop) 
    168 { 
    169     setNumChildrenRequiringUpdateTraversal(getNumChildrenRequiringUpdateTraversal()+1);             
    170     _dirty = true; 
    171189    update(); 
    172190}