Go to the documentation of this file.
16 #ifndef SURGSIM_BLOCKS_TRANSFERPARTICLESTOPOINTCLOUDBEHAVIOR_H
17 #define SURGSIM_BLOCKS_TRANSFERPARTICLESTOPOINTCLOUDBEHAVIOR_H
32 class PointCloudRepresentation;
42 SURGSIM_STATIC_REGISTRATION(TransferParticlesToPointCloudBehavior);
56 void setSource(
const std::shared_ptr<SurgSim::Framework::Component>& source);
60 void setTarget(
const std::shared_ptr<SurgSim::Framework::Component>& target);
64 std::shared_ptr<SurgSim::Particles::Representation>
getSource()
const;
68 std::shared_ptr<SurgSim::Graphics::PointCloudRepresentation>
getTarget()
const;
70 void update(
double dt)
override;
77 std::shared_ptr<SurgSim::Particles::Representation>
m_source;
80 std::shared_ptr<SurgSim::Graphics::PointCloudRepresentation>
m_target;
86 #endif // SURGSIM_BLOCKS_TRANSFERPARTICLESTOPOINTCLOUDBEHAVIOR_H
Behavior to copy positions of a Particles::Representation to a PointCloud.
Definition: TransferParticlesToPointCloudBehavior.h:46
Base class for mesh structures, handling basic vertex functionality.
Definition: Vertices.h:52
Behaviors perform actions.
Definition: Behavior.h:41
Definition: CompoundShapeToGraphics.cpp:30
std::shared_ptr< SurgSim::Graphics::PointCloudRepresentation > m_target
The Graphics PointCloud Representation to which the vertices's positions are set.
Definition: TransferParticlesToPointCloudBehavior.h:80
std::shared_ptr< SurgSim::Particles::Representation > getSource() const
Get the particles representation which sends the positions.
Definition: TransferParticlesToPointCloudBehavior.cpp:60
void setSource(const std::shared_ptr< SurgSim::Framework::Component > &source)
Set the representation from which the positions are from.
Definition: TransferParticlesToPointCloudBehavior.cpp:46
std::shared_ptr< SurgSim::Graphics::PointCloudRepresentation > getTarget() const
Get the point cloud representation which receives the positions.
Definition: TransferParticlesToPointCloudBehavior.cpp:66
void setTarget(const std::shared_ptr< SurgSim::Framework::Component > &target)
Set the point cloud representation which will receive the positions.
Definition: TransferParticlesToPointCloudBehavior.cpp:53
bool doWakeUp() override
Interface to be implemented by derived classes.
Definition: TransferParticlesToPointCloudBehavior.cpp:81
bool doInitialize() override
Interface to be implemented by derived classes.
Definition: TransferParticlesToPointCloudBehavior.cpp:76
SURGSIM_CLASSNAME(SurgSim::Blocks::TransferParticlesToPointCloudBehavior)
void update(double dt) override
Update the behavior.
Definition: TransferParticlesToPointCloudBehavior.cpp:71
The Representation class defines the base class for all Particle System.
Definition: Representation.h:41
string(TOUPPER ${DEVICE} DEVICE_UPPER_CASE) option(BUILD_DEVICE_$
Definition: CMakeLists.txt:38
std::shared_ptr< SurgSim::Particles::Representation > m_source
The Particles::Representation from which the positions come.
Definition: TransferParticlesToPointCloudBehavior.h:77
TransferParticlesToPointCloudBehavior(const std::string &name)
Constructor.
Definition: TransferParticlesToPointCloudBehavior.cpp:37