InertiaSDK

Loading...
Searching...
No Matches
Quaternion.h
1#pragma once
2#ifndef INERTIA_QUATERNION_H
3#define INERTIA_QUATERNION_H
4
5 namespace inertia
6{
11 struct INERTIA_API Quaternion
12 {
13 double w;
14 double x;
15 double y;
16 double z;
17
21 Quaternion();
22
29 Quaternion(double const& w, double const& x, double const& y, double const& z);
30
35 std::vector<double> toEulerAngles(std::wstring const& order = L"ZYX") const;
36
37
42 static Quaternion normalize(Quaternion const& q);
43
48 static Quaternion inverse(Quaternion const& q);
49
55 static Quaternion multiply(Quaternion const& p, Quaternion const& q);
56
61 static Quaternion average(std::vector<Quaternion> const& qs);
62 };
63}
64
65#endif // INERTIA_QUATERNION_H
inertia
Definition FlashCommands.h:6
inertia::Quaternion::multiply
static Quaternion multiply(Quaternion const &p, Quaternion const &q)
inertia::Quaternion::w
double w
First quaternion component.
Definition Quaternion.h:13
inertia::Quaternion::toEulerAngles
std::vector< double > toEulerAngles(std::wstring const &order=L"ZYX") const
inertia::Quaternion::inverse
static Quaternion inverse(Quaternion const &q)
inertia::Quaternion::x
double x
Second quaternion component.
Definition Quaternion.h:14
inertia::Quaternion::normalize
static Quaternion normalize(Quaternion const &q)
inertia::Quaternion::z
double z
Fourth quaternion component.
Definition Quaternion.h:16
inertia::Quaternion::average
static Quaternion average(std::vector< Quaternion > const &qs)
inertia::Quaternion::Quaternion
Quaternion(double const &w, double const &x, double const &y, double const &z)
inertia::Quaternion::y
double y
Third quaternion component.
Definition Quaternion.h:15
inertia::Quaternion::Quaternion
Quaternion()