aboutsummaryrefslogtreecommitdiffstats
path: root/LibOVR/Src/Tracking/Tracking_PoseState.h
diff options
context:
space:
mode:
Diffstat (limited to 'LibOVR/Src/Tracking/Tracking_PoseState.h')
-rw-r--r--LibOVR/Src/Tracking/Tracking_PoseState.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/LibOVR/Src/Tracking/Tracking_PoseState.h b/LibOVR/Src/Tracking/Tracking_PoseState.h
index 393d483..19e2ee2 100644
--- a/LibOVR/Src/Tracking/Tracking_PoseState.h
+++ b/LibOVR/Src/Tracking/Tracking_PoseState.h
@@ -5,16 +5,16 @@ Content : Describes the complete pose at a point in time, including deriva
Created : May 13, 2014
Authors : Dov Katz
-Copyright : Copyright 2014 Oculus VR, Inc. All Rights reserved.
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
-Licensed under the Oculus VR Rift SDK License Version 3.1 (the "License");
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
You may obtain a copy of the License at
-http://www.oculusvr.com/licenses/LICENSE-3.1
+http://www.oculusvr.com/licenses/LICENSE-3.2
Unless required by applicable law or agreed to in writing, the Oculus VR SDK
distributed under the License is distributed on an "AS IS" BASIS,
@@ -120,6 +120,14 @@ namespace OVR {
template<> struct CompatibleTypes<OVR::PoseState<float> > { typedef ovrPoseStatef Type; };
template<> struct CompatibleTypes<OVR::PoseState<double> > { typedef ovrPoseStated Type; };
+ static_assert((sizeof(PoseState<double>) == sizeof(Pose<double>) + 4*sizeof(Vector3<double>) + sizeof(double)), "sizeof(PoseState<double>) failure");
+#ifdef OVR_CPU_X86_64
+ static_assert((sizeof(PoseState<float>) == sizeof(Pose<float>) + 4*sizeof(Vector3<float>) + sizeof(uint32_t) + sizeof(double)), "sizeof(PoseState<float>) failure"); //TODO: Manually pad template.
+#elif defined(OVR_OS_WIN32) // The Windows 32 bit ABI aligns 64 bit values on 64 bit boundaries
+ static_assert((sizeof(PoseState<float>) == sizeof(Pose<float>) + 4*sizeof(Vector3<float>) + sizeof(uint32_t) + sizeof(double)), "sizeof(PoseState<float>) failure");
+#else // Else Unix/Apple 32 bit ABI, which aligns 64 bit values on 32 bit boundaries.
+ static_assert((sizeof(PoseState<float>) == sizeof(Pose<float>) + 4*sizeof(Vector3<float>) + sizeof(double)), "sizeof(PoseState<float>) failure");
+#endif
}
#endif // Tracking_PoseState_h