FreeMat

- Main Page
- Related Pages

vtkGraphToPolyData

Section: Visualization Toolkit Graphics Classes

# Usage

Converts a vtkGraph to a vtkPolyData. This assumes that the points of the graph have already been filled (perhaps by vtkGraphLayout), and coverts all the edge of the graph into lines in the polydata. The vertex data is passed along to the point data, and the edge data is passed along to the cell data.

Only the owned graph edges (i.e. edges with ghost level 0) are copied into the vtkPolyData.

To create an instance of class vtkGraphToPolyData, simply invoke its constructor as follows

      obj = vtkGraphToPolyData

# Methods

The class vtkGraphToPolyData has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkGraphToPolyData class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkGraphToPolyData = obj.NewInstance ()`
- `vtkGraphToPolyData = obj.SafeDownCast (vtkObject o)`
- `obj.SetEdgeGlyphOutput (bool )` - Create a second output containing points and orientation vectors for drawing arrows or other glyphs on edges. This output should be set as the first input to vtkGlyph3D to place glyphs on the edges. vtkGlyphSource2D's VTK_EDGEARROW_GLYPH provides a good glyph for drawing arrows. Default value is off.
- `bool = obj.GetEdgeGlyphOutput ()` - Create a second output containing points and orientation vectors for drawing arrows or other glyphs on edges. This output should be set as the first input to vtkGlyph3D to place glyphs on the edges. vtkGlyphSource2D's VTK_EDGEARROW_GLYPH provides a good glyph for drawing arrows. Default value is off.
- `obj.EdgeGlyphOutputOn ()` - Create a second output containing points and orientation vectors for drawing arrows or other glyphs on edges. This output should be set as the first input to vtkGlyph3D to place glyphs on the edges. vtkGlyphSource2D's VTK_EDGEARROW_GLYPH provides a good glyph for drawing arrows. Default value is off.
- `obj.EdgeGlyphOutputOff ()` - Create a second output containing points and orientation vectors for drawing arrows or other glyphs on edges. This output should be set as the first input to vtkGlyph3D to place glyphs on the edges. vtkGlyphSource2D's VTK_EDGEARROW_GLYPH provides a good glyph for drawing arrows. Default value is off.
- `obj.SetEdgeGlyphPosition (double )` - The position of the glyph point along the edge. 0 puts a glyph point at the source of each edge. 1 puts a glyph point at the target of each edge. An intermediate value will place the glyph point between the source and target. The default value is 1.
- `double = obj.GetEdgeGlyphPosition ()` - The position of the glyph point along the edge. 0 puts a glyph point at the source of each edge. 1 puts a glyph point at the target of each edge. An intermediate value will place the glyph point between the source and target. The default value is 1.