|
Revision 13041, 0.9 kB
(checked in by robert, 14 months ago)
|
|
Ran script to remove trailing spaces and tabs
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | #include <osgParticle/ModularProgram> |
|---|
| 2 | #include <osgParticle/Program> |
|---|
| 3 | #include <osgParticle/ParticleSystem> |
|---|
| 4 | #include <osgParticle/Particle> |
|---|
| 5 | |
|---|
| 6 | osgParticle::ModularProgram::ModularProgram() |
|---|
| 7 | : Program() |
|---|
| 8 | { |
|---|
| 9 | } |
|---|
| 10 | |
|---|
| 11 | osgParticle::ModularProgram::ModularProgram(const ModularProgram& copy, const osg::CopyOp& copyop) |
|---|
| 12 | : Program(copy, copyop) |
|---|
| 13 | { |
|---|
| 14 | Operator_vector::const_iterator ci; |
|---|
| 15 | for (ci=copy._operators.begin(); ci!=copy._operators.end(); ++ci) { |
|---|
| 16 | _operators.push_back(static_cast<Operator* >(copyop(ci->get()))); |
|---|
| 17 | } |
|---|
| 18 | } |
|---|
| 19 | |
|---|
| 20 | void osgParticle::ModularProgram::execute(double dt) |
|---|
| 21 | { |
|---|
| 22 | Operator_vector::iterator ci; |
|---|
| 23 | Operator_vector::iterator ci_end = _operators.end(); |
|---|
| 24 | |
|---|
| 25 | ParticleSystem* ps = getParticleSystem(); |
|---|
| 26 | for (ci=_operators.begin(); ci!=ci_end; ++ci) { |
|---|
| 27 | (*ci)->beginOperate(this); |
|---|
| 28 | (*ci)->operateParticles(ps, dt); |
|---|
| 29 | (*ci)->endOperate(); |
|---|
| 30 | } |
|---|
| 31 | } |
|---|