VTK
dox/Filtering/vtkActor2D.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkActor2D.h
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 =========================================================================*/
00034 #ifndef __vtkActor2D_h
00035 #define __vtkActor2D_h
00036 
00037 #include "vtkProp.h"
00038 #include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
00039 
00040 class vtkMapper2D;
00041 class vtkProperty2D;
00042 
00043 class VTK_FILTERING_EXPORT vtkActor2D : public vtkProp
00044 {
00045 public:
00046   void PrintSelf(ostream& os, vtkIndent indent);
00047   vtkTypeMacro(vtkActor2D,vtkProp);
00048 
00051   static vtkActor2D* New();
00052   
00054 
00055   virtual int RenderOverlay(vtkViewport *viewport);
00056   virtual int RenderOpaqueGeometry(vtkViewport *viewport);
00057   virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport);
00059 
00061   virtual int HasTranslucentPolygonalGeometry();
00062   
00064 
00065   virtual void SetMapper(vtkMapper2D *mapper);
00066   vtkGetObjectMacro(Mapper, vtkMapper2D);
00068 
00070 
00071   vtkSetMacro(LayerNumber, int);
00072   vtkGetMacro(LayerNumber, int);
00074 
00077   vtkProperty2D* GetProperty();
00078 
00080   virtual void SetProperty(vtkProperty2D*);
00081 
00083 
00086   vtkViewportCoordinateMacro(Position);
00088 
00090   void SetDisplayPosition(int,int);
00091 
00093 
00097   vtkViewportCoordinateMacro(Position2);
00099 
00101 
00104   void SetWidth(double w);
00105   double GetWidth();
00106   void SetHeight(double h);
00107   double GetHeight();
00109 
00111   virtual unsigned long GetMTime();
00112 
00116   virtual void GetActors2D(vtkPropCollection *pc);
00117 
00120   virtual void ShallowCopy(vtkProp *prop);
00121 
00125   virtual void ReleaseGraphicsResources(vtkWindow *);
00126 
00128 
00131   virtual vtkCoordinate *GetActualPositionCoordinate(void)
00132     { return this->PositionCoordinate; }
00134 
00136 
00139   virtual vtkCoordinate *GetActualPosition2Coordinate(void)
00140     { return this->Position2Coordinate; }
00142 
00143 protected:
00144   vtkActor2D();
00145   ~vtkActor2D();
00146 
00147   vtkMapper2D *Mapper;
00148   int LayerNumber;
00149   vtkProperty2D *Property;
00150   vtkCoordinate *PositionCoordinate;
00151   vtkCoordinate *Position2Coordinate;
00152 
00153 private:
00154   vtkActor2D(const vtkActor2D&);  // Not implemented.
00155   void operator=(const vtkActor2D&);  // Not implemented.
00156 };
00157 
00158 #endif
00159 
00160 
00161