ad_physics
AngularVelocity3D.hpp
Go to the documentation of this file.
1 /*
2  * ----------------- BEGIN LICENSE BLOCK ---------------------------------
3  *
4  * Copyright (C) 2018-2020 Intel Corporation
5  *
6  * SPDX-License-Identifier: MIT
7  *
8  * ----------------- END LICENSE BLOCK -----------------------------------
9  */
10 
18 #pragma once
19 
20 #include <iostream>
21 #include <limits>
22 #include <memory>
23 #include <sstream>
28 namespace ad {
32 namespace physics {
33 
40 {
44  typedef std::shared_ptr<AngularVelocity3D> Ptr;
45 
49  typedef std::shared_ptr<AngularVelocity3D const> ConstPtr;
50 
54  AngularVelocity3D() = default;
55 
59  ~AngularVelocity3D() = default;
60 
64  AngularVelocity3D(const AngularVelocity3D &other) = default;
65 
69  AngularVelocity3D(AngularVelocity3D &&other) = default;
70 
78  AngularVelocity3D &operator=(const AngularVelocity3D &other) = default;
79 
87  AngularVelocity3D &operator=(AngularVelocity3D &&other) = default;
88 
96  bool operator==(const AngularVelocity3D &other) const
97  {
98  return (x == other.x) && (y == other.y) && (z == other.z);
99  }
100 
108  bool operator!=(const AngularVelocity3D &other) const
109  {
110  return !operator==(other);
111  }
112 
117 
122 
127 };
128 
129 } // namespace physics
130 } // namespace ad
131 
135 #ifndef GEN_GUARD_AD_PHYSICS_ANGULARVELOCITY3D
136 #define GEN_GUARD_AD_PHYSICS_ANGULARVELOCITY3D
137 
140 namespace ad {
144 namespace physics {
145 
155 inline std::ostream &operator<<(std::ostream &os, AngularVelocity3D const &_value)
156 {
157  os << "AngularVelocity3D(";
158  os << "x:";
159  os << _value.x;
160  os << ",";
161  os << "y:";
162  os << _value.y;
163  os << ",";
164  os << "z:";
165  os << _value.z;
166  os << ")";
167  return os;
168 }
169 
170 } // namespace physics
171 } // namespace ad
172 
173 namespace std {
177 inline std::string to_string(::ad::physics::AngularVelocity3D const &value)
178 {
179  stringstream sstream;
180  sstream << value;
181  return sstream.str();
182 }
183 } // namespace std
184 #endif // GEN_GUARD_AD_PHYSICS_ANGULARVELOCITY3D
ad
namespace ad
Definition: Acceleration.hpp:30
ad::physics::AngularVelocity3D::operator=
AngularVelocity3D & operator=(const AngularVelocity3D &other)=default
standard assignment operator
ad::physics::AngularVelocity3D::z
::ad::physics::AngularVelocity z
Definition: AngularVelocity3D.hpp:126
ad::physics::AngularVelocity3D::~AngularVelocity3D
~AngularVelocity3D()=default
standard destructor
ad::physics::AngularVelocity3D::Ptr
std::shared_ptr< AngularVelocity3D > Ptr
Smart pointer on AngularVelocity3D.
Definition: AngularVelocity3D.hpp:44
AngularVelocity.hpp
ad::physics::AngularVelocity3D
DataType AngularVelocity3D.
Definition: AngularVelocity3D.hpp:39
ad::physics::AngularVelocity3D::operator!=
bool operator!=(const AngularVelocity3D &other) const
standard comparison operator
Definition: AngularVelocity3D.hpp:108
ad::physics::AngularVelocity3D::operator==
bool operator==(const AngularVelocity3D &other) const
standard comparison operator
Definition: AngularVelocity3D.hpp:96
ad::physics::AngularVelocity3D::ConstPtr
std::shared_ptr< AngularVelocity3D const > ConstPtr
Smart pointer on constant AngularVelocity3D.
Definition: AngularVelocity3D.hpp:49
std::to_string
std::string to_string(::ad::physics::Acceleration const &value)
overload of the std::to_string for Acceleration
Definition: Acceleration.hpp:559
ad::physics::AngularVelocity
DataType AngularVelocity.
Definition: AngularVelocity.hpp:59
ad::physics::AngularVelocity3D::x
::ad::physics::AngularVelocity x
Definition: AngularVelocity3D.hpp:116
ad::physics::AngularVelocity3D::y
::ad::physics::AngularVelocity y
Definition: AngularVelocity3D.hpp:121
ad::physics::AngularVelocity3D::AngularVelocity3D
AngularVelocity3D()=default
standard constructor
ad::physics::operator<<
std::ostream & operator<<(std::ostream &os, Acceleration const &_value)
standard ostream operator
Definition: Acceleration.hpp:547