A special list with convenience methods for working with sets of particles.
More...
#include <tfParticleList.h>
|
|
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.
|
| |
|
|
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.
◆ all()
returns an instance populated with all current particles
- Returns
- ParticleList*
◆ extend()
| uint16_t TissueForge::ParticleList::extend |
( |
const ParticleList & | other | ) |
|
inserts the contents of another list
- Parameters
-
◆ fromString()
| static ParticleList * TissueForge::ParticleList::fromString |
( |
const std::string & | str | ) |
|
|
static |
Create from a JSON string representation.
- Parameters
-
- Returns
- ParticleList*
◆ has() [1/2]
| bool TissueForge::ParticleList::has |
( |
const int32_t & | pid | ) |
|
Test whether the list has an id
◆ has() [2/2]
Test whether the list has a particle
◆ insert()
| uint16_t TissueForge::ParticleList::insert |
( |
const ParticleHandle * | particle | ) |
|
Inserts the given particle into the list, returns the index of the item.
- Parameters
-
| particle | particle to insert |
- Returns
- uint16_t
◆ item()
looks for the item at the given index and returns it if found, otherwise returns NULL
- Parameters
-
- Returns
- ParticleHandle*
◆ operator[]()
| int32_t TissueForge::ParticleList::operator[] |
( |
const size_t & | i | ) |
|
get an item at a given index
◆ remove()
| uint16_t TissueForge::ParticleList::remove |
( |
int32_t | id | ) |
|
looks for the item with the given id and deletes it form the list
- Parameters
-
- Returns
- uint16_t
◆ reserve()
| HRESULT TissueForge::ParticleList::reserve |
( |
size_t | _nr_parts | ) |
|
Reserve enough storage for a given number of items.
- Parameters
-
- Returns
- HRESULT
◆ setMutable()
| void TissueForge::ParticleList::setMutable |
( |
const bool & | _flag | ) |
|
Set whether the list is mutable.
- Parameters
-
| flag | flag signifying whether the list is mutable |
◆ setOwnsData()
| void TissueForge::ParticleList::setOwnsData |
( |
const bool & | _flag | ) |
|
Set whether the list owns its data.
- Parameters
-
| flag | flag signifying whether the list owns its data |
◆ sphericalPositions()
| std::vector< FVector3 > TissueForge::ParticleList::sphericalPositions |
( |
FVector3 * | origin = NULL | ) |
|
Get the spherical coordinates of each particle.
- Parameters
-
| origin | optional origin of coordinates; default is center of universe |
- Returns
- std::vector<FVector3>
◆ toString()
| std::string TissueForge::ParticleList::toString |
( |
| ) |
|
Get a JSON string representation.
- Returns
- std::string
◆ vector()
| std::vector< int32_t > TissueForge::ParticleList::vector |
( |
| ) |
|
returns the list as a vector
The documentation for this struct was generated from the following file: