ParticleSystemSolver2.hpp
Go to the documentation of this file.
virtual void AccumulateForces(double timeStepInSeconds)
Accumulates forces applied to the particles.
void SetCollider(const Collider2Ptr &newCollider)
Sets the collider.
void SetGravity(const Vector2D &newGravity)
Sets the gravity.
Base class for particle-based solver builder.
Definition: ParticleSystemSolver2.hpp:192
void ResolveCollision()
Resolves any collisions occurred by the particles.
virtual void OnEndAdvanceTimeStep(double timeStepInSeconds)
Called after a time-step is completed.
const ParticleEmitter2Ptr & GetEmitter() const
Returns the emitter.
static Builder GetBuilder()
Returns builder fox ParticleSystemSolver2.
Front-end to create ParticleSystemSolver2 objects step by step.
Definition: ParticleSystemSolver2.hpp:223
std::shared_ptr< ParticleSystemSolver2 > ParticleSystemSolver2Ptr
Shared pointer type for the ParticleSystemSolver2.
Definition: ParticleSystemSolver2.hpp:186
std::shared_ptr< Collider2 > Collider2Ptr
Shared pointer type for the Collider2.
Definition: Collider.hpp:141
double GetRestitutionCoefficient() const
Gets the restitution coefficient.
std::shared_ptr< ParticleEmitter2 > ParticleEmitter2Ptr
Shared pointer for the ParticleEmitter2 type.
Definition: ParticleEmitter2.hpp:94
const VectorField2Ptr & GetWind() const
Returns the wind field.
void OnAdvanceTimeStep(double timeStepInSeconds) override
Called to advance a single time-step.
void SetRestitutionCoefficient(double newRestitutionCoefficient)
Sets the restitution coefficient.
void SetEmitter(const ParticleEmitter2Ptr &newEmitter)
Sets the emitter.
void OnInitialize() override
Initializes the simulator.
std::shared_ptr< ParticleSystemData2 > ParticleSystemData2Ptr
Shared pointer type of ParticleSystemData2.
Definition: ParticleSystemData.hpp:281
Definition: Matrix.hpp:27
Abstract base class for physics-based animation.
Definition: PhysicsAnimation.hpp:24
Definition: pybind11Utils.hpp:20
Definition: Array-Impl.hpp:19
Basic 2-D particle system solver.
Definition: ParticleSystemSolver2.hpp:36
~ParticleSystemSolver2() override=default
Default virtual destructor.
const ParticleSystemData2Ptr & GetParticleSystemData() const
Returns the particle system data.
std::shared_ptr< VectorField2 > VectorField2Ptr
Shared pointer for the VectorField2 type.
Definition: VectorField.hpp:87
void SetParticleSystemData(const ParticleSystemData2Ptr &newParticles)
Assign a new particle system data.
const Collider2Ptr & GetCollider() const
Returns the collider.
virtual void OnBeginAdvanceTimeStep(double timeStepInSeconds)
Called when a time-step is about to begin.
void SetDragCoefficient(double newDragCoefficient)
Sets the drag coefficient.
DerivedBuilder & WithRadius(double radius)
Returns builder with particle radius.
Definition: ParticleSystemSolver2.hpp:207
ParticleSystemSolver2 & operator=(const ParticleSystemSolver2 &)=delete
Deleted copy assignment operator.
DerivedBuilder & WithMass(double mass)
Returns builder with mass per particle.
Definition: ParticleSystemSolver2.hpp:214
ParticleSystemSolver2()
Constructs an empty solver.
double GetDragCoefficient() const
Returns the drag coefficient.