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
VTK
VTK
Commits
898b425b
Commit
898b425b
authored
Sep 22, 2014
by
Ben Boeckel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vtkOpenGLPolyDataMapper2D: comment possible divide-by-zero
Change-Id: Ib0d2ef47d1a09c710324602e1e73217603e2f34c
parent
a59bd8c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
Rendering/OpenGL2/vtkOpenGLPolyDataMapper2D.cxx
Rendering/OpenGL2/vtkOpenGLPolyDataMapper2D.cxx
+2
-0
No files found.
Rendering/OpenGL2/vtkOpenGLPolyDataMapper2D.cxx
View file @
898b425b
...
...
@@ -319,10 +319,12 @@ void vtkOpenGLPolyDataMapper2D::SetCameraShaderParameters(
vtkMatrix4x4
*
tmpMat
=
vtkMatrix4x4
::
New
();
tmpMat
->
SetElement
(
0
,
0
,
2.0
/
(
right
-
left
));
tmpMat
->
SetElement
(
1
,
1
,
2.0
/
(
top
-
bottom
));
// XXX(cppcheck): possible division by zero
tmpMat
->
SetElement
(
2
,
2
,
-
2.0
/
(
farV
-
nearV
));
tmpMat
->
SetElement
(
3
,
3
,
1.0
);
tmpMat
->
SetElement
(
0
,
3
,
-
1.0
*
(
right
+
left
)
/
(
right
-
left
));
tmpMat
->
SetElement
(
1
,
3
,
-
1.0
*
(
top
+
bottom
)
/
(
top
-
bottom
));
// XXX(cppcheck): possible division by zero
tmpMat
->
SetElement
(
2
,
3
,
-
1.0
*
(
farV
+
nearV
)
/
(
farV
-
nearV
));
tmpMat
->
Transpose
();
program
->
SetUniformMatrix
(
"WCVCMatrix"
,
tmpMat
);
...
...
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