VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkPropAssembly Class Reference

create hierarchies of props More...

#include <vtkPropAssembly.h>

Inheritance diagram for vtkPropAssembly:
[legend]
Collaboration diagram for vtkPropAssembly:
[legend]

Public Types

typedef vtkProp Superclass
 
- Public Types inherited from vtkProp
typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkPropAssemblyNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
void AddPart (vtkProp *)
 
void RemovePart (vtkProp *)
 
vtkPropCollectionGetParts ()
 
virtual int HasTranslucentPolygonalGeometry ()
 
void ReleaseGraphicsResources (vtkWindow *)
 
doubleGetBounds ()
 
void ShallowCopy (vtkProp *Prop)
 
unsigned long int GetMTime ()
 
int RenderOpaqueGeometry (vtkViewport *ren)
 
virtual int RenderTranslucentPolygonalGeometry (vtkViewport *ren)
 
virtual int RenderVolumetricGeometry (vtkViewport *ren)
 
int RenderOverlay (vtkViewport *ren)
 
void InitPathTraversal ()
 
vtkAssemblyPathGetNextPath ()
 
int GetNumberOfPaths ()
 
void BuildPaths (vtkAssemblyPaths *paths, vtkAssemblyPath *path)
 
- Public Member Functions inherited from vtkProp
vtkPropNewInstance () const
 
virtual void Pick ()
 
virtual bool HasKeys (vtkInformation *requiredKeys)
 
virtual void GetActors (vtkPropCollection *)
 
virtual void GetActors2D (vtkPropCollection *)
 
virtual void GetVolumes (vtkPropCollection *)
 
virtual void SetVisibility (int)
 
virtual int GetVisibility ()
 
virtual void VisibilityOn ()
 
virtual void VisibilityOff ()
 
virtual void SetPickable (int)
 
virtual int GetPickable ()
 
virtual void PickableOn ()
 
virtual void PickableOff ()
 
virtual void SetDragable (int)
 
virtual int GetDragable ()
 
virtual void DragableOn ()
 
virtual void DragableOff ()
 
virtual unsigned long GetRedrawMTime ()
 
virtual void SetUseBounds (bool)
 
virtual bool GetUseBounds ()
 
virtual void UseBoundsOn ()
 
virtual void UseBoundsOff ()
 
virtual void PokeMatrix (vtkMatrix4x4 *vtkNotUsed(matrix))
 
virtual vtkMatrix4x4GetMatrix ()
 
virtual vtkInformationGetPropertyKeys ()
 
virtual void SetPropertyKeys (vtkInformation *keys)
 
virtual bool RenderFilteredOpaqueGeometry (vtkViewport *v, vtkInformation *requiredKeys)
 
virtual bool RenderFilteredTranslucentPolygonalGeometry (vtkViewport *v, vtkInformation *requiredKeys)
 
virtual bool RenderFilteredVolumetricGeometry (vtkViewport *v, vtkInformation *requiredKeys)
 
virtual bool RenderFilteredOverlay (vtkViewport *v, vtkInformation *requiredKeys)
 
virtual double GetEstimatedRenderTime (vtkViewport *)
 
virtual double GetEstimatedRenderTime ()
 
virtual void SetEstimatedRenderTime (double t)
 
virtual void RestoreEstimatedRenderTime ()
 
virtual void AddEstimatedRenderTime (double t, vtkViewport *vtkNotUsed(vp))
 
virtual void SetAllocatedRenderTime (double t, vtkViewport *vtkNotUsed(v))
 
virtual double GetAllocatedRenderTime ()
 
void SetRenderTimeMultiplier (double t)
 
virtual double GetRenderTimeMultiplier ()
 
virtual bool GetSupportsSelection ()
 
virtual int GetNumberOfConsumers ()
 
void AddConsumer (vtkObject *c)
 
void RemoveConsumer (vtkObject *c)
 
vtkObjectGetConsumer (int i)
 
int IsConsumer (vtkObject *c)
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkPropAssemblySafeDownCast (vtkObjectBase *o)
 
static vtkPropAssemblyNew ()
 
- Static Public Member Functions inherited from vtkProp
static int IsTypeOf (const char *type)
 
static vtkPropSafeDownCast (vtkObjectBase *o)
 
static vtkInformationIntegerKeyGeneralTextureUnit ()
 
static vtkInformationDoubleVectorKeyGeneralTextureTransform ()
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkPropAssembly ()
 
 ~vtkPropAssembly ()
 
void UpdatePaths ()
 
- Protected Member Functions inherited from vtkProp
 vtkProp ()
 
 ~vtkProp ()
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

vtkPropCollectionParts
 
