HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PyImathQuatOperators.h
Go to the documentation of this file.
1 //
2 // SPDX-License-Identifier: BSD-3-Clause
3 // Copyright Contributors to the OpenEXR Project.
4 //
5 
6 // clang-format off
7 
8 #ifndef _PyImathQuatOperators_h_
9 #define _PyImathQuatOperators_h_
10 
11 #include <ImathQuat.h>
12 
13 namespace PyImath {
14 
15 template <class T>
16 struct op_quatDot {
17  static inline typename T::BaseType apply (const T &self, const T &qB)
18  { return self.euclideanInnerProduct (qB); }
19 };
20 
21 template <class T>
23  static inline void apply (T &self)
24  { self.normalize(); }
25 };
26 
27 template <class T>
29  static inline T apply (const T &self)
30  { return self.normalized(); }
31 };
32 
33 template <class T>
34 struct op_quatSlerp {
35  static inline T apply (const T &self, const T &qB, const typename T::BaseType t)
36  { return IMATH_NAMESPACE::slerpShortestArc (self, qB, t); }
37 };
38 
39 
40 } // namespace PyImath
41 
42 #endif // _PyImathQuatOperators_h_
static T::BaseType apply(const T &self, const T &qB)
static T apply(const T &self, const T &qB, const typename T::BaseType t)
GLdouble t
Definition: glad.h:2397
static T apply(const T &self)
static void apply(T &self)
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Quat< T > slerpShortestArc(const Quat< T > &q1, const Quat< T > &q2, T t) IMATH_NOEXCEPT
Definition: ImathQuat.h:593