bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
body_rotation.h
Go to the documentation of this file.
1#ifndef BODY_ROTATION_H
2#define BODY_ROTATION_H
3
4#include "bitrl/bitrl_types.h"
5
6#include <initializer_list>
7#include <ostream>
8
9namespace bitrl
10{
11namespace rigid_bodies
12{
13
19{
21
23
25
29 RBRotation();
30 RBRotation(std::initializer_list<real_t> vals);
31
37 std::ostream &print(std::ostream &out) const noexcept;
38};
39
40inline RBRotation::RBRotation() : RBRotation({0.0, 0.0, 0.0}) {}
41
42inline RBRotation::RBRotation(std::initializer_list<real_t> vals) : x(0.0), y(0.0), z(0.0)
43{
44
45 auto v = vals.begin();
46 x = *v;
47 v++;
48 y = *v;
49 v++;
50 z = *v;
51}
52
53inline std::ostream &operator<<(std::ostream &out, const RBRotation &info)
54{
55 return info.print(out);
56}
57
58} // namespace rigid_bodies
59} // namespace bitrl
60
61#endif
std::ostream & operator<<(std::ostream &out, const RBRotation &info)
Definition body_rotation.h:53
Definition bitrl_consts.h:14
double real_t
real_t
Definition bitrl_types.h:23
struct RBTranslation utility struct representing
Definition body_rotation.h:19
real_t x
Definition body_rotation.h:20
real_t y
Definition body_rotation.h:22
std::ostream & print(std::ostream &out) const noexcept
print
Definition body_rotation.cpp:8
real_t z
Definition body_rotation.h:24
RBRotation()
RBTranslation. Default constructor.
Definition body_rotation.h:40