OSVR-Core
Pose3C.h
Go to the documentation of this file.
1 
13 /*
14 // Copyright 2014 Sensics, Inc.
15 //
16 // Licensed under the Apache License, Version 2.0 (the "License");
17 // you may not use this file except in compliance with the License.
18 // You may obtain a copy of the License at
19 //
20 // http://www.apache.org/licenses/LICENSE-2.0
21 //
22 // Unless required by applicable law or agreed to in writing, software
23 // distributed under the License is distributed on an "AS IS" BASIS,
24 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 // See the License for the specific language governing permissions and
26 // limitations under the License.
27 */
28 
29 #ifndef INCLUDED_Pose3C_h_GUID_066CFCE2_229C_4194_5D2B_2602CCD5C439
30 #define INCLUDED_Pose3C_h_GUID_066CFCE2_229C_4194_5D2B_2602CCD5C439
31 
32 /* Internal Includes */
33 
34 /* Internal Includes */
35 #include <osvr/Util/APIBaseC.h>
36 #include <osvr/Util/Vec3C.h>
37 #include <osvr/Util/QuaternionC.h>
38 
39 /* Library/third-party includes */
40 /* none */
41 
42 /* Standard includes */
43 /* none */
44 
45 OSVR_EXTERN_C_BEGIN
46 
54 typedef struct OSVR_Pose3 {
59 } OSVR_Pose3;
60 
62 OSVR_INLINE void osvrPose3SetIdentity(OSVR_Pose3 *pose) {
63  osvrQuatSetIdentity(&(pose->rotation));
64  osvrVec3Zero(&(pose->translation));
65 }
68 OSVR_EXTERN_C_END
69 
70 #endif
OSVR_INLINE void osvrPose3SetIdentity(OSVR_Pose3 *pose)
Set a pose to identity.
Definition: Pose3C.h:62
A structure defining a 3D vector, often a position/translation.
Definition: Vec3C.h:48
OSVR_INLINE void osvrVec3Zero(OSVR_Vec3 *v)
Set a Vec3 to the zero vector.
Definition: Vec3C.h:70
OSVR_Quaternion rotation
Orientation as a unit quaternion.
Definition: Pose3C.h:58
A structure defining a quaternion, often a unit quaternion representing 3D rotation.
Definition: QuaternionC.h:49
Header providing basic C macros for defining API headers.
Header.
A structure defining a 3D (6DOF) rigid body pose: translation and rotation.
Definition: Pose3C.h:54
OSVR_INLINE void osvrQuatSetIdentity(OSVR_Quaternion *q)
Set a quaternion to the identity rotation.
Definition: QuaternionC.h:72
OSVR_Vec3 translation
Position vector.
Definition: Pose3C.h:56
struct OSVR_Pose3 OSVR_Pose3
A structure defining a 3D (6DOF) rigid body pose: translation and rotation.