HEBI C++ API  3.9.0
quaternion_f.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "hebi.h"
4 
5 namespace hebi {
6 
8 struct Quaternionf {
9 public:
12  Quaternionf(float w, float x, float y, float z) : w_(w), x_(x), y_(y), z_(z) {}
13 
14 #ifndef DOXYGEN_OMIT_INTERNAL
15  Quaternionf(const HebiQuaternionf& src) : w_(src.w), x_(src.x), y_(src.y), z_(src.z) {}
18 #endif // DOXYGEN_OMIT_INTERNAL
19 
21  float getW() const { return w_; }
23  float getX() const { return x_; }
25  float getY() const { return y_; }
27  float getZ() const { return z_; }
28 
29 private:
30  float w_;
31  float x_;
32  float y_;
33  float z_;
34 };
35 
36 } // namespace hebi
float getY() const
Returns the Y component of the quaternion.
Definition: quaternion_f.hpp:25
float getW() const
Returns the W component of the quaternion.
Definition: quaternion_f.hpp:21
Definition: arm.cpp:8
float getZ() const
Returns the Z component of the quaternion.
Definition: quaternion_f.hpp:27
Structure to hold a floating point quaternion (i.e., w/x/y/z components)
Definition: quaternion_f.hpp:8
float getX() const
Returns the X component of the quaternion.
Definition: quaternion_f.hpp:23
Quaternionf(float w, float x, float y, float z)
Create a floating point quaternion from three floating point components.
Definition: quaternion_f.hpp:12