2#include "Base/Headers/Matrix.hpp"
3#include "Base/Headers/Vertex.hpp"
4#include "Base/Headers/Buffer.hpp"
19 template<
typename t_type =
float>
46 t_type sx = points[correspondence.to_register_idx][X];
47 t_type sy = points[correspondence.to_register_idx][Y];
48 t_type sz = points[correspondence.to_register_idx][Z];
49 t_type dx = (*m_reference_points)[correspondence.reference_idx][X];
50 t_type dy = (*m_reference_points)[correspondence.reference_idx][Y];
51 t_type dz = (*m_reference_points)[correspondence.reference_idx][Z];
52 t_type nx = (*m_reference_normals)[correspondence.reference_idx][X];
53 t_type ny = (*m_reference_normals)[correspondence.reference_idx][Y];
54 t_type nz = (*m_reference_normals)[correspondence.reference_idx][Z];
56 t_type a = nz * sy - ny * sz;
57 t_type b = nx * sz - nz * sx;
58 t_type c = ny * sx - nx * sy;
81 t_type d = nx * dx + ny * dy + nz * dz - nx * sx - ny * sy - nz * sz;
98 ATA[1][0] = ATA[0][1];
99 ATA[2][0] = ATA[0][2];
100 ATA[2][1] = ATA[1][2];
101 ATA[3][0] = ATA[0][3];
102 ATA[3][1] = ATA[1][3];
103 ATA[3][2] = ATA[2][3];
104 ATA[4][0] = ATA[0][4];
105 ATA[4][1] = ATA[1][4];
106 ATA[4][2] = ATA[2][4];
107 ATA[4][3] = ATA[3][4];
108 ATA[5][0] = ATA[0][5];
109 ATA[5][1] = ATA[1][5];
110 ATA[5][2] = ATA[2][5];
111 ATA[5][3] = ATA[3][5];
112 ATA[5][4] = ATA[4][5];
138 transformation_matrix[0][0] =
cast<t_type>(std::cos(gamma) * std::cos(beta));
140 -std::sin(gamma) * std::cos(alpha) + std::cos(gamma) * std::sin(beta) * std::sin(alpha));
142 std::sin(gamma) *
sin(alpha) + std::cos(gamma) *
sin(beta) * std::cos(alpha));
143 transformation_matrix[1][0] =
cast<t_type>(
sin(gamma) * std::cos(beta));
145 std::cos(gamma) * std::cos(alpha) + std::sin(gamma) * std::sin(beta) * std::sin(alpha));
147 -std::cos(gamma) *
sin(alpha) +
sin(gamma) *
sin(beta) * std::cos(alpha));
148 transformation_matrix[2][0] =
cast<t_type>(-std::sin(beta));
149 transformation_matrix[2][1] =
cast<t_type>(std::cos(beta) * std::sin(alpha));
150 transformation_matrix[2][2] =
cast<t_type>(std::cos(beta) * std::cos(alpha));
The equivelent of std::vector but with a bit more control.
Templated logic for doing matrix multiplication.
A point in N-dimensional space, used primarily for spatial location information.
The primary namespace for the NDEVR SDK.
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
std::enable_if<!ObjectInfo< t_type >::Float, fltp08 >::type sin(const Angle< t_type > &angle)
Performs optimized sine operation on the given angle using pre-computed lookup table for optimal spee...
constexpr t_to cast(const Angle< t_from > &value)
Casts an Angle from one backing type to another.
Stores a correspondence between a reference point and a point to register.
uint04 to_register_idx
Index into the point buffer being registered.
fltp04 distance
Distance between the corresponding points.
uint04 reference_idx
Index into the reference point buffer.