Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Michael Migliore
VTK
Commits
63d3e730
Commit
63d3e730
authored
Mar 02, 2017
by
David C. Lonie
Browse files
Mark the normals array in the vtkmContour filter.
parent
1cac785b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Accelerators/Vtkm/Testing/Cxx/TestVTKMMarchingCubes.cxx
View file @
63d3e730
...
...
@@ -47,6 +47,7 @@ int RunVTKPipeline(T *t, int argc, char* argv[])
cubes
->
SetNumberOfContours
(
1
);
cubes
->
SetValue
(
0
,
50.5
f
);
cubes
->
ComputeScalarsOn
();
cubes
->
ComputeNormalsOn
();
vtkNew
<
vtkPolyDataMapper
>
mapper
;
mapper
->
SetInputConnection
(
cubes
->
GetOutputPort
());
...
...
@@ -68,6 +69,13 @@ int RunVTKPipeline(T *t, int argc, char* argv[])
iren
->
Start
();
retVal
=
vtkRegressionTester
::
PASSED
;
}
if
(
!
cubes
->
GetOutput
()
->
GetPointData
()
->
GetNormals
())
{
std
::
cerr
<<
"Output normals not set.
\n
"
;
return
EXIT_FAILURE
;
}
return
(
!
retVal
);
}
...
...
Accelerators/Vtkm/vtkmContour.cxx
View file @
63d3e730
...
...
@@ -163,6 +163,13 @@ int vtkmContour::RequestData(vtkInformation* request,
}
}
if
(
this
->
ComputeNormals
)
{
output
->
GetPointData
()
->
SetActiveAttribute
(
filter
.
GetNormalArrayName
().
c_str
(),
vtkDataSetAttributes
::
NORMALS
);
}
// we got this far, everything is good
return
1
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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