VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPBGLBreadthFirstSearch.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright 2008 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 00019 -------------------------------------------------------------------------*/ 00041 #ifndef vtkPBGLBreadthFirstSearch_h 00042 #define vtkPBGLBreadthFirstSearch_h 00043 00044 #include "vtkInfovisParallelModule.h" // For export macro 00045 #include "vtkStdString.h" // For string type 00046 #include "vtkVariant.h" // For variant type 00047 00048 #include "vtkGraphAlgorithm.h" 00049 00050 class vtkSelection; 00051 00052 #if !defined(VTK_LEGACY_REMOVE) 00053 class VTKINFOVISPARALLEL_EXPORT vtkPBGLBreadthFirstSearch : public vtkGraphAlgorithm 00054 { 00055 public: 00056 static vtkPBGLBreadthFirstSearch *New(); 00057 vtkTypeMacro(vtkPBGLBreadthFirstSearch, vtkGraphAlgorithm); 00058 void PrintSelf(ostream& os, vtkIndent indent); 00059 00061 00062 void SetOriginSelection(vtkSelection *s); 00063 void SetOriginSelectionConnection(vtkAlgorithmOutput* algOutput) 00064 { 00065 this->SetInputConnection(1, algOutput); 00066 } 00068 00071 void SetOriginVertex(vtkIdType index); 00072 00077 void SetOriginVertex(vtkStdString arrayName, vtkVariant value); 00078 00083 void SetOriginVertexString(char* arrayName, char* value); 00084 00086 00088 vtkSetStringMacro(OutputArrayName); 00090 00092 00096 vtkSetMacro(OriginFromSelection, bool); 00097 vtkGetMacro(OriginFromSelection, bool); 00098 vtkBooleanMacro(OriginFromSelection, bool); 00100 00102 00105 vtkGetMacro(OutputSelection, bool); 00106 vtkSetMacro(OutputSelection, bool); 00107 vtkBooleanMacro(OutputSelection, bool); 00109 00111 00114 vtkSetStringMacro(OutputSelectionType); 00116 00117 protected: 00118 vtkPBGLBreadthFirstSearch(); 00119 ~vtkPBGLBreadthFirstSearch(); 00120 00121 virtual int RequestData( 00122 vtkInformation *, 00123 vtkInformationVector **, 00124 vtkInformationVector *); 00125 00126 virtual int FillInputPortInformation( 00127 int port, vtkInformation* info); 00128 00129 virtual int FillOutputPortInformation( 00130 int port, vtkInformation* info); 00131 00132 private: 00133 00134 vtkIdType OriginVertexIndex; 00135 char* InputArrayName; 00136 char* OutputArrayName; 00137 vtkVariant OriginValue; 00138 bool OutputSelection; 00139 bool OriginFromSelection; 00140 char* OutputSelectionType; 00141 00143 00144 vtkSetStringMacro(InputArrayName); 00146 00148 00150 vtkIdType GetVertexIndex( 00151 vtkAbstractArray *abstract,vtkVariant value); 00153 00154 vtkPBGLBreadthFirstSearch(const vtkPBGLBreadthFirstSearch&); // Not implemented. 00155 void operator=(const vtkPBGLBreadthFirstSearch&); // Not implemented. 00156 }; 00157 00158 #endif //VTK_LEGACY_REMOVE 00159 #endif