25#ifndef _MDCORE_INCLUDE_TFPARTICLELIST_H_
26#define _MDCORE_INCLUDE_TFPARTICLELIST_H_
28#include <mdcore_config.h>
38 enum ParticleListFlags {
40 PARTICLELIST_OWNDATA = 1 << 0,
43 PARTICLELIST_MUTABLE = 1 << 1
46 struct ParticleHandle;
70 uint16_t insert(int32_t item);
96 bool has(
const int32_t &pid);
123 FPTYPE getRadiusOfGyration();
127 std::vector<FVector3> getPositions();
128 std::vector<FVector3> getVelocities();
129 std::vector<FVector3> getForces();
164 ParticleList(uint16_t init_size, uint16_t flags = PARTICLELIST_OWNDATA | PARTICLELIST_MUTABLE);
Definition tfMatrix3.h:35
Include Python header, disable linking to pythonX_d.lib on Windows in debug mode.
Definition tfAngleConfig.h:26
A handle to a particle.
Definition tfParticle.h:313
A special list with convenience methods for working with sets of particles.
Definition tfParticleList.h:52
ParticleHandle * item(const int32_t &i)
looks for the item at the given index and returns it if found, otherwise returns NULL
std::vector< int32_t > vector()
bool getOwnsData() const
Get whether the list owns its data.
void setOwnsData(const bool &_flag)
Set whether the list owns its data.
bool has(ParticleHandle *part)
HRESULT reserve(size_t _nr_parts)
Reserve enough storage for a given number of items.
static ParticleList * fromString(const std::string &str)
Create from a JSON string representation.
uint16_t insert(const ParticleHandle *particle)
Inserts the given particle into the list, returns the index of the item.
uint16_t extend(const ParticleList &other)
inserts the contents of another list
int32_t operator[](const size_t &i)
bool has(const int32_t &pid)
static ParticleList all()
returns an instance populated with all current particles
std::vector< FVector3 > sphericalPositions(FVector3 *origin=NULL)
Get the spherical coordinates of each particle.
bool getMutable() const
Get whether the list is mutable.
uint16_t remove(int32_t id)
looks for the item with the given id and deletes it form the list
void setMutable(const bool &_flag)
Set whether the list is mutable.
std::string toString()
Get a JSON string representation.
int32_t HRESULT
Definition tf_port.h:255