Go to the documentation of this file.
16 #ifndef SURGSIM_BLOCKS_TRANSFERPHYSICSTOPOINTCLOUDBEHAVIOR_H
17 #define SURGSIM_BLOCKS_TRANSFERPHYSICSTOPOINTCLOUDBEHAVIOR_H
32 class PointCloudRepresentation;
37 class DeformableRepresentation;
42 SURGSIM_STATIC_REGISTRATION(TransferPhysicsToPointCloudBehavior);
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::Physics::DeformableRepresentation>
getSource()
const;
68 std::shared_ptr<SurgSim::Graphics::PointCloudRepresentation>
getTarget()
const;
70 void update(
double dt)
override;
77 std::shared_ptr<SurgSim::Physics::DeformableRepresentation>
m_source;
80 std::shared_ptr<SurgSim::Graphics::PointCloudRepresentation>
m_target;
86 #endif // SURGSIM_BLOCKS_TRANSFERPHYSICSTOPOINTCLOUDBEHAVIOR_H
std::shared_ptr< SurgSim::Graphics::PointCloudRepresentation > getTarget() const
Get the point cloud representation which receives the positions.
Definition: TransferPhysicsToPointCloudBehavior.cpp:66
bool doInitialize() override
Interface to be implemented by derived classes.
Definition: TransferPhysicsToPointCloudBehavior.cpp:82
Behaviors perform actions.
Definition: Behavior.h:40
void update(double dt) override
Update the behavior.
Definition: TransferPhysicsToPointCloudBehavior.cpp:71
Definition: CompoundShapeToGraphics.cpp:29
Behavior to copy positions of a PhysicsRepresentation to a PointCloud.
Definition: TransferPhysicsToPointCloudBehavior.h:45
void setTarget(const std::shared_ptr< SurgSim::Framework::Component > &target)
Set the point cloud representation which will receive the positions.
Definition: TransferPhysicsToPointCloudBehavior.cpp:54
bool doWakeUp() override
Interface to be implemented by derived classes.
Definition: TransferPhysicsToPointCloudBehavior.cpp:87
std::shared_ptr< SurgSim::Physics::DeformableRepresentation > getSource() const
Get the Physics representation which sends the positions.
Definition: TransferPhysicsToPointCloudBehavior.cpp:61
SURGSIM_CLASSNAME(SurgSim::Blocks::TransferPhysicsToPointCloudBehavior)
TransferPhysicsToPointCloudBehavior(const std::string &name)
Constructor.
Definition: TransferPhysicsToPointCloudBehavior.cpp:38
std::shared_ptr< SurgSim::Graphics::PointCloudRepresentation > m_target
The Graphics PointCloud Representation to which the vertices' positions are set.
Definition: TransferPhysicsToPointCloudBehavior.h:80
std::shared_ptr< SurgSim::Physics::DeformableRepresentation > m_source
The DeformableRepresentation from which the Ode state comes.
Definition: TransferPhysicsToPointCloudBehavior.h:77
string(TOUPPER ${DEVICE} DEVICE_UPPER_CASE) option(BUILD_DEVICE_$
Definition: CMakeLists.txt:38
void setSource(const std::shared_ptr< SurgSim::Framework::Component > &source)
Set the representation from which the positions are from.
Definition: TransferPhysicsToPointCloudBehavior.cpp:47