16 #ifndef SURGSIM_BLOCKS_TRANSFERPHYSICSTOGRAPHICSMESHBEHAVIOR_H
17 #define SURGSIM_BLOCKS_TRANSFERPHYSICSTOGRAPHICSMESHBEHAVIOR_H
37 class DeformableRepresentation;
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::MeshRepresentation>
getTarget()
const;
70 virtual void update(
double dt)
override;
77 std::shared_ptr<SurgSim::Physics::DeformableRepresentation>
m_source;
80 std::shared_ptr<SurgSim::Graphics::MeshRepresentation>
m_target;
86 #endif // SURGSIM_BLOCKS_TRANSFERPHYSICSTOGRAPHICSMESHBEHAVIOR_H
std::shared_ptr< SurgSim::Physics::DeformableRepresentation > m_source
The DeformableRepresentation from which the Ode state comes.
Definition: TransferPhysicsToGraphicsMeshBehavior.h:77
void setSource(const std::shared_ptr< SurgSim::Framework::Component > &source)
Set the representation from which the positions are from.
Definition: TransferPhysicsToGraphicsMeshBehavior.cpp:44
Definition: DriveElementFromInputBehavior.cpp:27
Graphics representation of a mesh, can be initialized from a Mesh structure.
Definition: MeshRepresentation.h:28
std::shared_ptr< SurgSim::Graphics::MeshRepresentation > getTarget() const
Get the Graphics representation which receives the positions.
Definition: TransferPhysicsToGraphicsMeshBehavior.cpp:69
std::shared_ptr< SurgSim::Graphics::MeshRepresentation > m_target
The Graphics Mesh Representation to which the vertices' positions are set.
Definition: TransferPhysicsToGraphicsMeshBehavior.h:80
std::shared_ptr< SurgSim::Physics::DeformableRepresentation > getSource() const
Get the Physics representation which sends the positions.
Definition: TransferPhysicsToGraphicsMeshBehavior.cpp:64
void setTarget(const std::shared_ptr< SurgSim::Framework::Component > &target)
Set the representation which will receive the positions.
Definition: TransferPhysicsToGraphicsMeshBehavior.cpp:54
Behaviors perform actions.
Definition: Behavior.h:40
TransferPhysicsToGraphicsMeshBehavior(const std::string &name)
Constructor.
Definition: TransferPhysicsToGraphicsMeshBehavior.cpp:35
SURGSIM_CLASSNAME(SurgSim::Blocks::TransferPhysicsToGraphicsMeshBehavior)
virtual bool doInitialize() override
Interface to be implemented by derived classes.
Definition: TransferPhysicsToGraphicsMeshBehavior.cpp:84
virtual void update(double dt) override
Update the behavior.
Definition: TransferPhysicsToGraphicsMeshBehavior.cpp:74
virtual bool doWakeUp() override
Interface to be implemented by derived classes.
Definition: TransferPhysicsToGraphicsMeshBehavior.cpp:89
SURGSIM_STATIC_REGISTRATION(DriveElementFromInputBehavior)
Behavior to copy positions of a PhysicsRepresentation to a GraphicsMesh.
Definition: TransferPhysicsToGraphicsMeshBehavior.h:45