Basic 3-D particle system solver. More...
#include <Core/Solver/Particle/ParticleSystemSolver3.hpp>
Classes | |
| class | Builder |
| Front-end to create ParticleSystemSolver3 objects step by step. More... | |
Static Public Member Functions | |
| static Builder | GetBuilder () |
| Returns builder fox ParticleSystemSolver3. | |
Protected Member Functions | |
| void | OnInitialize () override |
| Initializes the simulator. | |
| void | OnAdvanceTimeStep (double timeStepInSeconds) override |
| Called to advance a single time-step. | |
| virtual void | AccumulateForces (double timeStepInSeconds) |
| Accumulates forces applied to the particles. | |
| virtual void | OnBeginAdvanceTimeStep (double timeStepInSeconds) |
| Called when a time-step is about to begin. | |
| virtual void | OnEndAdvanceTimeStep (double timeStepInSeconds) |
| Called after a time-step is completed. | |
| void | ResolveCollision () |
| Resolves any collisions occurred by the particles. | |
| void | ResolveCollision (ArrayView1< Vector3D > newPositions, ArrayView1< Vector3D > newVelocities) |
| void | SetParticleSystemData (const ParticleSystemData3Ptr &newParticles) |
| Assign a new particle system data. | |
Protected Member Functions inherited from CubbyFlow::PhysicsAnimation | |
| virtual unsigned int | GetNumberOfSubTimeSteps (double timeIntervalInSeconds) const |
| Returns the required number of sub-timesteps for given time interval. | |
Detailed Description
Basic 3-D particle system solver.
This class implements basic particle system solver. It includes gravity, air drag, and collision. But it does not compute particle-to-particle interaction. Thus, this solver is suitable for performing simple spray-like simulations with low computational cost. This class can be further extend to add more sophisticated simulations, such as SPH, to handle particle-to-particle intersection.
- See also
- SPHSolver3
Constructor & Destructor Documentation
◆ ParticleSystemSolver3() [1/4]
| CubbyFlow::ParticleSystemSolver3::ParticleSystemSolver3 | ( | ) |
Constructs an empty solver.
◆ ParticleSystemSolver3() [2/4]
Constructs a solver with particle parameters.
◆ ParticleSystemSolver3() [3/4]
|
delete |
Deleted copy constructor.
◆ ParticleSystemSolver3() [4/4]
|
deletenoexcept |
Deleted move constructor.
◆ ~ParticleSystemSolver3()
|
overridedefault |
Default virtual destructor.
Member Function Documentation
◆ AccumulateForces()
|
protectedvirtual |
Accumulates forces applied to the particles.
Reimplemented in CubbyFlow::SPHSolver3.
◆ GetBuilder()
Returns builder fox ParticleSystemSolver3.
◆ GetCollider()
| const Collider3Ptr & CubbyFlow::ParticleSystemSolver3::GetCollider | ( | ) | const |
Returns the collider.
◆ GetDragCoefficient()
| double CubbyFlow::ParticleSystemSolver3::GetDragCoefficient | ( | ) | const |
Returns the drag coefficient.
◆ GetEmitter()
| const ParticleEmitter3Ptr & CubbyFlow::ParticleSystemSolver3::GetEmitter | ( | ) | const |
Returns the emitter.
◆ GetGravity()
◆ GetParticleSystemData()
| const ParticleSystemData3Ptr & CubbyFlow::ParticleSystemSolver3::GetParticleSystemData | ( | ) | const |
Returns the particle system data.
This function returns the particle system data. The data is created when this solver is constructed and also owned by the solver.
- Returns
- The particle system data.
◆ GetRestitutionCoefficient()
| double CubbyFlow::ParticleSystemSolver3::GetRestitutionCoefficient | ( | ) | const |
Gets the restitution coefficient.
◆ GetWind()
| const VectorField3Ptr & CubbyFlow::ParticleSystemSolver3::GetWind | ( | ) | const |
Returns the wind field.
◆ OnAdvanceTimeStep()
|
overrideprotectedvirtual |
Called to advance a single time-step.
Implements CubbyFlow::PhysicsAnimation.
◆ OnBeginAdvanceTimeStep()
|
protectedvirtual |
Called when a time-step is about to begin.
Reimplemented in CubbyFlow::PCISPHSolver3, and CubbyFlow::SPHSolver3.
◆ OnEndAdvanceTimeStep()
|
protectedvirtual |
Called after a time-step is completed.
Reimplemented in CubbyFlow::SPHSolver3.
◆ OnInitialize()
|
overrideprotectedvirtual |
Initializes the simulator.
Reimplemented from CubbyFlow::PhysicsAnimation.
◆ operator=() [1/2]
|
delete |
Deleted copy assignment operator.
◆ operator=() [2/2]
|
deletenoexcept |
Deleted move assignment operator.
◆ ResolveCollision() [1/2]
|
protected |
Resolves any collisions occurred by the particles.
◆ ResolveCollision() [2/2]
|
protected |
Resolves any collisions occurred by the particles where the particle state is given by the position and velocity arrays.
◆ SetCollider()
| void CubbyFlow::ParticleSystemSolver3::SetCollider | ( | const Collider3Ptr & | newCollider | ) |
Sets the collider.
◆ SetDragCoefficient()
Sets the drag coefficient.
The drag coefficient controls the amount of air-drag. The coefficient should be a positive number and 0 means no drag force.
- Parameters
-
[in] newDragCoefficient The new drag coefficient.
◆ SetEmitter()
| void CubbyFlow::ParticleSystemSolver3::SetEmitter | ( | const ParticleEmitter3Ptr & | newEmitter | ) |
Sets the emitter.
◆ SetGravity()
◆ SetParticleSystemData()
|
protected |
Assign a new particle system data.
◆ SetRestitutionCoefficient()
| void CubbyFlow::ParticleSystemSolver3::SetRestitutionCoefficient | ( | double | newRestitutionCoefficient | ) |
Sets the restitution coefficient.
The restitution coefficient controls the bounciness of a particle when it hits a collider surface. The range of the coefficient should be 0 to 1 – 0 means no bounce back and 1 means perfect reflection.
- Parameters
-
[in] newRestitutionCoefficient The new restitution coefficient.
◆ SetWind()
| void CubbyFlow::ParticleSystemSolver3::SetWind | ( | const VectorField3Ptr & | newWind | ) |
Sets the wind.
Wind can be applied to the particle system by setting a vector field to the solver.
- Parameters
-
[in] newWind The new wind.
The documentation for this class was generated from the following file:
- Core/Solver/Particle/ParticleSystemSolver3.hpp
Public Member Functions inherited from
1.9.8