OSVR-Core
SkeletonC.h
Go to the documentation of this file.
1 
11 // Copyright 2015 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_SkeletonC_h_GUID_999D5F46_F1C3_41B5_0EEC_9746ACBA9270
26 #define INCLUDED_SkeletonC_h_GUID_999D5F46_F1C3_41B5_0EEC_9746ACBA9270
27 
28 /* Internal Includes */
29 #include <osvr/ClientKit/Export.h>
30 #include <osvr/Util/APIBaseC.h>
32 #include <osvr/Util/ReturnCodesC.h>
33 #include <osvr/Util/SkeletonC.h>
34 
35 /* Library/third-party includes */
36 /* none */
37 
38 /* Standard includes */
39 #include <stdint.h>
40 
41 OSVR_EXTERN_C_BEGIN
42 
64 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetSkeletonBoneId(
65  OSVR_Skeleton skel, const char *boneName, OSVR_SkeletonBoneCount *boneId);
66 
74 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetSkeletonStringBoneNameLength(
75  OSVR_Skeleton skel, OSVR_SkeletonBoneCount boneId, uint32_t *len);
76 
87 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode
89  char *boneName, uint32_t len);
90 
96 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetSkeletonBoneState(
98  OSVR_SkeletonBoneState *state);
99 
106 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetSkeletonAvailableJointId(
107  OSVR_Skeleton skel, OSVR_SkeletonJointCount jointIndex,
108  OSVR_SkeletonJointCount *jointId);
109 
116 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetSkeletonAvailableBoneId(
117  OSVR_Skeleton skel, OSVR_SkeletonBoneCount boneIndex,
118  OSVR_SkeletonBoneCount *boneId);
119 
127 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode
128 osvrClientGetSkeletonJointId(OSVR_Skeleton skel, const char *jointName,
129  OSVR_SkeletonJointCount *jointId);
130 
138 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode
140  OSVR_SkeletonJointCount jointId,
141  uint32_t *len);
142 
153 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetSkeletonJointName(
154  OSVR_Skeleton skel, OSVR_SkeletonJointCount boneId, char *jointName,
155  uint32_t len);
156 
162 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetSkeletonJointState(
164  OSVR_SkeletonJointState *state);
165 
170 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetSkeletonNumBones(
171  OSVR_Skeleton skel, OSVR_SkeletonBoneCount *numBones);
172 
177 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetSkeletonNumJoints(
178  OSVR_Skeleton skel, OSVR_SkeletonJointCount *numJoints);
179 
183 OSVR_EXTERN_C_END
184 
185 #endif // INCLUDED_SkeletonC_h_GUID_999D5F46_F1C3_41B5_0EEC_9746ACBA9270
Header declaring a type and values for simple C return codes.
OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetSkeletonAvailableJointId(OSVR_Skeleton skel, OSVR_SkeletonJointCount jointIndex, OSVR_SkeletonJointCount *jointId)
Get the jointId for a given available joint.
Definition: SkeletonC.cpp:135
OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetSkeletonBoneId(OSVR_Skeleton skel, const char *boneName, OSVR_SkeletonBoneCount *boneId)
OSVR_Skeleton provides an API to iterate over articulation tree and get skeleton related information ...
Definition: SkeletonC.cpp:56
OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetSkeletonStringJointNameLength(OSVR_Skeleton skel, OSVR_SkeletonJointCount jointId, uint32_t *len)
Get the length of a string parameter associated with the given jointId.
Definition: SkeletonC.cpp:173
typedefOSVR_EXTERN_C_BEGIN struct OSVR_SkeletonObject * OSVR_Skeleton
Opaque type of a skeleton configuration.
Definition: SkeletonC.h:40
A state of a single skeleton bone.
Definition: ClientReportTypesC.h:358
uint32_t OSVR_SkeletonBoneCount
integer type specifying bone count/index(Id)
Definition: ClientReportTypesC.h:348
OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetSkeletonNumJoints(OSVR_Skeleton skel, OSVR_SkeletonJointCount *numJoints)
Get the number of joints available for a given skeleton.
Definition: SkeletonC.cpp:250
OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetSkeletonNumBones(OSVR_Skeleton skel, OSVR_SkeletonBoneCount *numBones)
Get the number of bones available for a given skeleton.
Definition: SkeletonC.cpp:241
A state of a single skeleton joint.
Definition: ClientReportTypesC.h:351
OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetSkeletonJointState(OSVR_Skeleton skel, OSVR_SkeletonJointCount jointId, OSVR_SkeletonJointState *state)
Get skeleton joint state for given joint Id.
Definition: SkeletonC.cpp:220
OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetSkeletonStringBoneNameLength(OSVR_Skeleton skel, OSVR_SkeletonBoneCount boneId, uint32_t *len)
Get the length of a string parameter associated with the given boneId.
Definition: SkeletonC.cpp:68
Header providing basic C macros for defining API headers.
OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetSkeletonJointId(OSVR_Skeleton skel, const char *jointName, OSVR_SkeletonJointCount *jointId)
Convert a given jointName to the jointId.
Definition: SkeletonC.cpp:161
Header.
OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetSkeletonJointName(OSVR_Skeleton skel, OSVR_SkeletonJointCount boneId, char *jointName, uint32_t len)
Convert the jointId to the joint name.
Definition: SkeletonC.cpp:193
OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetSkeletonBoneName(OSVR_Skeleton skel, OSVR_SkeletonBoneCount boneId, char *boneName, uint32_t len)
Convert the boneId to the bone name.
Definition: SkeletonC.cpp:88
uint32_t OSVR_SkeletonJointCount
integer type specifying joint count/index(Id)
Definition: ClientReportTypesC.h:345
OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetSkeletonBoneState(OSVR_Skeleton skel, OSVR_SkeletonBoneCount boneId, OSVR_SkeletonBoneState *state)
Get skeleton bone state for given boneId.
Definition: SkeletonC.cpp:114
OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrClientGetSkeletonAvailableBoneId(OSVR_Skeleton skel, OSVR_SkeletonBoneCount boneIndex, OSVR_SkeletonBoneCount *boneId)
Get the boneId for a given available bone.
Definition: SkeletonC.cpp:148