Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F94987838
particlesystem.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Dec 11, 23:26
Size
1 KB
Mime Type
text/x-c++
Expires
Fri, Dec 13, 23:26 (2 d)
Engine
blob
Format
Raw Data
Handle
22908503
Attached To
rSYMKIT symkit
particlesystem.h
View Options
#ifndef ABSTRACTSYSTEM_H
#define ABSTRACTSYSTEM_H
#include "skactor.h"
#include "specs/evolvable.h"
#include "specs/renderable.h"
#include "specs/positionable.h"
#include <list>
class Particle;
class ParticleSystem : public SKActor, public Evolvable, public Renderable, public Positionable
{
public:
ParticleSystem( const SVector<3>& offset = {0,0,0},
const QString& label = "",
specs_t flags = S_EVOLVE | S_RENDER | S_POSITION);
ParticleSystem(const std::initializer_list<Particle*>&);
virtual void evolve(float) override;
SPECS_EVOLVE
SPECS_RENDER
/* A system doesn't implement a fill mode */
virtual bool isFillMode() const override
{
return true;
}
/* Generate Positioning methods */
SPECS_POSITION
virtual SVector<3> position() const override;
void setOffset(const SVector<3>&);
/* Loop through the system components */
typedef std::list<Particle*>::iterator iterator;
typedef std::list<Particle*>::const_iterator const_iterator;
iterator begin();
iterator end();
const_iterator begin() const;
const_iterator end() const;
/* Add/remove components */
virtual void attach(Particle*);
virtual void detach(Particle*);
void detachAll();
virtual void render(symkit::render_s &) override;
private:
SVector<3> offset;
std::list<Particle*> particles;
};
#endif // ABSTRACTSYSTEM_H
Event Timeline
Log In to Comment