Debian Codegraph @

avogadro/core/vector.h

raw
1 /******************************************************************************
2 This source file is part of the Avogadro project.
3 This source code is released under the 3-Clause BSD License, (see "LICENSE").
4 ******************************************************************************/
5
6 #ifndef AVOGADRO_CORE_VECTOR_H
7 #define AVOGADRO_CORE_VECTOR_H
8
9 #include "avogadrocore.h"
10 #include <Eigen/Dense>
11
12 namespace Avogadro {
13
14 /** Typedefs for vector types. */
15 using Vector2 = Eigen::Matrix<Real, 2, 1>;
16 using Vector3 = Eigen::Matrix<Real, 3, 1>;
17 using Vector4 = Eigen::Matrix<Real, 4, 1>;
18
19 using Vector2f = Eigen::Matrix<float, 2, 1>;
20 using Vector3f = Eigen::Matrix<float, 3, 1>;
21 using Vector4f = Eigen::Matrix<float, 4, 1>;
22 using Vector2i = Eigen::Matrix<int, 2, 1>;
23 using Vector3i = Eigen::Matrix<int, 3, 1>;
24 using Vector4i = Eigen::Matrix<int, 4, 1>;
25 using Vector2ub = Eigen::Matrix<unsigned char, 2, 1>;
26 using Vector3ub = Eigen::Matrix<unsigned char, 3, 1>;
27 using Vector4ub = Eigen::Matrix<unsigned char, 4, 1>;
28
29 /** A simple struct composed of Vector3f to represent a frustrum. */
30 struct Frustrum
31 {
32 Vector3f points[8];
33 Vector3f planes[4];
34 };
35
36 } // namespace Avogadro
37
38 #endif // AVOGADRO_CORE_VECTOR_H