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

dox/Widgets/vtkCameraRepresentation.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCameraRepresentation.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 =========================================================================*/
00032 #ifndef __vtkCameraRepresentation_h
00033 #define __vtkCameraRepresentation_h
00034 
00035 #include "vtkBorderRepresentation.h"
00036 
00037 class vtkRenderer;
00038 class vtkRenderWindowInteractor;
00039 class vtkCamera;
00040 class vtkCameraInterpolator;
00041 class vtkPoints;
00042 class vtkPolyData;
00043 class vtkTransformPolyDataFilter;
00044 class vtkPolyDataMapper2D;
00045 class vtkProperty2D;
00046 class vtkActor2D;
00047 
00048 class VTK_WIDGETS_EXPORT vtkCameraRepresentation : public vtkBorderRepresentation
00049 {
00050 public:
00052   static vtkCameraRepresentation *New();
00053 
00055 
00056   vtkTypeRevisionMacro(vtkCameraRepresentation,vtkBorderRepresentation);
00057   void PrintSelf(ostream& os, vtkIndent indent);
00059 
00061 
00063   void SetCamera(vtkCamera *camera);
00064   vtkGetObjectMacro(Camera,vtkCamera);
00066 
00068 
00072   void SetInterpolator(vtkCameraInterpolator *camInt);
00073   vtkGetObjectMacro(Interpolator,vtkCameraInterpolator);
00075   
00077 
00078   vtkSetClampMacro(NumberOfFrames,int,1,VTK_LARGE_INTEGER);
00079   vtkGetMacro(NumberOfFrames,int);
00081 
00083 
00085   vtkGetObjectMacro(Property,vtkProperty2D);
00087 
00089 
00094   void AddCameraToPath();
00095   void AnimatePath(vtkRenderWindowInteractor *rwi);
00096   void InitializePath();
00098 
00100 
00101   virtual void BuildRepresentation();
00102   virtual void GetSize(double size[2])
00103     {size[0]=6.0; size[1]=2.0;}
00105   
00107 
00109   virtual void GetActors2D(vtkPropCollection*);
00110   virtual void ReleaseGraphicsResources(vtkWindow*);
00111   virtual int RenderOverlay(vtkViewport*);
00112   virtual int RenderOpaqueGeometry(vtkViewport*);
00113   virtual int RenderTranslucentPolygonalGeometry(vtkViewport*);
00114   virtual int HasTranslucentPolygonalGeometry();
00116   
00117 protected:
00118   vtkCameraRepresentation();
00119   ~vtkCameraRepresentation();
00120 
00121   // the camera and the interpolator
00122   vtkCamera             *Camera;
00123   vtkCameraInterpolator *Interpolator;
00124   int                   NumberOfFrames;
00125   double                CurrentTime;
00126 
00127   // representation of the camera
00128   vtkPoints                  *Points;
00129   vtkPolyData                *PolyData;
00130   vtkTransformPolyDataFilter *TransformFilter;
00131   vtkPolyDataMapper2D        *Mapper;
00132   vtkProperty2D              *Property;
00133   vtkActor2D                 *Actor;
00134 
00135 private:
00136   vtkCameraRepresentation(const vtkCameraRepresentation&);  //Not implemented
00137   void operator=(const vtkCameraRepresentation&);  //Not implemented
00138 };
00139 
00140 #endif

Generated by  doxygen 1.7.1