Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
VTK
VTK
Commits
731063e0
Commit
731063e0
authored
May 18, 2010
by
David Partyka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG: Add new VRML test.
parent
cb27351f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
0 deletions
+62
-0
Hybrid/Testing/Cxx/TestVRMLNormals.cxx
Hybrid/Testing/Cxx/TestVRMLNormals.cxx
+62
-0
No files found.
Hybrid/Testing/Cxx/TestVRMLNormals.cxx
0 → 100644
View file @
731063e0
/*=========================================================================
Program: Visualization Toolkit
Module: TestVRMLNormals.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkVRMLImporter.h"
#include "vtkRenderer.h"
#include "vtkRenderWindow.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkTestUtilities.h"
#include "vtkRegressionTestImage.h"
int
TestVRMLNormals
(
int
argc
,
char
*
argv
[]
)
{
// Now create the RenderWindow, Renderer and Interactor
vtkRenderer
*
ren1
=
vtkRenderer
::
New
();
vtkRenderWindow
*
renWin
=
vtkRenderWindow
::
New
();
renWin
->
AddRenderer
(
ren1
);
vtkRenderWindowInteractor
*
iren
=
vtkRenderWindowInteractor
::
New
();
iren
->
SetRenderWindow
(
renWin
);
vtkVRMLImporter
*
importer
=
vtkVRMLImporter
::
New
();
importer
->
SetRenderWindow
(
renWin
);
const
char
*
fname
=
vtkTestUtilities
::
ExpandDataFileName
(
argc
,
argv
,
"Data/wineglass.wrl"
);
importer
->
SetFileName
(
fname
);
importer
->
Read
();
delete
[]
fname
;
renWin
->
SetSize
(
800
,
800
);
// render the image
iren
->
Initialize
();
// This starts the event loop and as a side effect causes an initial render.
int
retVal
=
vtkRegressionTestImage
(
renWin
);
if
(
retVal
==
vtkRegressionTester
::
DO_INTERACTOR
)
{
iren
->
Start
();
}
// Delete everything
importer
->
Delete
();
ren1
->
Delete
();
renWin
->
Delete
();
iren
->
Delete
();
return
retVal
;
}
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