Section: Visualization Toolkit Filtering Classes
A vtkPropAssembly object can be used in place of an vtkProp since it is a subclass of vtkProp. The difference is that vtkPropAssembly maintains a list of other prop and prop assembly instances (its "parts") that form the assembly. Note that this process is recursive: you can create groups consisting of prop assemblies to arbitrary depth.
vtkPropAssembly's and vtkProp's that compose a prop assembly need not be added to a renderer's list of props, as long as the parent assembly is in the prop list. This is because they are automatically renderered during the hierarchical traversal process.
To create an instance of class vtkPropAssembly, simply invoke its constructor as follows
obj = vtkPropAssembly
obj
is an instance of the vtkPropAssembly class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkPropAssembly = obj.NewInstance ()
vtkPropAssembly = obj.SafeDownCast (vtkObject o)
obj.AddPart (vtkProp )
- Add a part to the list of parts.
obj.RemovePart (vtkProp )
- Remove a part from the list of parts,
vtkPropCollection = obj.GetParts ()
- Return the list of parts.
int = obj.RenderOpaqueGeometry (vtkViewport ren)
- Render this assembly and all its parts. The rendering process is
recursive. The parts of each assembly are rendered only if the
visibility for the prop is turned on.
int = obj.RenderTranslucentPolygonalGeometry (vtkViewport ren)
- Render this assembly and all its parts. The rendering process is
recursive. The parts of each assembly are rendered only if the
visibility for the prop is turned on.
int = obj.RenderVolumetricGeometry (vtkViewport ren)
- Render this assembly and all its parts. The rendering process is
recursive. The parts of each assembly are rendered only if the
visibility for the prop is turned on.
int = obj.RenderOverlay (vtkViewport ren)
- Render this assembly and all its parts. The rendering process is
recursive. The parts of each assembly are rendered only if the
visibility for the prop is turned on.
int = obj.HasTranslucentPolygonalGeometry ()
- Does this prop have some translucent polygonal geometry?
obj.ReleaseGraphicsResources (vtkWindow )
- Release any graphics resources that are being consumed by this actor.
The parameter window could be used to determine which graphic
resources to release.
double = obj.GetBounds ()
- Get the bounds for this prop assembly as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
May return NULL in some cases (meaning the bounds is undefined).
obj.ShallowCopy (vtkProp Prop)
- Shallow copy of this vtkPropAssembly.
long = obj.GetMTime ()
- Override default GetMTime method to also consider all of the
prop assembly's parts.
obj.InitPathTraversal ()
- Methods to traverse the paths (i.e., leaf nodes) of a prop
assembly. These methods should be contrasted to those that traverse the
list of parts using GetParts(). GetParts() returns a list of children
of this assembly, not necessarily the leaf nodes of the assembly. To use
the methods below - first invoke InitPathTraversal() followed by
repeated calls to GetNextPath(). GetNextPath() returns a NULL pointer
when the list is exhausted. (See the superclass vtkProp for more
information about paths.)
vtkAssemblyPath = obj.GetNextPath ()
- Methods to traverse the paths (i.e., leaf nodes) of a prop
assembly. These methods should be contrasted to those that traverse the
list of parts using GetParts(). GetParts() returns a list of children
of this assembly, not necessarily the leaf nodes of the assembly. To use
the methods below - first invoke InitPathTraversal() followed by
repeated calls to GetNextPath(). GetNextPath() returns a NULL pointer
when the list is exhausted. (See the superclass vtkProp for more
information about paths.)
int = obj.GetNumberOfPaths ()
- Methods to traverse the paths (i.e., leaf nodes) of a prop
assembly. These methods should be contrasted to those that traverse the
list of parts using GetParts(). GetParts() returns a list of children
of this assembly, not necessarily the leaf nodes of the assembly. To use
the methods below - first invoke InitPathTraversal() followed by
repeated calls to GetNextPath(). GetNextPath() returns a NULL pointer
when the list is exhausted. (See the superclass vtkProp for more
information about paths.)