PeriDyno 1.0.0
Loading...
Searching...
No Matches
PoissonEmitter.h
Go to the documentation of this file.
1
16#pragma once
17#include "ParticleEmitter.h"
18
19#include "Topology/EdgeSet.h"
21
22namespace dyno
23{
24 template<typename TDataType>
25 class PoissonEmitter : public ParticleEmitter<TDataType>
26 {
28 public:
29 typedef typename TDataType::Real Real;
30 typedef typename TDataType::Coord Coord;
31
33 virtual ~PoissonEmitter();
34
35 //void advance(Real dt) override;
36 public:
37 DEF_VAR(Real, Width, 0.1, "Emitter width");
38 DEF_VAR(Real, Height, 0.1, "Emitter height");
39 //DEF_VAR(Real, SamplingDistance, 0.015f, "Particle sampling distance");
40 DEF_VAR(uint, DelayStart, 0, "Delay start frame");
41 DEF_INSTANCE_STATE(EdgeSet<TDataType>, Outline, "Outline of the emitter");
42
43 DECLARE_ENUM(EmitterShape,
44 Square = 0,
45 Round = 1);
46
47 DEF_ENUM(EmitterShape, EmitterShape, EmitterShape::Round, "ScaleMode");
48
49 protected:
50 void resetStates() override;
51
52 void generateParticles() override;
53
54 private:
55 void tranformChanged();
56
58
59 std::shared_ptr< PoissonPlane<TDataType>> mPlane;
60 };
61
63}
#define DECLARE_TCLASS(name, T1)
Definition Object.h:87
#define IMPLEMENT_TCLASS(name, T1)
Definition Object.h:103
TDataType::Coord Coord
DEF_ENUM(EmitterShape, EmitterShape, EmitterShape::Round, "ScaleMode")
std::shared_ptr< PoissonPlane< TDataType > > mPlane
void resetStates() override
void generateParticles() override
DEF_INSTANCE_STATE(EdgeSet< TDataType >, Outline, "Outline of the emitter")
DEF_VAR(Real, Height, 0.1, "Emitter height")
TDataType::Real Real
DEF_VAR(uint, DelayStart, 0, "Delay start frame")
DEF_VAR(Real, Width, 0.1, "Emitter width")
DECLARE_ENUM(EmitterShape, Square=0, Round=1)
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25
unsigned int uint
Definition VkProgram.h:14