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

places vertices on circles in 3D More...

#include <vtkSimple3DCirclesStrategy.h>

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

Public Types

enum  { FixedRadiusMethod = 0, FixedDistanceMethod = 1 }
 
typedef vtkGraphLayoutStrategy Superclass
 
- Public Types inherited from vtkGraphLayoutStrategy
typedef vtkObject Superclass
 

Public Member Functions

virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class. More...
 
vtkSimple3DCirclesStrategyNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
virtual void SetMethod (int)
 Set or get circle generating method (FixedRadiusMethod/FixedDistanceMethod). More...
 
virtual int GetMethod ()
 
virtual void SetRadius (double)
 If Method is FixedRadiusMethod: Set or get the radius of the circles. More...
 
virtual double GetRadius ()
 
virtual void SetHeight (double)
 Set or get the vertical (local z) distance between the circles. More...
 
virtual double GetHeight ()
 
virtual void SetOrigin (double, double, double)
 Set or get the origin of the geometry. More...
 
virtual void SetOrigin (double[3])
 
virtual doubleGetOrigin ()
 
virtual void GetOrigin (double &, double &, double &)
 
virtual void GetOrigin (double[3])
 
virtual void SetDirection (double dx, double dy, double dz)
 Set or get the normal vector of the circles plain. More...
 
virtual void SetDirection (double d[3])
 
virtual doubleGetDirection ()
 
virtual void GetDirection (double &, double &, double &)
 
virtual void GetDirection (double[3])
 
virtual void SetMarkedStartVertices (vtkAbstractArray *_arg)
 Set or get initial vertices. More...
 
virtual vtkAbstractArrayGetMarkedStartVertices ()
 
virtual void SetMarkedValue (vtkVariant _arg)
 Set or get MarkedValue. More...
 
virtual vtkVariant GetMarkedValue (void)
 
virtual void SetForceToUseUniversalStartPointsFinder (vtkTypeBool)
 Set or get ForceToUseUniversalStartPointsFinder. More...
 
virtual vtkTypeBool GetForceToUseUniversalStartPointsFinder ()
 
virtual void ForceToUseUniversalStartPointsFinderOn ()
 
virtual void ForceToUseUniversalStartPointsFinderOff ()
 
virtual void SetAutoHeight (vtkTypeBool)
 Set or get auto height (Default: false). More...
 
virtual vtkTypeBool GetAutoHeight ()
 
virtual void AutoHeightOn ()
 
virtual void AutoHeightOff ()
 
virtual void SetMinimumRadian (double)
 Set or get minimum radian (used by auto height). More...
 
virtual double GetMinimumRadian ()
 
virtual void SetMinimumDegree (double degree)
 Set or get minimum degree (used by auto height). More...
 
virtual double GetMinimumDegree (void)
 
