Show
Ignore:
Timestamp:
03/23/05 18:05:21 (9 years ago)
Author:
robert
Message:

Added extra controls for ParticleEffects?.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgspheresegment/osgspheresegment.cpp

    r3936 r3941  
    228228    // create particle effects 
    229229    {     
    230         osg::PositionAttitudeTransform* positionEffects = new osg::PositionAttitudeTransform; 
    231         positionEffects->setPosition(computeTerrainIntersection(terrainGeode,100.0f,100.0f)); 
    232         root->addChild(positionEffects); 
    233  
    234         osgParticle::ExplosionEffect* explosion = new osgParticle::ExplosionEffect; 
    235         osgParticle::SmokeEffect* smoke = new osgParticle::SmokeEffect; 
    236         osgParticle::FireEffect* fire = new osgParticle::FireEffect; 
    237  
    238         positionEffects->addChild(explosion); 
    239         positionEffects->addChild(smoke); 
    240         positionEffects->addChild(fire); 
    241  
    242     } 
    243      
     230        osg::Vec3 position = computeTerrainIntersection(terrainGeode,100.0f,100.0f); 
     231 
     232        osgParticle::ExplosionEffect* explosion = new osgParticle::ExplosionEffect(position, 10.0f); 
     233        osgParticle::SmokeEffect* smoke = new osgParticle::SmokeEffect(position, 10.0f); 
     234        osgParticle::FireEffect* fire = new osgParticle::FireEffect(position, 10.0f); 
     235 
     236        root->addChild(explosion); 
     237        root->addChild(smoke); 
     238        root->addChild(fire); 
     239    } 
     240     
     241    // create particle effects 
     242    {     
     243        osg::Vec3 position = computeTerrainIntersection(terrainGeode,200.0f,100.0f); 
     244 
     245        osgParticle::ExplosionEffect* explosion = new osgParticle::ExplosionEffect(position, 1.0f); 
     246        osgParticle::SmokeEffect* smoke = new osgParticle::SmokeEffect(position, 1.0f); 
     247        osgParticle::FireEffect* fire = new osgParticle::FireEffect(position, 1.0f); 
     248 
     249        root->addChild(explosion); 
     250        root->addChild(smoke); 
     251        root->addChild(fire); 
     252    } 
    244253     
    245254    // create the moving models.