[vtkusers] creating a demo test program

Mathieu Malaterre mathieu.malaterre at kitware.com
Thu Oct 28 11:13:47 EDT 2004


Robert S Laramee wrote:
> Dear Fellow VTK Users,
> 
> We here at the VRVis Research Center
> (vrvis.at) are trying to perform a simple
> evaluation of the VTK against three other 
> packages: Open Inventer from Mercury, Coin3D, 
> and Hoops3D.
> 
> As part of our evaluation we would like to
> construct a very simple test program.
> We would like a program to:
> 
> 1.  Load an arbitrary (one of our own)
>     triangular surface mesh

In python/tcl I would recommend the use of:

vtkProgrammableSource
http://www.vtk.org/doc/nightly/html/classvtkProgrammableSource.html
Ex:
For example: reconstructSurface.py

For C++ I would just create a vtkUnstructuredGrid/vtkPolyData:

VTK/Examples/DataManipulation/Cxx/Cube.cxx

> 2.  Rotate the mesh 360 degrees

Ex:
VTK/Examples/Tutorial/Step1/Cone.cxx

> 3.  Measure and print out the frames/second
>     and (optionally)

Look for some existing benchmark:

- TimeRenderer
- TimeRenderer2

and if you use VTK from CVS:

- VTKBenchMark


> 4.  Perform some off-screen rendering of
>     the resulting image

On windows this is straightforward, just use the opengl driver. On 
linux/unix you'll haver to build Mesa.

http://vtk.org/Wiki/VTK_FAQ#How_to_build_VTK_for_offscreen_rendering.3F

VTK/Examples/MangledMesa/Tcl/OffScreenCone.tcl
VTK/Examples/MangledMesa/Tcl/OffScreenPrinting.tcl

> Can anyone suggest the best place for us to
> start?  Is there an existing sample VTK demo 
> program that could be modified to perform
> this task?  Any suggestions would be appreciated.

HTH
Mathieu





More information about the vtkusers mailing list