ParticleSystemData2.h
Go to the documentation of this file.
ConstArrayAccessor1< Vector2D > GetVelocities() const
Returns the velocity array (immutable).
double GetRadius() const
Returns the radius of the particles.
Abstract base class for any serializable class.
Definition: Serialization.h:20
void Resize(size_t newNumberOfParticles)
Resizes the number of particles of the container.
ParticleSystemData2 & operator=(const ParticleSystemData2 &other)
Copies from other particle system data.
void SetNeighborSearcher(const PointNeighborSearcher2Ptr &newNeighborSearcher)
Sets neighbor searcher.
void Set(const ParticleSystemData2 &other)
Copies from other particle system data.
void Deserialize(const std::vector< uint8_t > &buffer) override
Deserializes this particle system data from the buffer.
ConstArrayAccessor1< Vector2D > GetForces() const
Returns the force array (immutable).
size_t AddVectorData(const Vector2D &initialVal=Vector2D())
Adds a vector data layer and returns its index.
virtual void SetRadius(double newRadius)
Sets the radius of the particles.
1-D read-only array accessor class.
Definition: ArrayAccessor1.h:185
void BuildNeighborLists(double maxSearchRadius)
Builds neighbor lists with given search radius.
std::shared_ptr< ParticleSystemData2 > ParticleSystemData2Ptr
Shared pointer type of ParticleSystemData2.
Definition: ParticleSystemData2.h:250
void AddParticles(const ConstArrayAccessor1< Vector2D > &newPositions, const ConstArrayAccessor1< Vector2D > &newVelocities=ConstArrayAccessor1< Vector2D >(), const ConstArrayAccessor1< Vector2D > &newForces=ConstArrayAccessor1< Vector2D >())
Adds particles to the data structure.
void AddParticle(const Vector2D &newPosition, const Vector2D &newVelocity=Vector2D(), const Vector2D &newForce=Vector2D())
Adds a particle to the data structure.
Definition: pybind11Utils.h:24
size_t AddScalarData(double initialVal=0.0)
Adds a scalar data layer and returns its index.
ConstArrayAccessor1< Vector2D > GetPositions() const
Returns the position array (immutable).
const std::vector< std::vector< size_t > > & GetNeighborLists() const
Returns neighbor lists.
size_t GetNumberOfParticles() const
Returns the number of particles.
virtual void SetMass(double newMass)
Sets the mass of the particles.
ConstArrayAccessor1< double > ScalarDataAt(size_t idx) const
Returns custom scalar data layer at given index (immutable).
std::shared_ptr< PointNeighborSearcher2 > PointNeighborSearcher2Ptr
Shared pointer for the PointNeighborSearcher2 type.
Definition: PointNeighborSearcher2.h:79
void SerializeParticleSystemData(flatbuffers::FlatBufferBuilder *builder, flatbuffers::Offset< fbs::ParticleSystemData2 > *fbsParticleSystemData) const
void BuildNeighborSearcher(double maxSearchRadius)
Builds neighbor searcher with given search radius.
void DeserializeParticleSystemData(const fbs::ParticleSystemData2 *fbsParticleSystemData)
void Serialize(std::vector< uint8_t > *buffer) const override
Serializes this particle system data to the buffer.
const PointNeighborSearcher2Ptr & GetNeighborSearcher() const
Returns neighbor searcher.
ConstArrayAccessor1< Vector2D > VectorDataAt(size_t idx) const
Returns custom vector data layer at given index (immutable).