#include <vtkGraphLayoutStrategy.h>
All graph layouts should subclass from this class. vtkGraphLayoutStrategy works as a plug-in to the vtkGraphLayout algorithm. The Layout() function should perform some reasonable "chunk" of the layout. This allows the user to be able to see the progress of the layout. Use IsLayoutComplete() to tell the user when there is no more layout to perform.
Definition at line 43 of file vtkGraphLayoutStrategy.h.
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | SetGraph (vtkGraph *graph) |
virtual void | Initialize () |
virtual void | Layout ()=0 |
virtual int | IsLayoutComplete () |
virtual void | SetWeightEdges (bool state) |
virtual bool | GetWeightEdges () |
virtual void | SetEdgeWeightField (const char *field) |
virtual char * | GetEdgeWeightField () |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkGraphLayoutStrategy * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
vtkGraphLayoutStrategy () | |
~vtkGraphLayoutStrategy () | |
Protected Attributes | |
vtkGraph * | Graph |
char * | EdgeWeightField |
bool | WeightEdges |
Reimplemented from vtkObject.
Reimplemented in vtkAssignCoordinatesLayoutStrategy, vtkAttributeClustering2DLayoutStrategy, vtkCircularLayoutStrategy, vtkClustering2DLayoutStrategy, vtkCommunity2DLayoutStrategy, vtkConeLayoutStrategy, vtkConstrained2DLayoutStrategy, vtkCosmicTreeLayoutStrategy, vtkFast2DLayoutStrategy, vtkForceDirectedLayoutStrategy, vtkPassThroughLayoutStrategy, vtkRandomLayoutStrategy, vtkSimple2DLayoutStrategy, vtkSimple3DCirclesStrategy, vtkSpanTreeLayoutStrategy, vtkTreeLayoutStrategy, and vtkTreeOrbitLayoutStrategy.
Definition at line 46 of file vtkGraphLayoutStrategy.h.
vtkGraphLayoutStrategy::vtkGraphLayoutStrategy | ( | ) | [protected] |
vtkGraphLayoutStrategy::~vtkGraphLayoutStrategy | ( | ) | [protected] |
virtual const char* vtkGraphLayoutStrategy::GetClassName | ( | ) | [virtual] |
Reimplemented from vtkObject.
Reimplemented in vtkAssignCoordinatesLayoutStrategy, vtkAttributeClustering2DLayoutStrategy, vtkCircularLayoutStrategy, vtkClustering2DLayoutStrategy, vtkCommunity2DLayoutStrategy, vtkConeLayoutStrategy, vtkConstrained2DLayoutStrategy, vtkCosmicTreeLayoutStrategy, vtkFast2DLayoutStrategy, vtkForceDirectedLayoutStrategy, vtkPassThroughLayoutStrategy, vtkRandomLayoutStrategy, vtkSimple2DLayoutStrategy, vtkSimple3DCirclesStrategy, vtkSpanTreeLayoutStrategy, vtkTreeLayoutStrategy, and vtkTreeOrbitLayoutStrategy.
static int vtkGraphLayoutStrategy::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type 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 vtkObject.
Reimplemented in vtkAssignCoordinatesLayoutStrategy, vtkAttributeClustering2DLayoutStrategy, vtkCircularLayoutStrategy, vtkClustering2DLayoutStrategy, vtkCommunity2DLayoutStrategy, vtkConeLayoutStrategy, vtkConstrained2DLayoutStrategy, vtkCosmicTreeLayoutStrategy, vtkFast2DLayoutStrategy, vtkForceDirectedLayoutStrategy, vtkPassThroughLayoutStrategy, vtkRandomLayoutStrategy, vtkSimple2DLayoutStrategy, vtkSimple3DCirclesStrategy, vtkSpanTreeLayoutStrategy, vtkTreeLayoutStrategy, and vtkTreeOrbitLayoutStrategy.
virtual int vtkGraphLayoutStrategy::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 vtkObject.
Reimplemented in vtkAssignCoordinatesLayoutStrategy, vtkAttributeClustering2DLayoutStrategy, vtkCircularLayoutStrategy, vtkClustering2DLayoutStrategy, vtkCommunity2DLayoutStrategy, vtkConeLayoutStrategy, vtkConstrained2DLayoutStrategy, vtkCosmicTreeLayoutStrategy, vtkFast2DLayoutStrategy, vtkForceDirectedLayoutStrategy, vtkPassThroughLayoutStrategy, vtkRandomLayoutStrategy, vtkSimple2DLayoutStrategy, vtkSimple3DCirclesStrategy, vtkSpanTreeLayoutStrategy, vtkTreeLayoutStrategy, and vtkTreeOrbitLayoutStrategy.
static vtkGraphLayoutStrategy* vtkGraphLayoutStrategy::SafeDownCast | ( | vtkObject * | o | ) | [static] |
Reimplemented from vtkObject.
Reimplemented in vtkAssignCoordinatesLayoutStrategy, vtkAttributeClustering2DLayoutStrategy, vtkCircularLayoutStrategy, vtkClustering2DLayoutStrategy, vtkCommunity2DLayoutStrategy, vtkConeLayoutStrategy, vtkConstrained2DLayoutStrategy, vtkCosmicTreeLayoutStrategy, vtkFast2DLayoutStrategy, vtkForceDirectedLayoutStrategy, vtkPassThroughLayoutStrategy, vtkRandomLayoutStrategy, vtkSimple2DLayoutStrategy, vtkSimple3DCirclesStrategy, vtkSpanTreeLayoutStrategy, vtkTreeLayoutStrategy, and vtkTreeOrbitLayoutStrategy.
void vtkGraphLayoutStrategy::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 vtkObject.
Reimplemented in vtkAssignCoordinatesLayoutStrategy, vtkAttributeClustering2DLayoutStrategy, vtkCircularLayoutStrategy, vtkClustering2DLayoutStrategy, vtkCommunity2DLayoutStrategy, vtkConeLayoutStrategy, vtkConstrained2DLayoutStrategy, vtkCosmicTreeLayoutStrategy, vtkFast2DLayoutStrategy, vtkForceDirectedLayoutStrategy, vtkPassThroughLayoutStrategy, vtkRandomLayoutStrategy, vtkSimple2DLayoutStrategy, vtkSimple3DCirclesStrategy, vtkSpanTreeLayoutStrategy, vtkTreeLayoutStrategy, and vtkTreeOrbitLayoutStrategy.
virtual void vtkGraphLayoutStrategy::SetGraph | ( | vtkGraph * | graph | ) | [virtual] |
Setting the graph for the layout strategy
Reimplemented in vtkRandomLayoutStrategy, and vtkSimple3DCirclesStrategy.
virtual void vtkGraphLayoutStrategy::Initialize | ( | ) | [inline, virtual] |
This method allows the layout strategy to do initialization of data structures or whatever else it might want to do.
Reimplemented in vtkAttributeClustering2DLayoutStrategy, vtkClustering2DLayoutStrategy, vtkCommunity2DLayoutStrategy, vtkConstrained2DLayoutStrategy, vtkFast2DLayoutStrategy, vtkForceDirectedLayoutStrategy, vtkPassThroughLayoutStrategy, and vtkSimple2DLayoutStrategy.
Definition at line 54 of file vtkGraphLayoutStrategy.h.
virtual void vtkGraphLayoutStrategy::Layout | ( | ) | [pure virtual] |
This is the layout method where the graph that was set in SetGraph() is laid out. The method can either entirely layout the graph or iteratively lay out the graph. If you have an iterative layout please implement the IsLayoutComplete() method.
Implemented in vtkAssignCoordinatesLayoutStrategy, vtkAttributeClustering2DLayoutStrategy, vtkCircularLayoutStrategy, vtkClustering2DLayoutStrategy, vtkCommunity2DLayoutStrategy, vtkConeLayoutStrategy, vtkConstrained2DLayoutStrategy, vtkCosmicTreeLayoutStrategy, vtkFast2DLayoutStrategy, vtkForceDirectedLayoutStrategy, vtkPassThroughLayoutStrategy, vtkRandomLayoutStrategy, vtkSimple2DLayoutStrategy, vtkSimple3DCirclesStrategy, vtkSpanTreeLayoutStrategy, vtkTreeLayoutStrategy, and vtkTreeOrbitLayoutStrategy.
virtual int vtkGraphLayoutStrategy::IsLayoutComplete | ( | ) | [inline, virtual] |
If your concrete class is iterative than you should overload IsLayoutComplete() otherwise it simply returns 1 by default;
Reimplemented in vtkAttributeClustering2DLayoutStrategy, vtkClustering2DLayoutStrategy, vtkCommunity2DLayoutStrategy, vtkConstrained2DLayoutStrategy, vtkFast2DLayoutStrategy, vtkForceDirectedLayoutStrategy, vtkPassThroughLayoutStrategy, and vtkSimple2DLayoutStrategy.
Definition at line 64 of file vtkGraphLayoutStrategy.h.
virtual void vtkGraphLayoutStrategy::SetWeightEdges | ( | bool | state | ) | [virtual] |
Whether to use edge weights in the layout or not.
virtual bool vtkGraphLayoutStrategy::GetWeightEdges | ( | ) | [virtual] |
Whether to use edge weights in the layout or not.
virtual void vtkGraphLayoutStrategy::SetEdgeWeightField | ( | const char * | field | ) | [virtual] |
Set/Get the field to use for the edge weights.
virtual char* vtkGraphLayoutStrategy::GetEdgeWeightField | ( | ) | [virtual] |
Set/Get the field to use for the edge weights.
vtkGraph* vtkGraphLayoutStrategy::Graph [protected] |
Definition at line 82 of file vtkGraphLayoutStrategy.h.
char* vtkGraphLayoutStrategy::EdgeWeightField [protected] |
Definition at line 83 of file vtkGraphLayoutStrategy.h.
bool vtkGraphLayoutStrategy::WeightEdges [protected] |
Definition at line 84 of file vtkGraphLayoutStrategy.h.