OSVR-Core
PinholeCameraFlip.h
Go to the documentation of this file.
1 
11 // Copyright 2016 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_PinholeCameraFlip_h_GUID_3FDD8165_096C_4DBA_1E42_20EF78AD28C8
26 #define INCLUDED_PinholeCameraFlip_h_GUID_3FDD8165_096C_4DBA_1E42_20EF78AD28C8
27 
28 // Internal Includes
29 #include "UsefulQuaternions.h"
30 
31 // Library/third-party includes
33 
34 // Standard includes
35 #include <type_traits>
36 
37 namespace osvr {
38 namespace vbtracker {
39 #if 0
41  Eigen::Quaterniond &rot) {
42 #endif
43  template <typename VecType>
44  inline void pinholeCameraFlipPose(VecType &&xlate,
45  Eigen::Quaterniond &rot) {
46 #if 0
47  EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Derived, 3);
48  static_assert(std::is_same<double, typename Derived::Scalar>::value,
49  "Translation scalar type must also be double.");
50 #endif
51 
53  xlate *= -1;
55  rot = get180aboutZ() * rot;
56  }
57 
58 #if 0
59  inline void
62 #endif
63  template <typename Vec1, typename Vec2>
64  inline void pinholeCameraFlipVelocities(Vec1 &&linVel, Vec2 &&angVel) {
65 #if 0
66  EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Derived1, 3);
67  EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Derived2, 3);
68  static_assert(std::is_same<typename Derived1::Scalar,
69  typename Derived2::Scalar>::value,
70  "Velocities must have the same scalar type.");
71 #endif
72 
74  linVel *= -1;
76  angVel = get180aboutZ() * angVel;
77  }
78 
79 } // namespace vbtracker
80 } // namespace osvr
81 
82 #endif // INCLUDED_PinholeCameraFlip_h_GUID_3FDD8165_096C_4DBA_1E42_20EF78AD28C8
void pinholeCameraFlipPose(VecType &&xlate, Eigen::Quaterniond &rot)
Definition: PinholeCameraFlip.h:44
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
Header wrapping include of <Eigen/Core> and <Eigen/Geometry> for warning quieting.
A matrix or vector expression mapping an existing expressions.
Definition: Ref.h:17
Definition: Quaternion.h:47
void pinholeCameraFlipVelocities(Vec1 &&linVel, Vec2 &&angVel)
Definition: PinholeCameraFlip.h:64
double Scalar
Common scalar type.
Definition: FlexibleKalmanBase.h:48