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

dox/Rendering/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 
00143   virtual void SetFocalPointInterpolator(vtkTupleInterpolator*);
00144   vtkGetObjectMacro(FocalPointInterpolator,vtkTupleInterpolator);
00146 
00148 
00152   virtual void SetViewUpInterpolator(vtkTupleInterpolator*);
00153   vtkGetObjectMacro(ViewUpInterpolator,vtkTupleInterpolator);
00155 
00157 
00161   virtual void SetViewAngleInterpolator(vtkTupleInterpolator*);
00162   vtkGetObjectMacro(ViewAngleInterpolator,vtkTupleInterpolator);
00164 
00166 
00170   virtual void SetParallelScaleInterpolator(vtkTupleInterpolator*);
00171   vtkGetObjectMacro(ParallelScaleInterpolator,vtkTupleInterpolator);
00173 
00175 
00179   virtual void SetClippingRangeInterpolator(vtkTupleInterpolator*);
00180   vtkGetObjectMacro(ClippingRangeInterpolator,vtkTupleInterpolator);
00182 
00185   unsigned long GetMTime();
00186 
00187 protected:
00188   vtkCameraInterpolator();
00189   virtual ~vtkCameraInterpolator();
00190 
00191   // Control the interpolation type
00192   int InterpolationType;
00193 
00194   // These perform the interpolation
00195   vtkTupleInterpolator *PositionInterpolator;
00196   vtkTupleInterpolator *FocalPointInterpolator;
00197   vtkTupleInterpolator *ViewUpInterpolator;
00198   vtkTupleInterpolator *ViewAngleInterpolator;
00199   vtkTupleInterpolator *ParallelScaleInterpolator;
00200   vtkTupleInterpolator *ClippingRangeInterpolator;
00201 
00202   // Initialize the interpolating splines
00203   int Initialized;
00204   vtkTimeStamp InitializeTime;
00205   void InitializeInterpolation();
00206 
00207   // Hold the list of cameras. PIMPL'd STL list.
00208   vtkCameraList *CameraList;
00209 
00210 private:
00211   vtkCameraInterpolator(const vtkCameraInterpolator&);  // Not implemented.
00212   void operator=(const vtkCameraInterpolator&);  // Not implemented.
00213 
00214 };
00215 
00216 #endif

Generated by  doxygen 1.7.1