Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
third-party
moab
Commits
dbabc956
Commit
dbabc956
authored
Oct 26, 2016
by
Iulian Grindeanu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'iulian07/matrix3_rows'
parents
b8074818
6c7c9e24
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletion
+29
-1
src/moab/Matrix3.hpp
src/moab/Matrix3.hpp
+24
-1
test/test_Matrix3.cpp
test/test_Matrix3.cpp
+5
-0
No files found.
src/moab/Matrix3.hpp
View file @
dbabc956
...
...
@@ -345,12 +345,35 @@ public:
row0
[
2
],
row1
[
2
],
row2
[
2
];
}
}
#ifndef DEPRECATED
#ifdef __GNUC__
#define DEPRECATED __attribute__((deprecated))
#else
#pragma message("WARNING: You need to implement DEPRECATED for this compiler")
#define DEPRECATED
#endif
#endif
/*
* \deprecated { Use instead the constructor with explicit fourth argument, bool isRow, above }
*
*/
template
<
typename
Vector
>
inline
DEPRECATED
Matrix3
(
const
Vector
&
row0
,
const
Vector
&
row1
,
const
Vector
&
row2
)
{
_mat
<<
row0
[
0
],
row0
[
1
],
row0
[
2
],
row1
[
0
],
row1
[
1
],
row1
[
2
],
row2
[
0
],
row2
[
1
],
row2
[
2
];
}
inline
Matrix3
(
const
double
v
[
9
]
){
_mat
<<
v
[
0
],
v
[
1
],
v
[
2
],
v
[
3
],
v
[
4
],
v
[
5
],
v
[
6
],
v
[
7
],
v
[
8
];
}
inline
Matrix3
&
operator
=
(
const
Matrix3
&
m
){
_mat
=
m
.
_mat
;
...
...
test/test_Matrix3.cpp
View file @
dbabc956
...
...
@@ -97,6 +97,11 @@ void test_EigenDecomp()
//now verfy that the returns Eigenvalues and Eigenvectors are correct (within some tolerance)
double
tol
=
1e-04
;
// use a deprecated constructor
Matrix3
mat3
(
CartVect
(
2
,
-
1
,
0
),
CartVect
(
-
1
,
2
,
-
1
),
CartVect
(
0
,
-
1
,
2
));
CHECK_REAL_EQUAL
(
mat
(
1
),
mat3
(
1
),
tol
);
vec0_check
.
normalize
();
vec1_check
.
normalize
();
vec2_check
.
normalize
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment