Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Graphics/vtkHyperStreamline.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkHyperStreamline.h,v $
00005   Language:  C++
00006 
00007 
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen 
00009 All rights reserved.
00010 
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013 
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016 
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020 
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024 
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027 
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038 
00039 =========================================================================*/
00078 #ifndef __vtkHyperStreamline_h
00079 #define __vtkHyperStreamline_h
00080 
00081 #include "vtkDataSetToPolyDataFilter.h"
00082 
00083 #define VTK_INTEGRATE_FORWARD 0
00084 #define VTK_INTEGRATE_BACKWARD 1
00085 #define VTK_INTEGRATE_BOTH_DIRECTIONS 2
00086 
00087 class vtkHyperArray;
00088 
00089 class VTK_GRAPHICS_EXPORT vtkHyperStreamline : public vtkDataSetToPolyDataFilter
00090 {
00091 public:
00092   vtkTypeMacro(vtkHyperStreamline,vtkDataSetToPolyDataFilter);
00093   void PrintSelf(ostream& os, vtkIndent indent);
00094 
00099   static vtkHyperStreamline *New();
00100 
00104   void SetStartLocation(vtkIdType cellId, int subId, float pcoords[3]);
00105 
00107 
00110   void SetStartLocation(vtkIdType cellId, int subId, float r, float s,
00111                         float t);
00113 
00116   vtkIdType GetStartLocation(int& subId, float pcoords[3]);
00117 
00121   void SetStartPosition(float x[3]);
00122 
00126   void SetStartPosition(float x, float y, float z);
00127 
00130   float *GetStartPosition();
00131 
00133 
00135   vtkSetClampMacro(MaximumPropagationDistance,float,0.0,VTK_LARGE_FLOAT);
00136   vtkGetMacro(MaximumPropagationDistance,float);
00138 
00142   void IntegrateMajorEigenvector();
00143 
00147   void IntegrateMediumEigenvector();
00148 
00152   void IntegrateMinorEigenvector();
00153 
00155 
00157   vtkSetClampMacro(IntegrationStepLength,float,0.001,0.5);
00158   vtkGetMacro(IntegrationStepLength,float);
00160 
00162 
00165   vtkSetClampMacro(StepLength,float,0.000001,1.0);
00166   vtkGetMacro(StepLength,float);
00168 
00170 
00171   vtkSetClampMacro(IntegrationDirection,int,
00172                   VTK_INTEGRATE_FORWARD,VTK_INTEGRATE_BOTH_DIRECTIONS);
00173   vtkGetMacro(IntegrationDirection,int);
00174   void SetIntegrationDirectionToForward()
00175     {this->SetIntegrationDirection(VTK_INTEGRATE_FORWARD);};
00176   void SetIntegrationDirectionToBackward()
00177     {this->SetIntegrationDirection(VTK_INTEGRATE_BACKWARD);};
00178   void SetIntegrationDirectionToIntegrateBothDirections()
00179     {this->SetIntegrationDirection(VTK_INTEGRATE_BOTH_DIRECTIONS);};
00181 
00183 
00185   vtkSetClampMacro(TerminalEigenvalue,float,0.0,VTK_LARGE_FLOAT);
00186   vtkGetMacro(TerminalEigenvalue,float);
00188 
00190 
00192   vtkSetClampMacro(NumberOfSides,int,3,VTK_LARGE_INTEGER);
00193   vtkGetMacro(NumberOfSides,int);
00195 
00197 
00201   vtkSetClampMacro(Radius,float,0.0001,VTK_LARGE_FLOAT);
00202   vtkGetMacro(Radius,float);
00204 
00206 
00208   vtkSetMacro(LogScaling,int);
00209   vtkGetMacro(LogScaling,int);
00210   vtkBooleanMacro(LogScaling,int);
00212 
00213 protected:
00214   vtkHyperStreamline();
00215   ~vtkHyperStreamline();
00216 
00217   // Integrate data
00218   void Execute();
00219   void BuildTube();
00220 
00221   // Flag indicates where streamlines start from (either position or location)
00222   int StartFrom;
00223 
00224   // Starting from cell location
00225   vtkIdType StartCell;
00226   int StartSubId;
00227   float StartPCoords[3];
00228 
00229   // starting from global x-y-z position
00230   float StartPosition[3];
00231 
00232   //array of hyperstreamlines
00233   vtkHyperArray *Streamers;
00234   int NumberOfStreamers;
00235 
00236   // length of hyperstreamline in absolute distance
00237   float MaximumPropagationDistance;
00238 
00239   // integration direction
00240   int IntegrationDirection;
00241 
00242   // the length (fraction of cell size) of integration steps
00243   float IntegrationStepLength;
00244 
00245   // the length of the tube segments composing the hyperstreamline
00246   float StepLength;
00247 
00248   // terminal propagation speed
00249   float TerminalEigenvalue;
00250 
00251   // number of sides of tube
00252   int NumberOfSides;
00253 
00254   // maximum radius of tube
00255   float Radius;
00256 
00257   // boolean controls whether scaling is clamped
00258   int LogScaling;
00259 
00260   // which eigenvector to use as integration vector field
00261   int IntegrationEigenvector;
00262 private:
00263   vtkHyperStreamline(const vtkHyperStreamline&);  // Not implemented.
00264   void operator=(const vtkHyperStreamline&);  // Not implemented.
00265 };
00266 
00267 #endif
00268 
00269 

Generated on Thu Mar 28 14:19:21 2002 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001