[vtkusers] vtkPolyDataNormals

Charl P. Botha c.p.botha at its.tudelft.nl
Mon Mar 24 19:18:00 EST 2003


On Mon, Mar 24, 2003 at 05:58:25PM -0600, Xianjin Yang wrote:
> I am trying to render a bounding box or cube-like axes around my vtkPolyData
> object (scattered points). In VTK/Examples/Annotation/Tcl/cubeAxes.tcl, a
> vtkPolyDataNormals object is needed for use of vtkCubeAxesActor2D, that is,
> axes->SetInput(normals->GetOutput()); My question is how to get a
> vtkPolyDataNormals object (normals) from my vtkPolyData object? Note that my
> vtkPolyData object consists of some scattered points without edges and faces.

Please read the documentation:
http://www.vtk.org/doc/nightly/html/classvtkCubeAxesActor2D.html

You don't need a vtkPolyDataNormals object at all.  vtkCubeAxesActor2D needs
a camera and the bounds of what you're visualising.  The latter can be done
in three different ways:

"First, if the Input ivar is defined, then the input dataset's bounds is
used. If the Input is not defined, and the Prop (superclass of all actors)
is defined, then the Prop's bounds is used. If neither the Input or Prop is
defined, then the Bounds instance variable (an array of six floats) is
used."

-- 
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/



More information about the vtkusers mailing list