Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VTK
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
429
Issues
429
List
Boards
Labels
Milestones
Merge Requests
111
Merge Requests
111
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
VTK
VTK
Commits
9e179c2a
Commit
9e179c2a
authored
May 24, 2019
by
Alexis Girault
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add vtkMatrix4x4::IsIdentity() method
parent
0a467f5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
Common/Math/vtkMatrix4x4.h
Common/Math/vtkMatrix4x4.h
+16
-0
No files found.
Common/Math/vtkMatrix4x4.h
View file @
9e179c2a
...
...
@@ -87,6 +87,11 @@ public:
{
vtkMatrix4x4
::
Identity
(
*
this
->
Element
);
this
->
Modified
();}
static
void
Identity
(
double
elements
[
16
]);
/**
* Returns true if this matrix is equal to the identity matrix.
*/
bool
IsIdentity
();
/**
* Matrix Inversion (adapted from Richard Carling in "Graphics Gems,"
* Academic Press, 1990).
...
...
@@ -228,5 +233,16 @@ inline void vtkMatrix4x4::SetElement(int i, int j, double value)
}
}
//----------------------------------------------------------------------------
inline
bool
vtkMatrix4x4
::
IsIdentity
()
{
double
*
M
=
*
this
->
Element
;
return
M
[
0
]
==
1.0
&&
M
[
1
]
==
0.0
&&
M
[
2
]
==
0.0
&&
M
[
3
]
==
0.0
&&
M
[
4
]
==
0.0
&&
M
[
5
]
==
1.0
&&
M
[
6
]
==
0.0
&&
M
[
7
]
==
0.0
&&
M
[
8
]
==
0.0
&&
M
[
9
]
==
0.0
&&
M
[
10
]
==
1.0
&&
M
[
11
]
==
0.0
&&
M
[
12
]
==
0.0
&&
M
[
13
]
==
0.0
&&
M
[
14
]
==
0.0
&&
M
[
15
]
==
1.0
;
}
#endif
Alexis Girault
@alexis-girault
mentioned in commit
0a9fb2bd
·
Jun 04, 2019
mentioned in commit
0a9fb2bd
mentioned in commit 0a9fb2bdfb17dff392e11a05e2e35220a78b160b
Toggle commit list
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