27 #include "../ParticleHandler.h"
107 position.
X=atof(x.c_str());
109 is >> position.
Y >> position.
Z >> velocity >> radius >> angle >> angularVelocity >> invMass >> invInertia >>
tangentialSprings;
Vec3D velocity
Current particle position.
void set_inertia(const Mdouble _new)
TangentialSpringParticle()
Basic Particle contructors, creates an Particle at (0,0,0) with radius, mass and inertia equal to 1...
virtual ~TangentialSpringParticle()
Particle destructor, needs to be implemented and checked if it removes tangential spring information...
void moveInHandler(int newPos)
void reverseTangentialSprings()
T * getObject(const unsigned int id) const
Gets a pointer to the Object at the specified index in the BaseHandler.
Mdouble radius
Inverse Particle inverse inertia (for computation optimization)
virtual void print(std::ostream &os) const
Particle print function, which accepts an os std::stringstream as input.
int pParticle
A pointer to the particle in contact; NULL if the contact is with a wall (The other particle is the p...
Vec3D angularVelocity
Current angular position.
Vec3D angle
non changing identifier of particle
ParticleHandler * getHandler() const
CTangentialSprings & get_TangentialSprings()
Mdouble invInertia
Particle inertia.
void oldRead(std::istream &is, std::string &x)
virtual void read(std::istream &is)
Particle read function, which accepts an os std::stringstream as input.
Member variable of #Particle storing all tangential springs of particle PI with contacting particles...
Stores the tangential spring needed to compute a tangential elastic force between particles PI...
CTangentialSprings tangentialSprings
void reset()
Resets the tangential springs.
void set_Radius(const Mdouble _new)
void set_Velocity(const Vec3D &_new)
Mdouble invMass
Particle mass.
Vec3D position
Current angular velocity.
void set_AngularVelocity(const Vec3D &_new)
void set_Angle(const Vec3D &_new)
virtual void moveInHandler(int newPos)
void print(std::ostream &os) const
Particle print function, which accepts an os std::stringstream as input.
Implementation of a 3D vector (by Vitaliy).
virtual TangentialSpringParticle * copy() const
Particle copy method. It calls to copy contrustor of this Particle, usefull for polymorfism.
void read(std::istream &is)
Particle read function, which accepts an os std::stringstream as input.
void set_Position(const Vec3D &_new)
void set_Mass(const Mdouble _new)