Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
VTK
VTK
Commits
88dba93a
Commit
88dba93a
authored
Mar 08, 1994
by
Ken Martin
Browse files
Added transpose method
parent
d6d2ba50
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/Mat4x4.hh
View file @
88dba93a
...
...
@@ -33,6 +33,11 @@ class vlMatrix4x4 : public vlObject
void
Invert
(
vlMatrix4x4
in
,
vlMatrix4x4
&
out
);
void
Invert
(
void
)
{
Invert
(
*
this
,
*
this
);};
// Calculate the transpose of in and
// return it in out.
void
Transpose
(
vlMatrix4x4
in
,
vlMatrix4x4
&
out
);
void
Transpose
(
void
)
{
Transpose
(
*
this
,
*
this
);};
void
VectorMultiply
(
float
in
[
4
],
float
out
[
4
]);
void
Adjoint
(
vlMatrix4x4
&
in
,
vlMatrix4x4
&
out
);
float
Determinant
(
vlMatrix4x4
&
in
);
...
...
src/Mat4x4.cc
View file @
88dba93a
...
...
@@ -252,3 +252,17 @@ void vlMatrix4x4::PrintSelf (ostream& os, vlIndent indent)
}
}
void
vlMatrix4x4
::
Transpose
(
vlMatrix4x4
in
,
vlMatrix4x4
&
out
)
{
int
i
,
j
;
float
temp
;
for
(
i
=
0
;
i
<
4
;
i
++
)
for
(
j
=
i
;
j
<
4
;
j
++
)
{
temp
=
in
.
Element
[
i
][
j
];
out
.
Element
[
i
][
j
]
=
in
.
Element
[
j
][
i
];
out
.
Element
[
j
][
i
]
=
temp
;
}
}
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