- Timestamp:
- 03/22/05 21:26:45 (8 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgspheresegment/osgspheresegment.cpp
r3935 r3936 117 117 xform->addChild(positioned); 118 118 119 // add particle effects to cessna. 120 { 121 osg::PositionAttitudeTransform* positionEffects = new osg::PositionAttitudeTransform; 122 positionEffects->setPosition(osg::Vec3(0.0f,0.0f,0.0f)); 123 xform->addChild(positionEffects); 124 125 osgParticle::ExplosionEffect* explosion = new osgParticle::ExplosionEffect; 126 osgParticle::SmokeEffect* smoke = new osgParticle::SmokeEffect; 127 osgParticle::FireEffect* fire = new osgParticle::FireEffect; 128 129 positionEffects->addChild(explosion); 130 positionEffects->addChild(smoke); 131 positionEffects->addChild(fire); 132 } 133 119 134 model->addChild(xform); 120 135 } … … 221 236 osgParticle::FireEffect* fire = new osgParticle::FireEffect; 222 237 223 //osg::Geode* geode = new osg::Geode;224 //geode->addDrawable(new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0.0f,0.0f,0.0f),10.0f)));225 //positionEffects->addChild(geode);226 227 238 positionEffects->addChild(explosion); 228 239 positionEffects->addChild(smoke); 229 240 positionEffects->addChild(fire); 230 241 231 osgParticle::ParticleSystemUpdater *psu = new osgParticle::ParticleSystemUpdater;232 233 psu->addParticleSystem(explosion->getParticleSystem());234 psu->addParticleSystem(smoke->getParticleSystem());235 psu->addParticleSystem(fire->getParticleSystem());236 237 // add the updater node to the scene graph238 root->addChild(psu);239 242 } 240 243
