Chrono::Engine C++ API
Public Member Functions
chrono::ChIndexedParticles Class Reference

#include <ChIndexedParticles.h>

Inheritance diagram for chrono::ChIndexedParticles:
Inheritance graph
[legend]
Collaboration diagram for chrono::ChIndexedParticles:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ChIndexedParticles ()
 ~ChIndexedParticles ()
virtual unsigned int GetNparticles ()=0
virtual ChParticleBaseGetParticle (unsigned int n)=0
virtual void ResizeNparticles (int newsize)=0
virtual void AddParticle (ChCoordsys< double > initial_state=CSYSNORM)=0
virtual int GetDOF ()
virtual ChFrame GetAssetsFrame (unsigned int nclone=0)
virtual unsigned int GetAssetsFrameNclones ()
void StreamIN (ChStreamInBinary &mstream)
void StreamOUT (ChStreamOutBinary &mstream)

Detailed Description

Interface class for clusters of particles that can be accessed with an index. Must be inherited by children classes.


Constructor & Destructor Documentation

chrono::ChIndexedParticles::ChIndexedParticles ( )

CLASS FOR PARTICLE CLUSTER.

Build a cluster of particles. By default the cluster will contain 0 particles.


Member Function Documentation

virtual void chrono::ChIndexedParticles::AddParticle ( ChCoordsys< double >  initial_state = CSYSNORM) [pure virtual]

Add a new particle to the particle cluster, passing a coordinate system as initial state.

Implemented in chrono::ChParticlesClones.

virtual ChFrame chrono::ChIndexedParticles::GetAssetsFrame ( unsigned int  nclone = 0) [virtual]

Get the master coordinate system for the assets (this will return the main coordinate system of the rigid body)

Reimplemented from chrono::ChPhysicsItem.

virtual unsigned int chrono::ChIndexedParticles::GetAssetsFrameNclones ( ) [virtual]

Optionally, a ChPhysicsItem can return multiple asset coordinate systems; this can be helpful if, for example, when a ChPhysicsItem contains 'clones' with the same assets (ex. lot of particle with the same visualization shape). If so, returns Nclones >0 , the number of clones including the original. Then use GetAssetsFrame(n), n=0...Nclones-1, to access the corresponding coord.frame.

Reimplemented from chrono::ChPhysicsItem.

virtual void chrono::ChIndexedParticles::ResizeNparticles ( int  newsize) [pure virtual]

Resize the particle cluster. Also clear the state of previously created particles, if any.

Implemented in chrono::ChParticlesClones.

void chrono::ChIndexedParticles::StreamIN ( ChStreamInBinary mstream) [virtual]

Method to allow deserializing a persistent binary archive (ex: a file) into transient data.

Reimplemented from chrono::ChPhysicsItem.

Reimplemented in chrono::ChParticlesClones.

void chrono::ChIndexedParticles::StreamOUT ( ChStreamOutBinary mstream) [virtual]

Method to allow serializing transient data into a persistent binary archive (ex: a file).

Reimplemented from chrono::ChPhysicsItem.

Reimplemented in chrono::ChParticlesClones.