|
Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
|
A special list with convenience methods for working with sets of particles. More...
#include <tfParticleList.h>
Public Member Functions | |
| void | free () |
| HRESULT | reserve (size_t _nr_parts) |
| Reserve enough storage for a given number of items. | |
| uint16_t | insert (int32_t item) |
| uint16_t | insert (const ParticleHandle *particle) |
| Inserts the given particle into the list, returns the index of the item. | |
| uint16_t | remove (int32_t id) |
| looks for the item with the given id and deletes it form the list | |
| uint16_t | extend (const ParticleList &other) |
| inserts the contents of another list | |
| bool | has (const int32_t &pid) |
| bool | has (ParticleHandle *part) |
| ParticleHandle * | item (const int32_t &i) |
| looks for the item at the given index and returns it if found, otherwise returns NULL | |
| int32_t | operator[] (const size_t &i) |
| std::vector< int32_t > | vector () |
| FMatrix3 | getVirial () |
| FPTYPE | getRadiusOfGyration () |
| FVector3 | getCenterOfMass () |
| FVector3 | getCentroid () |
| FMatrix3 | getMomentOfInertia () |
| std::vector< FVector3 > | getPositions () |
| std::vector< FVector3 > | getVelocities () |
| std::vector< FVector3 > | getForces () |
| std::vector< FVector3 > | sphericalPositions (FVector3 *origin=NULL) |
| Get the spherical coordinates of each particle. | |
| bool | getOwnsData () const |
| Get whether the list owns its data. | |
| void | setOwnsData (const bool &_flag) |
| Set whether the list owns its data. | |
| bool | getMutable () const |
| Get whether the list is mutable. | |
| void | setMutable (const bool &_flag) |
| Set whether the list is mutable. | |
| ParticleList (uint16_t init_size, uint16_t flags=PARTICLELIST_OWNDATA|PARTICLELIST_MUTABLE) | |
| ParticleList (ParticleHandle *part) | |
| ParticleList (std::vector< ParticleHandle > particles) | |
| ParticleList (std::vector< ParticleHandle * > particles) | |
| ParticleList (uint16_t nr_parts, int32_t *parts) | |
| ParticleList (const ParticleList &other) | |
| ParticleList (const std::vector< int32_t > &pids) | |
| std::string | toString () |
| Get a JSON string representation. | |
Static Public Member Functions | |
| static ParticleList | all () |
| returns an instance populated with all current particles | |
| static ParticleList * | fromString (const std::string &str) |
| Create from a JSON string representation. | |
Public Attributes | |
| int32_t * | parts |
| int32_t | nr_parts |
| int32_t | size_parts |
| uint16_t | flags |
A special list with convenience methods for working with sets of particles.
|
static |
returns an instance populated with all current particles
| uint16_t TissueForge::ParticleList::extend | ( | const ParticleList & | other | ) |
inserts the contents of another list
| other | another list |
|
static |
Create from a JSON string representation.
| str |
| bool TissueForge::ParticleList::has | ( | ParticleHandle * | part | ) |
Test whether the list has a particle
| uint16_t TissueForge::ParticleList::insert | ( | const ParticleHandle * | particle | ) |
Inserts the given particle into the list, returns the index of the item.
| particle | particle to insert |
| ParticleHandle * TissueForge::ParticleList::item | ( | const int32_t & | i | ) |
looks for the item at the given index and returns it if found, otherwise returns NULL
| i | index of lookup |
get an item at a given index
looks for the item with the given id and deletes it form the list
| id | id to remove |
Reserve enough storage for a given number of items.
| _nr_parts | number of items |
Set whether the list is mutable.
| flag | flag signifying whether the list is mutable |
Set whether the list owns its data.
| flag | flag signifying whether the list owns its data |
Get the spherical coordinates of each particle.
| origin | optional origin of coordinates; default is center of universe |
| std::string TissueForge::ParticleList::toString | ( | ) |
Get a JSON string representation.
| std::vector< int32_t > TissueForge::ParticleList::vector | ( | ) |
returns the list as a vector