16 #ifndef SURGSIM_PARTICLES_REPRESENTATION_H 17 #define SURGSIM_PARTICLES_REPRESENTATION_H 22 #include "SurgSim/Collision/Representation.h" 23 #include "SurgSim/Framework/Representation.h" 25 #include "SurgSim/Particles/Particles.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;
102 virtual bool doHandleCollisions(
double dt,
const SurgSim::Collision::ContactMapType& collisions) = 0;
104 bool doInitialize()
override;
113 std::shared_ptr<SurgSim::Framework::Logger>
m_logger;
122 #endif // SURGSIM_PARTICLES_REPRESENTATION_H Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
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
Eigen::Matrix< double, 3, 1 > Vector3d
A 3D vector of doubles.
Definition: Vector.h:57
Vertex structure for meshes.
Definition: Vertex.h:44
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