double Bounds [6]
 
vtkTimeStamp PathTime
 
- Protected Attributes inherited from vtkProp
int Visibility
 
int Pickable
 
int Dragable
 
bool UseBounds
 
double AllocatedRenderTime
 
double EstimatedRenderTime
 
double SavedEstimatedRenderTime
 
double RenderTimeMultiplier
 
int NumberOfConsumers
 
vtkObject ** Consumers
 
vtkAssemblyPathsPaths
 
vtkInformationPropertyKeys
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

create hierarchies of props

vtkPropAssembly is an object that groups props and other prop assemblies into a tree-like hierarchy. The props can then be treated as a group (e.g., turning visibility on and off).

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.

Warning
vtkPropAssemblies can consist of hierarchies of assemblies, where one actor or assembly used in one hierarchy is also used in other hierarchies. However, make that there are no cycles (e.g., parent->child->parent), this will cause program failure.
See also
vtkProp3D vtkActor vtkAssembly vtkActor2D vtkVolume
Examples:
vtkPropAssembly (Examples)
Tests:
vtkPropAssembly (Tests)

Definition at line 55 of file vtkPropAssembly.h.

Member Typedef Documentation

Definition at line 58 of file vtkPropAssembly.h.

Constructor & Destructor Documentation

vtkPropAssembly::vtkPropAssembly ( )
protected
vtkPropAssembly::~vtkPropAssembly ( )
protected

Member Function Documentation

static int vtkPropAssembly::IsTypeOf ( const char *  type)
static
virtual int vtkPropAssembly::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkProp.

static vtkPropAssembly* vtkPropAssembly::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkPropAssembly::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkProp.

vtkPropAssembly* vtkPropAssembly::NewInstance ( ) const
void vtkPropAssembly::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkProp.

static vtkPropAssembly* vtkPropAssembly::New ( )
static

Create with an empty parts list.

void vtkPropAssembly::AddPart ( vtkProp )

Add a part to the list of parts.

void vtkPropAssembly::RemovePart ( vtkProp )

Remove a part from the list of parts,

vtkPropCollection* vtkPropAssembly::GetParts ( )

Return the list of parts.

int vtkPropAssembly::RenderOpaqueGeometry ( vtkViewport ren)
virtual

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.

Reimplemented from vtkProp.

virtual int vtkPropAssembly::RenderTranslucentPolygonalGeometry ( vtkViewport ren)
virtual

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.

Reimplemented from vtkProp.

virtual int vtkPropAssembly::RenderVolumetricGeometry ( vtkViewport ren)
virtual

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.

Reimplemented from vtkProp.

int vtkPropAssembly::RenderOverlay ( vtkViewport ren)
virtual

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.

Reimplemented from vtkProp.

virtual int vtkPropAssembly::HasTranslucentPolygonalGeometry ( )
virtual

Does this prop have some translucent polygonal geometry?

Reimplemented from vtkProp.

void vtkPropAssembly::ReleaseGraphicsResources ( vtkWindow )
virtual

Release any graphics resources that are being consumed by this actor. The parameter window could be used to determine which graphic resources to release.

Reimplemented from vtkProp.

double* vtkPropAssembly::GetBounds ( )
virtual

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).

Reimplemented from vtkProp.

void vtkPropAssembly::ShallowCopy ( vtkProp Prop)
virtual

Shallow copy of this vtkPropAssembly.

Reimplemented from vtkProp.

unsigned long int vtkPropAssembly::GetMTime ( )
virtual

Override default GetMTime method to also consider all of the prop assembly's parts.

Reimplemented from vtkObject.

void vtkPropAssembly::InitPathTraversal ( )
virtual

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.)

Reimplemented from vtkProp.

vtkAssemblyPath* vtkPropAssembly::GetNextPath ( )
virtual

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.)

Reimplemented from vtkProp.

int vtkPropAssembly::GetNumberOfPaths ( )
virtual

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.)

Reimplemented from vtkProp.

void vtkPropAssembly::BuildPaths ( vtkAssemblyPaths paths,
vtkAssemblyPath path 
)
virtual

WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS Overload the superclass' vtkProp BuildPaths() method.

Reimplemented from vtkProp.

void vtkPropAssembly::UpdatePaths ( )
protected

Member Data Documentation

vtkPropCollection* vtkPropAssembly::Parts
protected

Definition at line 130 of file vtkPropAssembly.h.

double vtkPropAssembly::Bounds[6]
protected

Definition at line 131 of file vtkPropAssembly.h.

vtkTimeStamp vtkPropAssembly::PathTime
protected

Definition at line 134 of file vtkPropAssembly.h.


The documentation for this class was generated from the following file: