VTK
|
00001 /*========================================================================= 00002 00003 Program: ParaView 00004 Module: vtkSelectionNode.h 00005 00006 Copyright (c) Kitware, Inc. 00007 All rights reserved. 00008 See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/ 00051 #ifndef __vtkSelectionNode_h 00052 #define __vtkSelectionNode_h 00053 00054 #include "vtkCommonDataModelModule.h" // For export macro 00055 #include "vtkObject.h" 00056 00057 //BTX 00058 class vtkAbstractArray; 00059 class vtkDataSetAttributes; 00060 class vtkInformation; 00061 class vtkInformationDoubleKey; 00062 class vtkInformationIntegerKey; 00063 class vtkInformationObjectBaseKey; 00064 class vtkProp; 00065 class vtkTable; 00066 //ETX 00067 00068 class VTKCOMMONDATAMODEL_EXPORT vtkSelectionNode : public vtkObject 00069 { 00070 public: 00071 vtkTypeMacro(vtkSelectionNode,vtkObject); 00072 void PrintSelf(ostream& os, vtkIndent indent); 00073 static vtkSelectionNode* New(); 00074 00076 virtual void Initialize(); 00077 00079 00080 virtual void SetSelectionList(vtkAbstractArray*); 00081 virtual vtkAbstractArray* GetSelectionList(); 00083 00085 00086 virtual void SetSelectionData(vtkDataSetAttributes* data); 00087 vtkGetObjectMacro(SelectionData, vtkDataSetAttributes); 00089 00091 00092 vtkGetObjectMacro(Properties, vtkInformation); 00094 00096 virtual void DeepCopy(vtkSelectionNode* src); 00097 00101 virtual void ShallowCopy(vtkSelectionNode* src); 00102 00104 unsigned long GetMTime(); 00105 00106 // vtkSelectionNode specific keys follow: 00108 00121 static vtkInformationIntegerKey* CONTENT_TYPE(); 00122 //BTX 00123 enum SelectionContent 00124 { 00125 SELECTIONS, // Deprecated. 00126 GLOBALIDS, 00127 PEDIGREEIDS, 00128 VALUES, 00129 INDICES, 00130 FRUSTUM, 00131 LOCATIONS, 00132 THRESHOLDS, 00133 BLOCKS, // used to select blocks within a composite dataset. 00134 QUERY 00135 }; 00136 //ETX 00138 00140 00142 virtual void SetContentType(int type); 00143 virtual int GetContentType(); 00145 00147 00151 static vtkInformationIntegerKey* FIELD_TYPE(); 00152 //BTX 00153 enum SelectionField 00154 { 00155 CELL, 00156 POINT, 00157 FIELD, 00158 VERTEX, 00159 EDGE, 00160 ROW 00161 }; 00162 //ETX 00164 00166 00168 virtual void SetFieldType(int type); 00169 virtual int GetFieldType(); 00171 00173 00174 vtkSetStringMacro(QueryString); 00175 vtkGetStringMacro(QueryString); 00177 00180 static vtkInformationDoubleKey* EPSILON(); 00181 00185 static vtkInformationIntegerKey* CONTAINING_CELLS(); 00186 00191 static vtkInformationIntegerKey* COMPONENT_NUMBER(); 00192 00194 static vtkInformationIntegerKey* INVERSE(); 00195 00198 static vtkInformationIntegerKey* PIXEL_COUNT(); 00199 00201 static vtkInformationObjectBaseKey* SOURCE(); 00202 00205 static vtkInformationIntegerKey* SOURCE_ID(); 00206 00208 static vtkInformationObjectBaseKey* PROP(); 00209 00212 static vtkInformationIntegerKey* PROP_ID(); 00213 00215 static vtkInformationIntegerKey* PROCESS_ID(); 00216 00218 static vtkInformationIntegerKey* COMPOSITE_INDEX(); 00219 00221 00222 static vtkInformationIntegerKey* HIERARCHICAL_LEVEL(); 00223 static vtkInformationIntegerKey* HIERARCHICAL_INDEX(); 00225 00229 static vtkInformationIntegerKey* INDEXED_VERTICES(); 00230 00233 void UnionSelectionList(vtkSelectionNode* other); 00234 00238 void SubtractSelectionList(vtkSelectionNode* other); 00239 00242 bool EqualProperties(vtkSelectionNode* other, bool fullcompare=true); 00243 00244 //BTX 00245 protected: 00246 vtkSelectionNode(); 00247 ~vtkSelectionNode(); 00248 00249 vtkInformation* Properties; 00250 vtkDataSetAttributes* SelectionData; 00251 char* QueryString; 00252 00253 private: 00254 vtkSelectionNode(const vtkSelectionNode&); // Not implemented. 00255 void operator=(const vtkSelectionNode&); // Not implemented. 00256 //ETX 00257 }; 00258 00259 #endif