virtual void SetHierarchicalLayers (vtkIntArray *_arg)
 Set or get hierarchical layers id by vertices (An usual vertex's layer id is greater or equal to zero. More...
 
virtual vtkIntArrayGetHierarchicalLayers ()
 
virtual void SetHierarchicalOrder (vtkIdTypeArray *_arg)
 Set or get hierarchical ordering of vertices (The array starts from the first vertex's id. More...
 
virtual vtkIdTypeArrayGetHierarchicalOrder ()
 
void Layout (void) override
 Standard layout method. More...
 
void SetGraph (vtkGraph *graph) override
 Set graph (warning: HierarchicalOrder and HierarchicalLayers will set to zero. More...
 
- Public Member Functions inherited from vtkGraphLayoutStrategy
vtkGraphLayoutStrategyNewInstance () const
 
virtual void Initialize ()
 This method allows the layout strategy to do initialization of data structures or whatever else it might want to do. More...
 
virtual int IsLayoutComplete ()
 If your concrete class is iterative than you should overload IsLayoutComplete() otherwise it simply returns 1 by default;. More...
 
virtual void SetWeightEdges (bool state)
 Whether to use edge weights in the layout or not. More...
 
virtual bool GetWeightEdges ()
 
virtual void SetEdgeWeightField (const char *field)
 Set/Get the field to use for the edge weights. More...
 
virtual char * GetEdgeWeightField ()
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 Turn debugging output on. More...
 
virtual void DebugOff ()
 Turn debugging output off. More...
 
bool GetDebug ()
 Get the value of the debug flag. More...
 
void SetDebug (bool debugFlag)
 Set the value of the debug flag. More...
 
virtual void Modified ()
 Update the modification time for this object. More...
 
virtual vtkMTimeType GetMTime ()
 Return this object's modified time. More...
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
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 *)
 
vtkTypeBool HasObserver (unsigned long event, vtkCommand *)
 
vtkTypeBool HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
vtkTypeBool HasObserver (unsigned long event)
 
vtkTypeBool HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
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)
 Allow user to set the AbortFlagOn() with the return value of the callback method. More...
 
int InvokeEvent (unsigned long event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
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
 Return the class name as a string. More...
 
virtual void Delete ()
 Delete a VTK object. More...
 
virtual void FastDelete ()
 Delete a reference to this object. More...
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 Print an object to an ostream. More...
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
virtual void Register (vtkObjectBase *o)
 Increase the reference count (mark as used by another object). More...
 
virtual void UnRegister (vtkObjectBase *o)
 Decrease the reference count (release by another object). More...
 
int GetReferenceCount ()
 Return the current reference count of this object. More...
 
void SetReferenceCount (int)
 Sets the reference count. More...
 
void PrintRevisions (ostream &)
 Legacy. More...
 

Static Public Member Functions

static vtkSimple3DCirclesStrategyNew ()
 
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkSimple3DCirclesStrategySafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkGraphLayoutStrategy
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkGraphLayoutStrategySafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 
static void BreakOnError ()
 This method is called when vtkErrorMacro executes. More...
 
static void SetGlobalWarningDisplay (int val)
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 Return 1 if this class type is the same type of (or a subclass of) the named class. More...
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkSimple3DCirclesStrategy (void)
 
 ~vtkSimple3DCirclesStrategy (void) override
 
void Transform (double Local[], double Global[])
 
- Protected Member Functions inherited from vtkGraphLayoutStrategy
 vtkGraphLayoutStrategy ()
 
 ~vtkGraphLayoutStrategy () override
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
 ~vtkObject () override
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
 These methods allow a command to exclusively grab all events. More...
 
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

double Radius
 
double Height
 
double Origin [3]
 
double Direction [3]
 
int Method
 
vtkAbstractArrayMarkedStartVertices
 
vtkVariant MarkedValue
 
vtkTypeBool ForceToUseUniversalStartPointsFinder
 
vtkTypeBool AutoHeight
 
double MinimumRadian
 
vtkIntArrayHierarchicalLayers
 
vtkIdTypeArrayHierarchicalOrder
 
- Protected Attributes inherited from vtkGraphLayoutStrategy
vtkGraphGraph
 
char * EdgeWeightField
 
bool WeightEdges
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
std::atomic< int32_t > ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

places vertices on circles in 3D

Places vertices on circles depending on the graph vertices hierarchy level. The source graph could be vtkDirectedAcyclicGraph or vtkDirectedGraph if MarkedStartPoints array was added. The algorithm collects the standalone points, too and take them to a separated circle. If method is FixedRadiusMethod, the radius of the circles will be equal. If method is FixedDistanceMethod, the distance between the points on circles will be equal.

In first step initial points are searched. A point is initial, if its in degree equal zero and out degree is greater than zero (or marked by MarkedStartVertices and out degree is greater than zero). Independent vertices (in and out degree equal zero) are collected separatelly. In second step the hierarchical level is generated for every vertex. In third step the hierarchical order is generated. If a vertex has no hierarchical level and it is not independent, the graph has loop so the algorithm exit with error message. Finally the vertices positions are calculated by the hierarchical order and by the vertices hierarchy levels.

Thanks:
Ferenc Nasztanovics, naszt.nosp@m.a@na.nosp@m.szta..nosp@m.hu, Budapest University of Technology and Economics, Department of Structural Mechanics
References:
in 3D rotation was used: http://en.citizendium.org/wiki/Rotation_matrix
Tests:
vtkSimple3DCirclesStrategy (Tests)

Definition at line 55 of file vtkSimple3DCirclesStrategy.h.

Member Typedef Documentation

◆ Superclass

Definition at line 59 of file vtkSimple3DCirclesStrategy.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
FixedRadiusMethod 
FixedDistanceMethod 

Definition at line 62 of file vtkSimple3DCirclesStrategy.h.

Constructor & Destructor Documentation

◆ vtkSimple3DCirclesStrategy()

vtkSimple3DCirclesStrategy::vtkSimple3DCirclesStrategy ( void  )
protected

◆ ~vtkSimple3DCirclesStrategy()

vtkSimple3DCirclesStrategy::~vtkSimple3DCirclesStrategy ( void  )
overrideprotected

Member Function Documentation

◆ New()

static vtkSimple3DCirclesStrategy* vtkSimple3DCirclesStrategy::New ( )
static

◆ IsTypeOf()

static vtkTypeBool vtkSimple3DCirclesStrategy::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual vtkTypeBool vtkSimple3DCirclesStrategy::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 vtkGraphLayoutStrategy.

◆ SafeDownCast()

static vtkSimple3DCirclesStrategy* vtkSimple3DCirclesStrategy::SafeDownCast ( vtkObjectBase o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase* vtkSimple3DCirclesStrategy::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkGraphLayoutStrategy.

◆ NewInstance()

vtkSimple3DCirclesStrategy* vtkSimple3DCirclesStrategy::NewInstance ( ) const

◆ PrintSelf()

void vtkSimple3DCirclesStrategy::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

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

◆ SetMethod()

virtual void vtkSimple3DCirclesStrategy::SetMethod ( int  )
virtual

Set or get circle generating method (FixedRadiusMethod/FixedDistanceMethod).

Default is FixedRadiusMethod.

◆ GetMethod()

virtual int vtkSimple3DCirclesStrategy::GetMethod ( )
virtual

◆ SetRadius()

virtual void vtkSimple3DCirclesStrategy::SetRadius ( double  )
virtual

If Method is FixedRadiusMethod: Set or get the radius of the circles.

If Method is FixedDistanceMethod: Set or get the distance of the points in the circle.

◆ GetRadius()

virtual double vtkSimple3DCirclesStrategy::GetRadius ( )
virtual

◆ SetHeight()

virtual void vtkSimple3DCirclesStrategy::SetHeight ( double  )
virtual

Set or get the vertical (local z) distance between the circles.

If AutoHeight is on, this is the minimal height between the circle layers

◆ GetHeight()

virtual double vtkSimple3DCirclesStrategy::GetHeight ( )
virtual

◆ SetOrigin() [1/2]

virtual void vtkSimple3DCirclesStrategy::SetOrigin ( double  ,
double  ,
double   
)
virtual

Set or get the origin of the geometry.

This is the center of the first circle. SetOrigin(x,y,z)

◆ SetOrigin() [2/2]

virtual void vtkSimple3DCirclesStrategy::SetOrigin ( double  [3])
virtual

◆ GetOrigin() [1/3]

virtual double* vtkSimple3DCirclesStrategy::GetOrigin ( )
virtual

◆ GetOrigin() [2/3]

virtual void vtkSimple3DCirclesStrategy::GetOrigin ( double ,
double ,
double  
)
virtual

◆ GetOrigin() [3/3]

virtual void vtkSimple3DCirclesStrategy::GetOrigin ( double  [3])
virtual

◆ SetDirection() [1/2]

virtual void vtkSimple3DCirclesStrategy::SetDirection ( double  dx,
double  dy,
double  dz 
)
virtual

Set or get the normal vector of the circles plain.

The height is growing in this direction. The direction must not be zero vector. The default vector is (0.0,0.0,1.0)

◆ SetDirection() [2/2]

virtual void vtkSimple3DCirclesStrategy::SetDirection ( double  d[3])
virtual

◆ GetDirection() [1/3]

virtual double* vtkSimple3DCirclesStrategy::GetDirection ( )
virtual

◆ GetDirection() [2/3]

virtual void vtkSimple3DCirclesStrategy::GetDirection ( double ,
double ,
double  
)
virtual

◆ GetDirection() [3/3]

virtual void vtkSimple3DCirclesStrategy::GetDirection ( double  [3])
virtual

◆ SetMarkedStartVertices()

virtual void vtkSimple3DCirclesStrategy::SetMarkedStartVertices ( vtkAbstractArray _arg)
virtual

Set or get initial vertices.

If MarkedStartVertices is added, loop is accepted in the graph. (If all of the loop start vertices are marked in MarkedStartVertices array.) MarkedStartVertices size must be equal with the number of the vertices in the graph. Start vertices must be marked by MarkedValue. (E.g.: if MarkedValue=3 and MarkedStartPoints is { 0, 3, 5, 3 }, the start points ids will be {1,3}.) )

◆ GetMarkedStartVertices()

virtual vtkAbstractArray* vtkSimple3DCirclesStrategy::GetMarkedStartVertices ( )
virtual

◆ SetMarkedValue()

virtual void vtkSimple3DCirclesStrategy::SetMarkedValue ( vtkVariant  _arg)
virtual

Set or get MarkedValue.

See: MarkedStartVertices.

◆ GetMarkedValue()

virtual vtkVariant vtkSimple3DCirclesStrategy::GetMarkedValue ( void  )
virtual

◆ SetForceToUseUniversalStartPointsFinder()

virtual void vtkSimple3DCirclesStrategy::SetForceToUseUniversalStartPointsFinder ( vtkTypeBool  )
virtual

Set or get ForceToUseUniversalStartPointsFinder.

If ForceToUseUniversalStartPointsFinder is true, MarkedStartVertices won't be used. In this case the input graph must be vtkDirectedAcyclicGraph (Default: false).

◆ GetForceToUseUniversalStartPointsFinder()

virtual vtkTypeBool vtkSimple3DCirclesStrategy::GetForceToUseUniversalStartPointsFinder ( )
virtual

◆ ForceToUseUniversalStartPointsFinderOn()

virtual void vtkSimple3DCirclesStrategy::ForceToUseUniversalStartPointsFinderOn ( )
virtual

◆ ForceToUseUniversalStartPointsFinderOff()

virtual void vtkSimple3DCirclesStrategy::ForceToUseUniversalStartPointsFinderOff ( )
virtual

◆ SetAutoHeight()

virtual void vtkSimple3DCirclesStrategy::SetAutoHeight ( vtkTypeBool  )
virtual

Set or get auto height (Default: false).

If AutoHeight is true, (r(i+1) - r(i-1))/Height will be smaller than tan(MinimumRadian). If you want equal distances and parallel circles, you should turn off AutoHeight.

◆ GetAutoHeight()

virtual vtkTypeBool vtkSimple3DCirclesStrategy::GetAutoHeight ( )
virtual

◆ AutoHeightOn()

virtual void vtkSimple3DCirclesStrategy::AutoHeightOn ( )
virtual

◆ AutoHeightOff()

virtual void vtkSimple3DCirclesStrategy::AutoHeightOff ( )
virtual

◆ SetMinimumRadian()

virtual void vtkSimple3DCirclesStrategy::SetMinimumRadian ( double  )
virtual

Set or get minimum radian (used by auto height).

◆ GetMinimumRadian()

virtual double vtkSimple3DCirclesStrategy::GetMinimumRadian ( )
virtual

◆ SetMinimumDegree()

virtual void vtkSimple3DCirclesStrategy::SetMinimumDegree ( double  degree)
virtual

Set or get minimum degree (used by auto height).

There is no separated minimum degree, so minimum radian will be changed.

◆ GetMinimumDegree()

virtual double vtkSimple3DCirclesStrategy::GetMinimumDegree ( void  )
virtual

◆ SetHierarchicalLayers()

virtual void vtkSimple3DCirclesStrategy::SetHierarchicalLayers ( vtkIntArray _arg)
virtual

Set or get hierarchical layers id by vertices (An usual vertex's layer id is greater or equal to zero.

If a vertex is standalone, its layer id is -2.) If no HierarchicalLayers array is defined, vtkSimple3DCirclesStrategy will generate it automatically (default).

◆ GetHierarchicalLayers()

virtual vtkIntArray* vtkSimple3DCirclesStrategy::GetHierarchicalLayers ( )
virtual

◆ SetHierarchicalOrder()

virtual void vtkSimple3DCirclesStrategy::SetHierarchicalOrder ( vtkIdTypeArray _arg)
virtual

Set or get hierarchical ordering of vertices (The array starts from the first vertex's id.

All id must be greater or equal to zero!) If no HierarchicalOrder is defined, vtkSimple3DCirclesStrategy will generate it automatically (default).

◆ GetHierarchicalOrder()

virtual vtkIdTypeArray* vtkSimple3DCirclesStrategy::GetHierarchicalOrder ( )
virtual

◆ Layout()

void vtkSimple3DCirclesStrategy::Layout ( void  )
overridevirtual

Standard layout method.

Implements vtkGraphLayoutStrategy.

◆ SetGraph()

void vtkSimple3DCirclesStrategy::SetGraph ( vtkGraph graph)
overridevirtual

Set graph (warning: HierarchicalOrder and HierarchicalLayers will set to zero.

These reference counts will be decreased!)

Reimplemented from vtkGraphLayoutStrategy.

◆ Transform()

void vtkSimple3DCirclesStrategy::Transform ( double  Local[],
double  Global[] 
)
inlineprotected

Member Data Documentation

◆ Radius

double vtkSimple3DCirclesStrategy::Radius
protected

Definition at line 186 of file vtkSimple3DCirclesStrategy.h.

◆ Height

double vtkSimple3DCirclesStrategy::Height
protected

Definition at line 187 of file vtkSimple3DCirclesStrategy.h.

◆ Origin

double vtkSimple3DCirclesStrategy::Origin[3]
protected

Definition at line 188 of file vtkSimple3DCirclesStrategy.h.

◆ Direction

double vtkSimple3DCirclesStrategy::Direction[3]
protected

Definition at line 189 of file vtkSimple3DCirclesStrategy.h.

◆ Method

int vtkSimple3DCirclesStrategy::Method
protected

Definition at line 190 of file vtkSimple3DCirclesStrategy.h.

◆ MarkedStartVertices

vtkAbstractArray* vtkSimple3DCirclesStrategy::MarkedStartVertices
protected

Definition at line 191 of file vtkSimple3DCirclesStrategy.h.

◆ MarkedValue

vtkVariant vtkSimple3DCirclesStrategy::MarkedValue
protected

Definition at line 192 of file vtkSimple3DCirclesStrategy.h.

◆ ForceToUseUniversalStartPointsFinder

vtkTypeBool vtkSimple3DCirclesStrategy::ForceToUseUniversalStartPointsFinder
protected

Definition at line 193 of file vtkSimple3DCirclesStrategy.h.

◆ AutoHeight

vtkTypeBool vtkSimple3DCirclesStrategy::AutoHeight
protected

Definition at line 194 of file vtkSimple3DCirclesStrategy.h.

◆ MinimumRadian

double vtkSimple3DCirclesStrategy::MinimumRadian
protected

Definition at line 195 of file vtkSimple3DCirclesStrategy.h.

◆ HierarchicalLayers

vtkIntArray* vtkSimple3DCirclesStrategy::HierarchicalLayers
protected

Definition at line 197 of file vtkSimple3DCirclesStrategy.h.

◆ HierarchicalOrder

vtkIdTypeArray* vtkSimple3DCirclesStrategy::HierarchicalOrder
protected

Definition at line 198 of file vtkSimple3DCirclesStrategy.h.


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