/
redgpu
/
GDMagArchive
Обзор
Документация
Войти
/
redgpu
/
GDMagArchive
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
aug00/sharp/fluid/ParticleSys/ParticleFunctor.h
33 строки
1 KB
Don Williamson
first commit
31 окт 2016, 17:03
31 окт 2016, 17:03
c823e7b
Код
Авторство
О чём код?
#ifndef PARTICLEFUNCTOR_H #define PARTICLEFUNCTOR_H // // ParticleFunctor // // ParticleFunctor is the abstract class for all Strategies that operate on the particles of an // implicit surface. So you could have implementations that exert forces on points, implementations // that generate or destroy points, implementations that move points around, or whatever. // #include <fluid/SurfRep/PotentialPoints.h> class ParticleFunctor { public: virtual void update(PotentialPoints&, float timePassed) = 0; virtual ~ParticleFunctor() {} // Because a deep inheritance hierarchy would make this too rigid, I'm specifying "categories" // of ParticleFunctors with this enum; makes for easier maintenance and changing later. Note that // the order they're defined here is the order they'll be applied in (so all Generators get to act // each frame before all Force Exerters, for example.) enum ParticleFunctorType { GENERATOR, FORCE_EXERTER, INTEGRATOR, COLLIDER, KILLER, INVALID_TYPE }; // This can be used to query the type of a functor. Each implementation defines this. virtual ParticleFunctorType getType() = 0; protected: }; #endif //PARTICLEFUNCTOR_H