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 "vtkStdString.h" // For string type 00044 #include "vtkVariant.h" // For variant type 00045 00046 #include "vtkGraphAlgorithm.h" 00047 00048 class vtkSelection; 00049 00050 class VTK_PARALLEL_EXPORT vtkPBGLBreadthFirstSearch : public vtkGraphAlgorithm 00051 { 00052 public: 00053 static vtkPBGLBreadthFirstSearch *New(); 00054 vtkTypeMacro(vtkPBGLBreadthFirstSearch, vtkGraphAlgorithm); 00055 void PrintSelf(ostream& os, vtkIndent indent); 00056 00058 00059 void SetOriginSelection(vtkSelection *s); 00060 void SetOriginSelectionConnection(vtkAlgorithmOutput* algOutput) 00061 { 00062 this->SetInputConnection(1, algOutput); 00063 } 00065 00068 void SetOriginVertex(vtkIdType index); 00069 00070 //BTX 00071 00073 00077 void SetOriginVertex(vtkStdString arrayName, vtkVariant value); 00078 //ETX 00080 00085 void SetOriginVertexString(char* arrayName, char* value); 00086 00088 00090 vtkSetStringMacro(OutputArrayName); 00092 00094 00098 vtkSetMacro(OriginFromSelection, bool); 00099 vtkGetMacro(OriginFromSelection, bool); 00100 vtkBooleanMacro(OriginFromSelection, bool); 00102 00104 00107 vtkGetMacro(OutputSelection, bool); 00108 vtkSetMacro(OutputSelection, bool); 00109 vtkBooleanMacro(OutputSelection, bool); 00111 00113 00116 vtkSetStringMacro(OutputSelectionType); 00118 00119 protected: 00120 vtkPBGLBreadthFirstSearch(); 00121 ~vtkPBGLBreadthFirstSearch(); 00122 00123 virtual int RequestData( 00124 vtkInformation *, 00125 vtkInformationVector **, 00126 vtkInformationVector *); 00127 00128 virtual int FillInputPortInformation( 00129 int port, vtkInformation* info); 00130 00131 virtual int FillOutputPortInformation( 00132 int port, vtkInformation* info); 00133 00134 private: 00135 00136 vtkIdType OriginVertexIndex; 00137 char* InputArrayName; 00138 char* OutputArrayName; 00139 //BTX 00140 vtkVariant OriginValue; 00141 //ETX 00142 bool OutputSelection; 00143 bool OriginFromSelection; 00144 char* OutputSelectionType; 00145 00147 00148 vtkSetStringMacro(InputArrayName); 00150 00151 //BTX 00152 00154 00156 vtkIdType GetVertexIndex( 00157 vtkAbstractArray *abstract,vtkVariant value); 00158 //ETX 00160 00161 vtkPBGLBreadthFirstSearch(const vtkPBGLBreadthFirstSearch&); // Not implemented. 00162 void operator=(const vtkPBGLBreadthFirstSearch&); // Not implemented. 00163 }; 00164 00165 #endif