13#ifndef INCLUDE_ASTRO_HH
14#define INCLUDE_ASTRO_HH
24#include <Eigen/Geometry>
31#define ASTRO_ERROR(MSG) \
33 std::ostringstream os; \
35 throw std::runtime_error(os.str()); \
42#define ASTRO_ASSERT(COND, MSG) \
51#define ASTRO_WARNING(MSG) \
53 std::cout << MSG << std::endl; \
58#ifndef ASTRO_ASSERT_WARNING
59#define ASTRO_ASSERT_WARNING(COND, MSG) \
87 using Matrix0 = Eigen::Matrix<Real, 0, 0>;
89 using Matrix1 = Eigen::Matrix<Real, 1, 1>;
91 using Matrix2 = Eigen::Matrix<Real, 2, 2>;
93 using Matrix3 = Eigen::Matrix<Real, 3, 3>;
95 using Matrix4 = Eigen::Matrix<Real, 4, 4>;
97 using Matrix5 = Eigen::Matrix<Real, 5, 5>;
99 using Matrix6 = Eigen::Matrix<Real, 6, 6>;
107 using VectorX = Eigen::Vector<Real, Eigen::Dynamic>;
108 using MatrixX = Eigen::Matrix<Real, Eigen::Dynamic, Eigen::Dynamic>;
112 using Scale = Eigen::DiagonalMatrix<Real, 3>;
115 using Affine = Eigen::Transform<Real, 3, Eigen::Affine>;
132 static Real const INFTY = std::numeric_limits<Real>::infinity();
221 std::ostringstream os;
223 <<
"* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *" << std::endl
224 <<
"* Copyright (c) 2025, Davide Stocco and Enrico Bertolazzi. *" << std::endl
225 <<
"* *" << std::endl
226 <<
"* The Astro project is distributed under the BSD 2-Clause License. *" << std::endl
227 <<
"* *" << std::endl
228 <<
"* Davide Stocco Enrico Bertolazzi *" << std::endl
229 <<
"* University of Trento University of Trento *" << std::endl
230 <<
"* e-mail: davide.stocco@unitn.it e-mail: enrico.bertolazzi@unitn.it *" << std::endl
231 <<
"* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *" << std::endl;
The namespace for the Astro library.
Definition Astro.hh:72
static Vector3 const ZEROS_VEC3
Definition Astro.hh:153
static Vector9 const NAN_VEC9
Definition Astro.hh:199
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Definition Astro.hh:108
static Vector8 const NAN_VEC8
Definition Astro.hh:191
static Vector7 const NAN_VEC7
Definition Astro.hh:183
static Matrix2 const IDENTITY_MAT2
Definition Astro.hh:149
static Vector5 const ONES_VEC5
Definition Astro.hh:171
static Matrix2 const ONES_MAT2
Definition Astro.hh:148
Eigen::Matrix< Real, 3, 3 > Matrix3
Definition Astro.hh:93
Eigen::Quaternion< Real > Quaternion
Definition Astro.hh:111
static Real const EPSILON_HIGH
Definition Astro.hh:129
static Vector6 const ZEROS_VEC6
Definition Astro.hh:177
static Matrix1 const ZEROS_MAT1
Definition Astro.hh:138
Eigen::Matrix< Real, 0, 0 > Matrix0
Definition Astro.hh:87
static Matrix8 const NAN_MAT8
Definition Astro.hh:192
Eigen::Matrix< Real, 7, 7 > Matrix7
Definition Astro.hh:101
static Vector9 const ONES_VEC9
Definition Astro.hh:203
int Integer
Definition Astro.hh:84
static Matrix4 const ZEROS_MAT4
Definition Astro.hh:162
Eigen::Vector< Real, 5 > Vector5
Definition Astro.hh:96
static Vector1 const ZEROS_VEC1
Definition Astro.hh:137
static Matrix6 const NAN_MAT6
Definition Astro.hh:176
static Real const EPSILON
Definition Astro.hh:126
Eigen::Transform< Real, 3, Eigen::Affine > Affine
Definition Astro.hh:115
static Matrix7 const NAN_MAT7
Definition Astro.hh:184
static Vector4 const ONES_VEC4
Definition Astro.hh:163
static Real const CBRT_EPSILON
Definition Astro.hh:128
static Vector9 const ZEROS_VEC9
Definition Astro.hh:201
static Vector6 const ONES_VEC6
Definition Astro.hh:179
Eigen::AngleAxis< Real > AngleAxis
Definition Astro.hh:114
static Vector3 const NAN_VEC3
Definition Astro.hh:151
Eigen::Vector< Real, 0 > Vector0
Definition Astro.hh:86
Eigen::Matrix< Real, 3, 3 > Rotation
Definition Astro.hh:110
static Matrix7 const ZEROS_MAT7
Definition Astro.hh:186
static Matrix6 const ONES_MAT6
Definition Astro.hh:180
static Real const SQRT_EPSILON
Definition Astro.hh:127
static Matrix1 const IDENTITY_MAT1
Definition Astro.hh:141
static Vector5 const ZEROS_VEC5
Definition Astro.hh:169
static Real const EPSILON_LOW
Definition Astro.hh:131
static Matrix3 const NAN_MAT3
Definition Astro.hh:152
static Real const QUIET_NAN
Definition Astro.hh:133
static Matrix4 const ONES_MAT4
Definition Astro.hh:164
static Matrix9 const ZEROS_MAT9
Definition Astro.hh:202
static Matrix1 const ONES_MAT1
Definition Astro.hh:140
static Vector4 const ZEROS_VEC4
Definition Astro.hh:161
Eigen::Vector< Real, 6 > Vector6
Definition Astro.hh:98
static Matrix8 const ZEROS_MAT8
Definition Astro.hh:194
static Matrix3 const ZEROS_MAT3
Definition Astro.hh:154
static Matrix2 const ZEROS_MAT2
Definition Astro.hh:146
static Vector4 const NAN_VEC4
Definition Astro.hh:159
Eigen::Vector< Real, 1 > Vector1
Definition Astro.hh:88
static Matrix4 const NAN_MAT4
Definition Astro.hh:160
Eigen::Vector< Real, 4 > Vector4
Definition Astro.hh:94
Eigen::Matrix< Real, 1, 1 > Matrix1
Definition Astro.hh:89
static Matrix7 const ONES_MAT7
Definition Astro.hh:188
static Matrix5 const IDENTITY_MAT5
Definition Astro.hh:173
double Real
Definition Astro.hh:83
static Matrix9 const ONES_MAT9
Definition Astro.hh:204
Eigen::Vector< Real, 9 > Vector9
Definition Astro.hh:104
Eigen::Matrix< Real, 6, 6 > Matrix6
Definition Astro.hh:99
Eigen::Matrix< Real, 5, 5 > Matrix5
Definition Astro.hh:97
Eigen::Vector< Real, 2 > Vector2
Definition Astro.hh:90
static Matrix3 const ONES_MAT3
Definition Astro.hh:156
static Vector8 const ONES_VEC8
Definition Astro.hh:195
static Vector2 const ONES_VEC2
Definition Astro.hh:147
static Matrix5 const ONES_MAT5
Definition Astro.hh:172
static Matrix9 const IDENTITY_MAT9
Definition Astro.hh:205
static Vector8 const ZEROS_VEC8
Definition Astro.hh:193
static Vector1 const NAN_VEC1
Definition Astro.hh:135
static Vector5 const NAN_VEC5
Definition Astro.hh:167
Eigen::Vector< Real, 3 > Vector3
Definition Astro.hh:92
Eigen::Vector< Real, 8 > Vector8
Definition Astro.hh:102
static Matrix5 const NAN_MAT5
Definition Astro.hh:168
static Matrix9 const NAN_MAT9
Definition Astro.hh:200
static Vector6 const NAN_VEC6
Definition Astro.hh:175
Eigen::DiagonalMatrix< Real, 3 > Scale
Definition Astro.hh:112
static Vector7 const ONES_VEC7
Definition Astro.hh:187
static Real const INFTY
Definition Astro.hh:132
static Vector1 const ONES_VEC1
Definition Astro.hh:139
static Matrix8 const IDENTITY_MAT8
Definition Astro.hh:197
static Matrix2 const NAN_MAT2
Definition Astro.hh:144
static Matrix6 const IDENTITY_MAT6
Definition Astro.hh:181
static Matrix8 const ONES_MAT8
Definition Astro.hh:196
Eigen::Matrix< Real, 8, 8 > Matrix8
Definition Astro.hh:103
static Vector2 const NAN_VEC2
Definition Astro.hh:143
static Vector3 const ONES_VEC3
Definition Astro.hh:155
static Real const EPSILON_MEDIUM
Definition Astro.hh:130
static Matrix4 const IDENTITY_MAT4
Definition Astro.hh:165
static Matrix5 const ZEROS_MAT5
Definition Astro.hh:170
Eigen::Matrix< Real, 2, 2 > Matrix2
Definition Astro.hh:91
Eigen::Vector< Real, Eigen::Dynamic > VectorX
Definition Astro.hh:107
static Matrix3 const IDENTITY_MAT3
Definition Astro.hh:157
static Vector7 const ZEROS_VEC7
Definition Astro.hh:185
Eigen::Matrix< Real, 4, 4 > Matrix4
Definition Astro.hh:95
static Matrix6 const ZEROS_MAT6
Definition Astro.hh:178
Eigen::Matrix< Real, 9, 9 > Matrix9
Definition Astro.hh:105
Eigen::Translation< Real, 3 > Translate
Definition Astro.hh:113
static Matrix7 const IDENTITY_MAT7
Definition Astro.hh:189
static Matrix1 const NAN_MAT1
Definition Astro.hh:136
static Vector2 const ZEROS_VEC2
Definition Astro.hh:145
std::string Info()
Definition Astro.hh:220
Eigen::Vector< Real, 7 > Vector7
Definition Astro.hh:100