16 #ifndef SURGSIM_PARTICLES_REPRESENTATION_H 17 #define SURGSIM_PARTICLES_REPRESENTATION_H 53 void setMaxParticles(
size_t maxParticles);
56 size_t getMaxParticles()
const;
61 bool addParticle(
const Particle& particle);
73 void removeParticle(
size_t index);
81 void update(
double dt);
85 void handleCollisions(
double dt);
89 void setCollisionRepresentation(std::shared_ptr<SurgSim::Collision::Representation> representation);
93 std::shared_ptr<SurgSim::Collision::Representation> getCollisionRepresentation()
const;
98 virtual bool doUpdate(
double dt) = 0;
104 bool doInitialize()
override;
113 std::shared_ptr<SurgSim::Framework::Logger>
m_logger;
122 #endif // SURGSIM_PARTICLES_REPRESENTATION_H Definition: CompoundShapeToGraphics.cpp:29
BufferedValue is a class to enable a representation of two values for one variable, where both values need to be accessible at the same time, one in a thread safe, single threaded context, the other in a thread unsafe context.
Definition: BufferedValue.h:33
The Representation class defines the base class for all Particle System.
Definition: Representation.h:40
DataStructures::Vertices< ParticleData > Particles
Definition: Particles.h:53
Vertex structure for meshes.
Definition: Vertex.h:44
std::unordered_map< std::shared_ptr< SurgSim::Collision::Representation >, std::list< std::shared_ptr< SurgSim::Collision::Contact > > > ContactMapType
Definition: Representation.h:47
SurgSim::DataStructures::BufferedValue< Particles > m_particles
BufferedValue of particles.
Definition: Representation.h:110
Definitions of small fixed-size vector types.
size_t m_maxParticles
Maximum amount of particles allowed in this particle system.
Definition: Representation.h:107
Representations are manifestations of a SceneElement.
Definition: Representation.h:33
std::shared_ptr< SurgSim::Collision::Representation > m_collisionRepresentation
This entity's collision representation.
Definition: Representation.h:116
std::shared_ptr< SurgSim::Framework::Logger > m_logger
Logger used by the particle system.
Definition: Representation.h:113
Eigen::Matrix< double, 3, 1 > Vector3d
A 3D vector of doubles.
Definition: Vector.h:57