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

patented/vtkSweptSurface.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkSweptSurface.h,v $
00005   Language:  C++
00006 
00007 
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen 
00009 All rights reserved.
00010 
00011     THIS CLASS IS PATENTED UNDER UNITED STATES PATENT NUMBER 5,542,036
00012     "Implicit Modeling of Swept Volumes and Swept Surfaces"
00013     Application of this software for commercial purposes requires 
00014     a license grant from GE. Contact:
00015         Jerald Roehling
00016         GE Licensing
00017         One Independence Way
00018         PO Box 2023
00019         Princeton, N.J. 08540
00020         phone 609-734-9823
00021         e-mail:[email protected]
00022     for more information.
00023 
00024 Redistribution and use in source and binary forms, with or without
00025 modification, are permitted provided that the following conditions are met:
00026 
00027  * Redistributions of source code must retain the above copyright notice,
00028    this list of conditions and the following disclaimer.
00029 
00030  * Redistributions in binary form must reproduce the above copyright notice,
00031    this list of conditions and the following disclaimer in the documentation
00032    and/or other materials provided with the distribution.
00033 
00034  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00035    of any contributors may be used to endorse or promote products derived
00036    from this software without specific prior written permission.
00037 
00038  * Modified source versions must be plainly marked as such, and must not be
00039    misrepresented as being the original software.
00040 
00041 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00042 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00043 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00044 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00045 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00046 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00047 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00048 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00049 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00050 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00051 
00052 =========================================================================*/
00082 #ifndef __vtkSweptSurface_h
00083 #define __vtkSweptSurface_h
00084 
00085 #include "vtkStructuredPointsToStructuredPointsFilter.h"
00086 #include "vtkTransformCollection.h"
00087 
00088 class VTK_EXPORT vtkSweptSurface : public vtkStructuredPointsToStructuredPointsFilter
00089 {
00090 public:
00091   static vtkSweptSurface *New();
00092   vtkTypeMacro(vtkSweptSurface,vtkStructuredPointsToStructuredPointsFilter);
00093   void PrintSelf(ostream& os, vtkIndent indent);
00094 
00097   vtkSetVector3Macro(SampleDimensions,int);
00098   vtkGetVectorMacro(SampleDimensions,int,3);
00099 
00102   vtkSetObjectMacro(Transforms, vtkTransformCollection);
00103   vtkGetObjectMacro(Transforms, vtkTransformCollection);
00104 
00108   vtkSetMacro(FillValue,float);
00109   vtkGetMacro(FillValue,float);
00110 
00121   vtkSetMacro(NumberOfInterpolationSteps,int);
00122   vtkGetMacro(NumberOfInterpolationSteps,int);
00123 
00127   vtkSetMacro(MaximumNumberOfInterpolationSteps,int);
00128   vtkGetMacro(MaximumNumberOfInterpolationSteps,int);
00129 
00135   vtkSetMacro(Capping,int);
00136   vtkGetMacro(Capping,int);
00137   vtkBooleanMacro(Capping,int);
00138   
00144   vtkSetVectorMacro(ModelBounds,float,6);
00145   vtkGetVectorMacro(ModelBounds,float,6);
00146   void SetModelBounds(float xmin, float xmax, float ymin, float ymax, 
00147                       float zmin, float zmax);
00148 
00153   vtkSetMacro(AdjustBounds,int);
00154   vtkGetMacro(AdjustBounds,int);
00155   vtkBooleanMacro(AdjustBounds,int);
00156   
00160   vtkSetClampMacro(AdjustDistance,float,-1.0,1.0);
00161   vtkGetMacro(AdjustDistance,float);
00162 
00163   //overload to check transformation matrices
00164   unsigned long int GetMTime();
00165 
00166 protected:
00167   vtkSweptSurface();
00168   ~vtkSweptSurface();
00169   vtkSweptSurface(const vtkSweptSurface&) {};
00170   void operator=(const vtkSweptSurface&) {};
00171 
00172   void Execute();
00173 
00174   void ComputeBounds(float origin[3], float ar[3], float bbox[24]);
00175   int ComputeNumberOfSteps(vtkTransform *t1, vtkTransform *t2, float bbox[24]);
00176   void SampleInput(vtkMatrix4x4 *m, int inDim[3], float inOrigin[3],
00177                    float inAr[3], vtkScalars *in, vtkScalars *out);
00178   void ComputeFootprint (vtkMatrix4x4 *m, int inDim[3], float inOrigin[3],
00179           float inSpacing[3], int Indicies[6]);
00180   void Cap(vtkScalars *s);
00181   void GetRelativePosition(vtkTransform &t, float *origin, float *position);
00182   vtkMatrix4x4* GetActorMatrixPointer(vtkTransform &t,
00183                  float origin[3],
00184                  float position[3], float orientation[3]);
00185   virtual void InterpolateStates(float *pos1, float *pos2, float *euler1, 
00186       float *euler2, float t, float *posOut, float *eulerOut);
00187 
00188   int SampleDimensions[3];
00189   float FillValue;
00190   float ModelBounds[6];
00191   int NumberOfInterpolationSteps;
00192   int MaximumNumberOfInterpolationSteps;
00193   int Capping;
00194   int AdjustBounds;
00195   float AdjustDistance;
00196 
00197   vtkTransformCollection *Transforms;
00198 
00199 private:
00200   //used to perform computations
00201   vtkTransform *T;
00202 };
00203 
00204 #endif
00205 
00206 

Generated on Wed Nov 21 12:27:09 2001 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001