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> 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;
100 std::shared_ptr<std::map<std::string, BoneData>>
m_bones;
124 osg::ref_ptr<osg::MatrixTransform>
m_base;
130 #if defined(_MSC_VER) 134 #endif // SURGSIM_GRAPHICS_OSGSKELETONREPRESENTATION_H Definition: CompoundShapeToGraphics.cpp:29
std::shared_ptr< std::map< std::string, BoneData > > m_bones
The named map of the bones in this skeleton.
Definition: OsgSkeletonRepresentation.h:100
std::shared_ptr< SurgSim::Framework::Logger > m_logger
The logger for this class.
Definition: OsgSkeletonRepresentation.h:94
osg::ref_ptr< osg::MatrixTransform > m_base
The first MatrixTransform node.
Definition: OsgSkeletonRepresentation.h:124
Skeleton representation is used to move a mesh based on the movements of pre-selected control points ...
Definition: OsgSkeletonRepresentation.h:50
osg::ref_ptr< osg::Shader > m_skinningShader
The hardware skinning shader.
Definition: OsgSkeletonRepresentation.h:112
Skeleton representation is used to move a mesh based on the movements of pre-selected control points ...
Definition: SkeletonRepresentation.h:36
#define SURGSIM_CLASSNAME(ClassName)
Declare the class name of a class with the appropriate function header, do not use quotes...
Definition: Macros.h:21
osg::ref_ptr< osgUtil::UpdateVisitor > m_updateVisitor
Tree updater which updates the position of the bones.
Definition: OsgSkeletonRepresentation.h:115
std::shared_ptr< OsgModel > m_model
The model containing the bone and mesh information.
Definition: OsgSkeletonRepresentation.h:97
Eigen::Transform< double, 3, Eigen::Isometry > RigidTransform3d
A 3D rigid (isometric) transform, represented as doubles.
Definition: RigidTransform.h:46
boost::shared_mutex m_mutex
Mutex to access m_bones safely.
Definition: OsgSkeletonRepresentation.h:103
size_t m_frameCount
Parameter to keep track of the skeleton's frame count. Set to the UpdateVisitor.
Definition: OsgSkeletonRepresentation.h:118
Definition: OculusView.h:25
std::string m_skinningShaderFileName
The file containing the skinning shader.
Definition: OsgSkeletonRepresentation.h:109
osg::ref_ptr< osg::Node > m_skeleton
The skeleton which is read from the mesh file.
Definition: OsgSkeletonRepresentation.h:106
osg::ref_ptr< osg::Node > m_root
The root node of the skeleton tree.
Definition: OsgSkeletonRepresentation.h:121
Base OSG implementation of a graphics representation.
Definition: OsgRepresentation.h:55