Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkCameraInterpolator.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCameraInterpolator.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 =========================================================================*/
00051 #ifndef __vtkCameraInterpolator_h
00052 #define __vtkCameraInterpolator_h
00053 
00054 #include "vtkObject.h"
00055 
00056 class vtkCamera;
00057 class vtkCameraList;
00058 class vtkTupleInterpolator;
00059 class vtkCameraList;
00060 
00061 
00062 class VTK_RENDERING_EXPORT vtkCameraInterpolator : public vtkObject
00063 {
00064 public:
00065   vtkTypeRevisionMacro(vtkCameraInterpolator, vtkObject);
00066   void PrintSelf(ostream& os, vtkIndent indent);
00067 
00069   static vtkCameraInterpolator* New();
00070 
00072   int GetNumberOfCameras();
00073 
00075 
00077   double GetMinimumT();
00078   double GetMaximumT();
00080 
00082   void Initialize();
00083   
00088   void AddCamera(double t, vtkCamera *camera);
00089 
00092   void RemoveCamera(double t);
00093 
00097   void InterpolateCamera(double t, vtkCamera *camera);
00098 
00099 //BTX
00101 
00102   enum {INTERPOLATION_TYPE_LINEAR=0,
00103         INTERPOLATION_TYPE_SPLINE,
00104         INTERPOLATION_TYPE_MANUAL
00105   };
00107 //ETX
00108 
00110 
00118   vtkSetClampMacro(InterpolationType,int, INTERPOLATION_TYPE_LINEAR,
00119                    INTERPOLATION_TYPE_MANUAL);
00120   vtkGetMacro(InterpolationType,int);
00121   void SetInterpolationTypeToLinear()
00122     {this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR);}
00123   void SetInterpolationTypeToSpline()
00124     {this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE);}
00125   void SetInterpolationTypeToManual()
00126     {this->SetInterpolationType(INTERPOLATION_TYPE_MANUAL);}
00128 
00130 
00134   virtual void SetPositionInterpolator(vtkTupleInterpolator*);
00135   vtkGetObjectMacro(PositionInterpolator,vtkTupleInterpolator);
00137 
00139   virtual void SetFocalPointInterpolator(vtkTupleInterpolator*);
00140   vtkGetObjectMacro(FocalPointInterpolator,vtkTupleInterpolator);
00142 
00144   virtual void SetViewUpInterpolator(vtkTupleInterpolator*);
00145   vtkGetObjectMacro(ViewUpInterpolator,vtkTupleInterpolator);
00147 
00149   virtual void SetViewAngleInterpolator(vtkTupleInterpolator*);
00150   vtkGetObjectMacro(ViewAngleInterpolator,vtkTupleInterpolator);
00152 
00154   virtual void SetParallelScaleInterpolator(vtkTupleInterpolator*);
00155   vtkGetObjectMacro(ParallelScaleInterpolator,vtkTupleInterpolator);
00157 
00159   virtual void SetClippingRangeInterpolator(vtkTupleInterpolator*);
00160   vtkGetObjectMacro(ClippingRangeInterpolator,vtkTupleInterpolator);
00162 
00165   unsigned long GetMTime();
00166 
00167 protected:
00168   vtkCameraInterpolator();
00169   virtual ~vtkCameraInterpolator();
00170 
00171   // Control the interpolation type
00172   int InterpolationType;
00173 
00174   // These perform the interpolation
00175   vtkTupleInterpolator *PositionInterpolator;
00176   vtkTupleInterpolator *FocalPointInterpolator;
00177   vtkTupleInterpolator *ViewUpInterpolator;
00178   vtkTupleInterpolator *ViewAngleInterpolator;
00179   vtkTupleInterpolator *ParallelScaleInterpolator;
00180   vtkTupleInterpolator *ClippingRangeInterpolator;
00181 
00182   // Initialize the interpolating splines
00183   int Initialized;
00184   vtkTimeStamp InitializeTime;
00185   void InitializeInterpolation();
00186 
00187   // Hold the list of cameras. PIMPL'd STL list.
00188   vtkCameraList *CameraList;
00189 
00190 private:
00191   vtkCameraInterpolator(const vtkCameraInterpolator&);  // Not implemented.
00192   void operator=(const vtkCameraInterpolator&);  // Not implemented.
00193 
00194 };
00195 
00196 #endif

Generated on Mon Jan 21 23:07:34 2008 for VTK by  doxygen 1.4.3-20050530