OSVR-Core
Skeleton.h
Go to the documentation of this file.
1 
11 // Copyright 2017 Sensics, Inc.
12 //
13 // Licensed under the Apache License, Version 2.0 (the "License");
14 // you may not use this file except in compliance with the License.
15 // You may obtain a copy of the License at
16 //
17 // http://www.apache.org/licenses/LICENSE-2.0
18 //
19 // Unless required by applicable law or agreed to in writing, software
20 // distributed under the License is distributed on an "AS IS" BASIS,
21 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 // See the License for the specific language governing permissions and
23 // limitations under the License.
24 
25 #ifndef INCLUDED_Skeleton_h_GUID_290D260E_2590_4B92_802E_9F90CA860F8B
26 #define INCLUDED_Skeleton_h_GUID_290D260E_2590_4B92_802E_9F90CA860F8B
27 
28 // Internal Includes
30 
31 // Library/third-party includes
32 // - none
33 
34 // Standard includes
35 #include <string>
36 
38  public:
39  OSVR_CLIENT_EXPORT
41  osvr::common::PathTree const &articulationTree);
42  OSVR_CLIENT_EXPORT ~OSVR_SkeletonObject();
43 
44  OSVR_CLIENT_EXPORT bool getBoneId(const char *boneName,
45  OSVR_SkeletonBoneCount *boneId) const;
46  OSVR_CLIENT_EXPORT bool
47  getAvailableBoneId(OSVR_SkeletonBoneCount boneIndex,
48  OSVR_SkeletonBoneCount *boneId) const;
49  OSVR_CLIENT_EXPORT bool
50  getAvailableJointId(OSVR_SkeletonJointCount jointIndex,
51  OSVR_SkeletonJointCount *jointId) const;
52  OSVR_CLIENT_EXPORT bool getJointId(const char *jointName,
53  OSVR_SkeletonJointCount *jointId) const;
54  OSVR_CLIENT_EXPORT OSVR_Pose3
55  getJointState(OSVR_SkeletonJointCount jointId) const;
56  OSVR_CLIENT_EXPORT OSVR_Pose3
57  getBoneState(OSVR_SkeletonBoneCount boneId) const;
58  OSVR_CLIENT_EXPORT OSVR_SkeletonBoneCount getNumBones() const;
59  OSVR_CLIENT_EXPORT OSVR_SkeletonJointCount getNumJoints() const;
60  OSVR_CLIENT_EXPORT std::string
61  getBoneName(OSVR_SkeletonBoneCount boneId) const;
62  OSVR_CLIENT_EXPORT std::string
63  getJointName(OSVR_SkeletonBoneCount boneId) const;
64  OSVR_CLIENT_EXPORT void
65  updateArticulationSpec(osvr::common::PathTree const &articulationTree);
66  OSVR_CLIENT_EXPORT void updateSkeletonPoses();
67 
68  private:
69  osvr::client::SkeletonConfigPtr m_cfg = nullptr;
70 };
71 
72 #endif // INCLUDED_Skeleton_h_GUID_290D260E_2590_4B92_802E_9F90CA860F8B
Definition: Skeleton.h:37
A tree representation, with path/url syntax, of the known OSVR system.
Definition: PathTree.h:43
uint32_t OSVR_SkeletonBoneCount
integer type specifying bone count/index(Id)
Definition: ClientReportTypesC.h:348
Definition: ClientContext.h:50
A structure defining a 3D (6DOF) rigid body pose: translation and rotation.
Definition: Pose3C.h:54
uint32_t OSVR_SkeletonJointCount
integer type specifying joint count/index(Id)
Definition: ClientReportTypesC.h:345