Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
7b584768
Commit
7b584768
authored
May 16, 2019
by
Martin Heistermann
Browse files
Matrix3x3T: implement setRow/setCol.
parent
05dd27d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
libs_required/ACG/Math/Matrix3x3T.hh
View file @
7b584768
...
...
@@ -98,9 +98,19 @@ class Matrix3x3T {
Vec3
getRow
(
uint_fast8_t
r
)
const
{
return
Vec3
((
*
this
)(
r
,
0
),
(
*
this
)(
r
,
1
),
(
*
this
)(
r
,
2
));
}
void
setRow
(
uint_fast8_t
r
,
const
Vec3
&
v
)
{
for
(
uint_fast8_t
c
=
0
;
c
<
3
;
++
c
)
{
(
*
this
)(
r
,
c
)
=
v
[
c
];
}
}
Vec3
getCol
(
uint_fast8_t
c
)
const
{
return
Vec3
((
*
this
)(
0
,
c
),
(
*
this
)(
1
,
c
),
(
*
this
)(
2
,
c
));
}
void
setCol
(
uint_fast8_t
c
,
const
Vec3
&
v
)
{
for
(
uint_fast8_t
r
=
0
;
r
<
3
;
++
r
)
{
(
*
this
)(
r
,
c
)
=
v
[
r
];
}
}
constexpr
Matrix3x3T
operator
*
(
const
Matrix3x3T
&
rhs
)
const
{
return
Matrix3x3T
{{
...
...
Write
Preview
Supports
Markdown
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