• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Filtering/vtkImplicitBoolean.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImplicitBoolean.h,v $
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 =========================================================================*/
00037 #ifndef __vtkImplicitBoolean_h
00038 #define __vtkImplicitBoolean_h
00039 
00040 #include "vtkImplicitFunction.h"
00041  
00042 class vtkImplicitFunctionCollection;
00043 
00044 #define VTK_UNION 0
00045 #define VTK_INTERSECTION 1
00046 #define VTK_DIFFERENCE 2
00047 #define VTK_UNION_OF_MAGNITUDES 3
00048 
00049 class VTK_FILTERING_EXPORT vtkImplicitBoolean : public vtkImplicitFunction
00050 {
00051 public:
00052   vtkTypeRevisionMacro(vtkImplicitBoolean,vtkImplicitFunction);
00053   void PrintSelf(ostream& os, vtkIndent indent);
00054 
00056   static vtkImplicitBoolean *New();
00057 
00059 
00061   double EvaluateFunction(double x[3]);
00062   double EvaluateFunction(double x, double y, double z)
00063     {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
00065 
00067   void EvaluateGradient(double x[3], double g[3]);
00068 
00070   unsigned long GetMTime();
00071 
00073   void AddFunction(vtkImplicitFunction *in);
00074 
00076   void RemoveFunction(vtkImplicitFunction *in);
00077 
00079   vtkImplicitFunctionCollection *GetFunction() {return this->FunctionList;};
00080 
00082 
00083   vtkSetClampMacro(OperationType,int,VTK_UNION,VTK_UNION_OF_MAGNITUDES);
00084   vtkGetMacro(OperationType,int);
00085   void SetOperationTypeToUnion() 
00086     {this->SetOperationType(VTK_UNION);};
00087   void SetOperationTypeToIntersection() 
00088     {this->SetOperationType(VTK_INTERSECTION);};
00089   void SetOperationTypeToDifference() 
00090     {this->SetOperationType(VTK_DIFFERENCE);};
00091   void SetOperationTypeToUnionOfMagnitudes() 
00092     {this->SetOperationType(VTK_UNION_OF_MAGNITUDES);};
00093   const char *GetOperationTypeAsString();
00095   
00096 protected:
00097   vtkImplicitBoolean();
00098   ~vtkImplicitBoolean();
00099 
00100   vtkImplicitFunctionCollection *FunctionList;
00101 
00102   int OperationType;
00103 
00104 private:
00105   vtkImplicitBoolean(const vtkImplicitBoolean&);  // Not implemented.
00106   void operator=(const vtkImplicitBoolean&);  // Not implemented.
00107 };
00108 
00110 inline const char *vtkImplicitBoolean::GetOperationTypeAsString(void)
00111 {
00112   if ( this->OperationType == VTK_UNION )
00113     {
00114     return "Union";
00115     }
00116   else if ( this->OperationType == VTK_INTERSECTION ) 
00117     {
00118     return "Intersection";
00119     }
00120   else if ( this->OperationType == VTK_DIFFERENCE ) 
00121     {
00122     return "Difference";
00123     }
00124   else 
00125     {
00126     return "UnionOfMagnitudes";
00127     }
00128 }
00129 
00130 #endif
00131 
00132 

Generated by  doxygen 1.7.1