Go to the documentation of this file.
16 #ifndef SURGSIM_GRAPHICS_SKELETONREPRESENTATION_H
17 #define SURGSIM_GRAPHICS_SKELETONREPRESENTATION_H
50 std::bind(&YAML::Node::as<std::string>, std::placeholders::_1));
55 std::bind(SurgSim::Framework::convert<std::string>, std::placeholders::_1));
59 typedef std::map<std::string, SurgSim::Math::RigidTransform3d> PoseMap;
71 virtual void setModel(std::shared_ptr<SurgSim::Framework::Asset> model) = 0;
74 virtual std::shared_ptr<Model>
getModel()
const = 0;
99 virtual void setNeutralBonePoses(
const std::map<std::string, SurgSim::Math::RigidTransform3d>& poses) = 0;
109 #endif // SURGSIM_GRAPHICS_SKELETONREPRESENTATION_H
std::function< void(const YAML::Node *)> DecoderType
Definition: Accessible.h:51
virtual SurgSim::Math::RigidTransform3d getBonePose(const std::string &name) const =0
Get the pose for a given bone.
virtual std::shared_ptr< Model > getModel() const =0
Eigen::Transform< double, 3, Eigen::Isometry > RigidTransform3d
A 3D rigid (isometric) transform, represented as doubles.
Definition: RigidTransform.h:46
Skeleton representation is used to move a mesh based on the movements of pre-selected control points ...
Definition: SkeletonRepresentation.h:37
#define SURGSIM_ADD_SERIALIZABLE_PROPERTY(class, type, property, getter, setter)
A macro to register a serializable property, this needs to support reading, writing and all the conve...
Definition: Accessible.h:225
virtual SurgSim::Math::RigidTransform3d getNeutralBonePose(const std::string &name) const =0
Get the neutral pose for a given bone.
virtual void setNeutralBonePoses(const std::map< std::string, SurgSim::Math::RigidTransform3d > &poses)=0
Set neutral poses for a set of bones.
virtual void setBonePose(const std::string &name, const SurgSim::Math::RigidTransform3d &pose)=0
Set the pose for a given bone.
Definition: CompoundShapeToGraphics.cpp:30
This contains a series of functions to encode and decode Eigen data structures to and from YAML nodes...
virtual void setModel(std::shared_ptr< SurgSim::Framework::Asset > model)=0
Set the current model to the model passed.
void setDecoder(const std::string &name, DecoderType decoder)
Sets the functions used to convert data from a YAML::Node.
Definition: Accessible.cpp:125
virtual std::map< std::string, SurgSim::Math::RigidTransform3d > getNeutralBonePoses() const =0
Get all the neutral poses.
void setSetter(const std::string &name, SetterType func)
Sets a setter for a given property.
Definition: Accessible.cpp:80
Base graphics representation class, which defines the interface that all graphics representations mus...
Definition: Representation.h:40
std::function< void(boost::any)> SetterType
Definition: Accessible.h:48
string(TOUPPER ${DEVICE} DEVICE_UPPER_CASE) option(BUILD_DEVICE_$
Definition: CMakeLists.txt:38
virtual void setNeutralBonePose(const std::string &name, const SurgSim::Math::RigidTransform3d &pose)=0
Set the neutral pose for a given bone.
virtual void loadModel(const std::string &fileName)=0
Convenience function to trigger the load of the model with the given filename, if successful,...
SkeletonRepresentation(const std::string &name)
Constructor.
Definition: SkeletonRepresentation.h:42