Commit 731063e0 authored by David Partyka's avatar David Partyka

BUG: Add new VRML test.

parent cb27351f
/*=========================================================================
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;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment