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 -------------------------------------------------------------------------*/ 00040 #ifndef __vtkPBGLBreadthFirstSearch_h 00041 #define __vtkPBGLBreadthFirstSearch_h 00042 00043 #include "vtkInfovisParallelModule.h" // For export macro 00044 #include "vtkStdString.h" // For string type 00045 #include "vtkVariant.h" // For variant type 00046 00047 #include "vtkGraphAlgorithm.h" 00048 00049 class vtkSelection; 00050 00051 class VTKINFOVISPARALLEL_EXPORT vtkPBGLBreadthFirstSearch : public vtkGraphAlgorithm 00052 { 00053 public: 00054 static vtkPBGLBreadthFirstSearch *New(); 00055 vtkTypeMacro(vtkPBGLBreadthFirstSearch, vtkGraphAlgorithm); 00056 void PrintSelf(ostream& os, vtkIndent indent); 00057 00059 00060 void SetOriginSelection(vtkSelection *s); 00061 void SetOriginSelectionConnection(vtkAlgorithmOutput* algOutput) 00062 { 00063 this->SetInputConnection(1, algOutput); 00064 } 00066 00069 void SetOriginVertex(vtkIdType index); 00070 00075 void SetOriginVertex(vtkStdString arrayName, vtkVariant value); 00076 00081 void SetOriginVertexString(char* arrayName, char* value); 00082 00084 00086 vtkSetStringMacro(OutputArrayName); 00088 00090 00094 vtkSetMacro(OriginFromSelection, bool); 00095 vtkGetMacro(OriginFromSelection, bool); 00096 vtkBooleanMacro(OriginFromSelection, bool); 00098 00100 00103 vtkGetMacro(OutputSelection, bool); 00104 vtkSetMacro(OutputSelection, bool); 00105 vtkBooleanMacro(OutputSelection, bool); 00107 00109 00112 vtkSetStringMacro(OutputSelectionType); 00114 00115 protected: 00116 vtkPBGLBreadthFirstSearch(); 00117 ~vtkPBGLBreadthFirstSearch(); 00118 00119 virtual int RequestData( 00120 vtkInformation *, 00121 vtkInformationVector **, 00122 vtkInformationVector *); 00123 00124 virtual int FillInputPortInformation( 00125 int port, vtkInformation* info); 00126 00127 virtual int FillOutputPortInformation( 00128 int port, vtkInformation* info); 00129 00130 private: 00131 00132 vtkIdType OriginVertexIndex; 00133 char* InputArrayName; 00134 char* OutputArrayName; 00135 vtkVariant OriginValue; 00136 bool OutputSelection; 00137 bool OriginFromSelection; 00138 char* OutputSelectionType; 00139 00141 00142 vtkSetStringMacro(InputArrayName); 00144 00146 00148 vtkIdType GetVertexIndex( 00149 vtkAbstractArray *abstract,vtkVariant value); 00151 00152 vtkPBGLBreadthFirstSearch(const vtkPBGLBreadthFirstSearch&); // Not implemented. 00153 void operator=(const vtkPBGLBreadthFirstSearch&); // Not implemented. 00154 }; 00155 00156 #endif