35#include <NDEVR/Vertex.h>
36#include <NDEVR/LineSegment.h>
37#include <NDEVR/Bounds.h>
38#include <NDEVR/Triangle.h>
39#include <NDEVR/PolyLine.h>
42 template<
class t_type,
class t_vector, u
int01 t_dims, u
int01 t_row_dims, u
int01 t_col_dims>
45 return matrix * vertex;
47 template<
class t_type,
class t_vector, u
int01 t_row_dims, u
int01 t_col_dims>
51 trans = matrix * trans;
54 template<
class t_type,
class t_vector, u
int01 t_row_dims, u
int01 t_col_dims>
57 t_type bottom = right[0] * matrix[0][3] + right[1] * matrix[1][3] + matrix[2][3] + matrix[3][3];
59 (right[0] * matrix[0][0] + right[1] * matrix[1][0] + matrix[2][0] + matrix[3][0]) / bottom
60 , (right[0] * matrix[0][1] + right[1] * matrix[1][1] + matrix[2][1] + matrix[3][1]) / bottom);
62 template<
class t_type,
class t_vector>
65 t_type bottom = right[0] * matrix[0][3] + right[1] * matrix[1][3] + right[2] * matrix[2][3] + matrix[3][3];
67 (right[0] * matrix[0][0] + right[1] * matrix[1][0] + right[2] * matrix[2][0] + matrix[3][0]) / bottom
68 , (right[0] * matrix[0][1] + right[1] * matrix[1][1] + right[2] * matrix[2][1] + matrix[3][1]) / bottom
69 , (right[0] * matrix[0][2] + right[1] * matrix[1][2] + right[2] * matrix[2][2] + matrix[3][2]) / bottom);
71 template<
class t_type,
class t_vector>
75 (right[0] * matrix[0][0] + right[1] * matrix[1][0] + right[2] * matrix[2][0])
76 , (right[0] * matrix[0][1] + right[1] * matrix[1][1] + right[2] * matrix[2][1])
77 , (right[0] * matrix[0][2] + right[1] * matrix[1][2] + right[2] * matrix[2][2]));
79 template<
class t_type,
class t_vector>
83 right[0] * matrix[0][0] + right[1] * matrix[1][0] + right[2] * matrix[2][0] + right[3] * matrix[3][0]
84 , right[0] * matrix[0][1] + right[1] * matrix[1][1] + right[2] * matrix[2][1] + right[3] * matrix[3][1]
85 , right[0] * matrix[0][2] + right[1] * matrix[1][2] + right[2] * matrix[2][2] + right[3] * matrix[3][2]
86 , right[0] * matrix[0][3] + right[1] * matrix[1][3] + right[2] * matrix[2][3] + right[3] * matrix[3][3]);
89 template<
class t_type,
class t_vector, u
int01 t_dims, u
int01 t_row_dims, u
int01 t_col_dims>
92 return matrix * vertex;
94 template<
class t_type,
class t_vector, u
int01 t_row_dims, u
int01 t_col_dims>
99 template<
class t_type,
class t_vector, u
int01 t_row_dims, u
int01 t_col_dims>
103 (right[0] * matrix[0][0] + right[1] * matrix[1][0] + matrix[2][0])
104 , (right[0] * matrix[0][1] + right[1] * matrix[1][1] + matrix[2][1]));
106 template<
class t_type,
class t_vector>
110 (right[0] * matrix[0][0] + right[1] * matrix[1][0] + right[2] * matrix[2][0])
111 , (right[0] * matrix[0][1] + right[1] * matrix[1][1] + right[2] * matrix[2][1])
112 , (right[0] * matrix[0][2] + right[1] * matrix[1][2] + right[2] * matrix[2][2]));
114 template<
class t_type,
class t_vector>
118 (right[0] * matrix[0][0] + right[1] * matrix[1][0] + right[2] * matrix[2][0])
119 , (right[0] * matrix[0][1] + right[1] * matrix[1][1] + right[2] * matrix[2][1])
120 , (right[0] * matrix[0][2] + right[1] * matrix[1][2] + right[2] * matrix[2][2]));
122 template<
class t_type,
class t_vector>
126 right[0] * matrix[0][0] + right[1] * matrix[1][0] + right[2] * matrix[2][0] + right[3] * matrix[3][0]
127 , right[0] * matrix[0][1] + right[1] * matrix[1][1] + right[2] * matrix[2][1] + right[3] * matrix[3][1]
128 , right[0] * matrix[0][2] + right[1] * matrix[1][2] + right[2] * matrix[2][2] + right[3] * matrix[3][2]
129 , right[0] * matrix[0][3] + right[1] * matrix[1][3] + right[2] * matrix[2][3] + right[3] * matrix[3][3]);
131 template<
class t_type, u
int01 t_dims,
class t_vertex, u
int01 t_row_dims, u
int01 t_col_dims>
136 template<
class t_type, u
int01 t_dims,
class t_vertex, u
int01 t_row_dims, u
int01 t_col_dims>
142 template<
class t_type,
class t_vertex, u
int01 t_dims, u
int01 t_row_dims, u
int01 t_col_dims>
152 template<
class t_type,
class t_vertex, u
int01 t_row_dims, u
int01 t_col_dims>
157 for (
uint01 max_min = 0; max_min < 2; max_min++)
159 for (
uint01 n = 0; n < 3; n++)
160 upper_1[n] = matrix[0][n] * bounds[max_min][
X] + matrix[3][n];
161 t_type lower_1 = matrix[0][3] * bounds[max_min][
X] + matrix[3][3];
166 template<
class t_type,
class t_vertex, u
int01 t_row_dims, u
int01 t_col_dims>
173 for (
uint01 n = 0; n < 3; n++)
174 upper_1[n] = matrix[0][n] * bounds[i][
X] + matrix[3][n];
175 t_type lower_1 = matrix[0][3] * bounds[i][
X] + matrix[3][3];
179 for (
uint01 n = 0; n < 3; n++)
180 upper_2[n] = upper_1[n] + matrix[1][n] * bounds[j][
Y];
181 t_type lower_2 = lower_1 + matrix[1][3] * bounds[j][
Y];
187 template<
class t_type,
class t_vertex, u
int01 t_row_dims, u
int01 t_col_dims>
200 for (
uint01 n = 0; n < 3; n++)
201 upper_1[n] = matrix[0][n] * bounds[max_min][
X] + matrix[3][n];
202 t_type lower_1 = matrix[0][3] * bounds[max_min][
X] + matrix[3][3];
204 for (
uint01 max_min_2 =
MIN; max_min_2 <=
MAX; max_min_2++)
206 for (
uint01 n = 0; n < 3; n++)
207 upper_2[n] = upper_1[n] + matrix[1][n] * bounds[max_min_2][
Y];
208 t_type lower_2 = lower_1 + matrix[1][3] * bounds[max_min_2][
Y];
210 for (
uint01 max_min_3 =
MIN; max_min_3 <=
MAX; max_min_3++)
212 for (
uint01 n = 0; n < 3; n++)
213 upper_3[n] = upper_2[n] + matrix[2][n] * bounds[max_min_3][
Z];
214 t_type lower_3 = lower_2 + matrix[2][3] * bounds[max_min_3][
Z];
230 template<
class t_type, u
int01 t_row_dims, u
int01 t_col_dims>
233 for (
uint01 i = 0; i < t_row_dims; i++)
234 if (!
equals(a[i], b[i], epsilon))
239 template<
class t_type, u
int01 t_row_dims, u
int01 t_col_dims>
243 for (
uint01 i = 0; i < t_row_dims; i++)
244 multiplied_matrix[i] = mult * matrix[i];
245 return multiplied_matrix;
254 bool solve_offset_xy =
true;;
255 bool solve_offset_z =
true;
256 bool solve_heading =
true;
257 bool solve_rotation =
false;
258 bool solve_scale =
false;
A specification of upper and lower bounds in N-dimensions.
Definition Bounds.hpp:57
constexpr void addToBounds(const t_vertex &vector)
Adds to the bounds such that the new bounds fully encompasses the argument.
Definition Bounds.hpp:498
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
A line segment represented by two vertices, a start and end.
Definition Line.hpp:55
constexpr const t_vertex & vertex(uint01 index) const
Definition Line.hpp:171
Definition MatrixFunctions.h:248
Definition Matrix.hpp:173
A polyline which stores vertex information for many points along a given path.
Definition CoordinateProjectionManager.h:44
uint04 vertexCount() const
Definition PolyLine.hpp:209
void add(const t_vertex &vertex)
Definition PolyLine.hpp:265
const t_vertex & vertex(uint04 index) const
Definition PolyLine.hpp:155
Definition Vertex.hpp:341
Definition Triangle.hpp:143
constexpr t_vertex & vertex(TriangleLocation triangle_node)
Vertices the given triangle node.
Definition Triangle.hpp:180
A vertex.
Definition Vertex.hpp:54
constexpr std::enable_if< IsVecType< t_vector_type, Angle< fltp08 > >::value, t_vector_type >::type operator*(const t_vector_type &angle, const t_type &mult)
Definition AngleFunctions.h:403
@ MIN
Definition BaseValues.hpp:226
@ MAX
Definition BaseValues.hpp:227
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:98
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120
constexpr t_to cast(const Angle< t_from > &value)
Definition Angle.h:514
constexpr bool equals(const LineSegment< t_dims, t_type, t_vertex > &left, const LineSegment< t_dims, t_type, t_vertex > &right, const t_type &epsilon=cast< t_type >(0))
Definition Line.hpp:819
constexpr bool isNaN(const t_type &value)
Query if 'value' is valid or invalid.
Definition BaseFunctions.hpp:200
@ B
Definition BaseValues.hpp:203
@ A
Definition BaseValues.hpp:201
@ Y
Definition BaseValues.hpp:202
@ X
Definition BaseValues.hpp:200
@ C
Definition BaseValues.hpp:205
@ Z
Definition BaseValues.hpp:204
Definition BaseValues.hpp:272