TransferPhysicsToVerticesBehavior.h
Go to the documentation of this file.
// This file is a part of the OpenSurgSim project.
// Copyright 2013, SimQuest Solutions Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef SURGSIM_BLOCKS_TRANSFERPHYSICSTOVERTICESBEHAVIOR_H
#define SURGSIM_BLOCKS_TRANSFERPHYSICSTOVERTICESBEHAVIOR_H
#include "SurgSim/DataStructures/EmptyData.h"
#include "SurgSim/DataStructures/Vertices.h"
#include "SurgSim/Framework/Behavior.h"
namespace SurgSim
{
namespace Physics
{
class DeformableRepresentation;
}
namespace Graphics
{
class CurveRepresentation;
}
namespace Blocks
{
class TransferPhysicsToVerticesBehavior : public Framework::Behavior
{
public:
explicit TransferPhysicsToVerticesBehavior(const std::string& name);
std::shared_ptr<Physics::DeformableRepresentation> getSource() const;
void setSource(const std::shared_ptr<Framework::Component>& source);
std::shared_ptr<Framework::Component> getTarget() const;
void setTarget(const std::shared_ptr<Framework::Component>& target);
void update(double dt) override;
bool doInitialize() override;
bool doWakeUp() override;
private:
std::shared_ptr<Physics::DeformableRepresentation> m_source;
std::shared_ptr<Framework::Component> m_target;
DataStructures::VerticesPlain m_vertices;
};
}
}
#endif
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
Vertices.h
SurgSim::Blocks::TransferPhysicsToVerticesBehavior
Transfer Physics State to any representation that has a Vertices property, the "Vertices" property on...
Definition: TransferPhysicsToVerticesBehavior.h:41
Behavior.h
SurgSim::Blocks::TransferPhysicsToVerticesBehavior::m_source
std::shared_ptr< Physics::DeformableRepresentation > m_source
Definition: TransferPhysicsToVerticesBehavior.h:76
SurgSim::Blocks::TransferPhysicsToVerticesBehavior::m_vertices
DataStructures::VerticesPlain m_vertices
< Target representation
Definition: TransferPhysicsToVerticesBehavior.h:80
SurgSim::Framework::Behavior
Behaviors perform actions.
Definition: Behavior.h:40
SurgSim::Blocks::TransferPhysicsToVerticesBehavior::m_target
std::shared_ptr< Framework::Component > m_target
< Source representation
Definition: TransferPhysicsToVerticesBehavior.h:77
SurgSim::DataStructures::Vertices
Base class for mesh structures, handling basic vertex functionality.
Definition: Vertices.h:51
EmptyData.h