16 #ifndef SURGSIM_GRAPHICS_OSGSKELETONREPRESENTATION_H 17 #define SURGSIM_GRAPHICS_OSGSKELETONREPRESENTATION_H 19 #include <boost/thread.hpp> 21 #include <osg/MatrixTransform> 22 #include <osg/ref_ptr> 23 #include <osgUtil/UpdateVisitor> 26 #include "SurgSim/Graphics/OsgRepresentation.h" 27 #include "SurgSim/Graphics/SkeletonRepresentation.h" 31 #pragma warning(disable:4250) 59 void loadModel(
const std::string& fileName)
override;
61 void setModel(std::shared_ptr<SurgSim::Framework::Asset> model)
override;
63 std::shared_ptr<Model> getModel()
const override;
67 void setSkinningShaderFileName(
const std::string& fileName);
70 std::string getSkinningShaderFileName()
const;
81 void setNeutralBonePoses(
const std::map<std::string, SurgSim::Math::RigidTransform3d>& poses)
override;
83 std::map<std::string, SurgSim::Math::RigidTransform3d> getNeutralBonePoses()
const override;
85 void doUpdate(
double dt)
override;
87 bool doInitialize()
override;
94 std::shared_ptr<SurgSim::Framework::Logger> m_logger;
97 std::shared_ptr<OsgModel> m_model;
100 std::shared_ptr<std::map<std::string, BoneData>> m_bones;
103 mutable boost::shared_mutex m_mutex;
106 osg::ref_ptr<osg::Node> m_skeleton;
109 std::string m_skinningShaderFileName;
112 osg::ref_ptr<osg::Shader> m_skinningShader;
115 osg::ref_ptr<osgUtil::UpdateVisitor> m_updateVisitor;
121 osg::ref_ptr<osg::Node> m_root;
124 osg::ref_ptr<osg::MatrixTransform> m_base;
130 #if defined(_MSC_VER) 134 #endif // SURGSIM_GRAPHICS_OSGSKELETONREPRESENTATION_H Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
Skeleton representation is used to move a mesh based on the movements of pre-selected control points ...
Definition: OsgSkeletonRepresentation.h:50
Skeleton representation is used to move a mesh based on the movements of pre-selected control points ...
Definition: SkeletonRepresentation.h:36
Definition: OsgImGuiHandler.h:8
Base OSG implementation of a graphics representation.
Definition: OsgRepresentation.h:55