VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkProjectSphereFilter.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 =========================================================================*/ 00025 #ifndef __vtkProjectSphereFilter_h 00026 #define __vtkProjectSphereFilter_h 00027 00028 #include "vtkFiltersGeometryModule.h" // For export macro 00029 #include "vtkPointSetAlgorithm.h" 00030 00031 class vtkCell; 00032 class vtkCellArray; 00033 class vtkDataSetAttributes; 00034 class vtkIdList; 00035 class vtkIncrementalPointLocator; 00036 class vtkUnstructuredGrid; 00037 00038 class VTKFILTERSGEOMETRY_EXPORT vtkProjectSphereFilter : 00039 public vtkPointSetAlgorithm 00040 { 00041 public: 00042 vtkTypeMacro(vtkProjectSphereFilter, vtkPointSetAlgorithm); 00043 virtual void PrintSelf(ostream &os, vtkIndent indent); 00044 00045 static vtkProjectSphereFilter *New(); 00046 00048 00049 vtkSetVector3Macro(Center,double); 00050 vtkGetVectorMacro(Center,double,3); 00052 00054 00056 vtkGetMacro(KeepPolePoints, bool); 00057 vtkSetMacro(KeepPolePoints, bool); 00058 vtkBooleanMacro(KeepPolePoints, bool); 00060 00062 00065 vtkGetMacro(TranslateZ, bool); 00066 vtkSetMacro(TranslateZ, bool); 00067 vtkBooleanMacro(TranslateZ, bool); 00069 00070 protected: 00071 vtkProjectSphereFilter(); 00072 ~vtkProjectSphereFilter(); 00073 00074 virtual int FillInputPortInformation(int port, vtkInformation *info); 00075 00076 virtual int RequestData(vtkInformation *, vtkInformationVector **, 00077 vtkInformationVector *); 00078 00079 void TransformPointInformation(vtkPointSet* input, vtkPointSet* output, vtkIdList*); 00080 void TransformCellInformation(vtkPointSet* input, vtkPointSet* output, vtkIdList*); 00081 void TransformTensors(vtkIdType id, double* coord, vtkDataSetAttributes* arrays); 00082 00084 00087 virtual void ComputePointsClosestToCenterLine(double, vtkIdList*) 00088 {} 00090 00093 virtual double GetZTranslation(vtkPointSet* input); 00094 00096 00098 void SplitCell( vtkPointSet* input, vtkPointSet* output, vtkIdType inputCellId, 00099 vtkIncrementalPointLocator* locator, vtkCellArray* connectivity, 00100 int splitSide); 00102 00103 void SetCellInformation( 00104 vtkUnstructuredGrid* output, vtkCell* cell, vtkIdType numberOfNewCells); 00105 00106 private: 00107 vtkProjectSphereFilter(const vtkProjectSphereFilter &); // Not implemented 00108 void operator=(const vtkProjectSphereFilter &); // Not implemented 00109 00110 double Center[3]; 00111 const double SplitLongitude; 00112 bool KeepPolePoints; 00113 bool TranslateZ; 00114 }; 00115 00116 #endif // __vtkProjectSphereFilter_h