VTK
dox/Rendering/Core/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 "vtkRenderingCoreModule.h" // For export macro
00038 #include "vtkProp.h"
00039 #include "vtkCoordinate.h" // For vtkViewportCoordinateMacro
00040 
00041 class vtkMapper2D;
00042 class vtkProperty2D;
00043 
00044 class VTKRENDERINGCORE_EXPORT vtkActor2D : public vtkProp
00045 {
00046 public:
00047   void PrintSelf(ostream& os, vtkIndent indent);
00048   vtkTypeMacro(vtkActor2D,vtkProp);
00049 
00052   static vtkActor2D* New();
00053 
00055 
00056   virtual int RenderOverlay(vtkViewport *viewport);
00057   virtual int RenderOpaqueGeometry(vtkViewport *viewport);
00058   virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport);
00060 
00062   virtual int HasTranslucentPolygonalGeometry();
00063 
00065 
00066   virtual void SetMapper(vtkMapper2D *mapper);
00067   vtkGetObjectMacro(Mapper, vtkMapper2D);
00069 
00071 
00072   vtkSetMacro(LayerNumber, int);
00073   vtkGetMacro(LayerNumber, int);
00075 
00078   vtkProperty2D* GetProperty();
00079 
00081   virtual void SetProperty(vtkProperty2D*);
00082 
00084 
00087   vtkViewportCoordinateMacro(Position);
00089 
00091   void SetDisplayPosition(int,int);
00092 
00094 
00098   vtkViewportCoordinateMacro(Position2);
00100 
00102 
00105   void SetWidth(double w);
00106   double GetWidth();
00107   void SetHeight(double h);
00108   double GetHeight();
00110 
00112   virtual unsigned long GetMTime();
00113 
00117   virtual void GetActors2D(vtkPropCollection *pc);
00118 
00121   virtual void ShallowCopy(vtkProp *prop);
00122 
00126   virtual void ReleaseGraphicsResources(vtkWindow *);
00127 
00129 
00132   virtual vtkCoordinate *GetActualPositionCoordinate(void)
00133     { return this->PositionCoordinate; }
00135 
00137 
00140   virtual vtkCoordinate *GetActualPosition2Coordinate(void)
00141     { return this->Position2Coordinate; }
00143 
00144 protected:
00145   vtkActor2D();
00146   ~vtkActor2D();
00147 
00148   vtkMapper2D *Mapper;
00149   int LayerNumber;
00150   vtkProperty2D *Property;
00151   vtkCoordinate *PositionCoordinate;
00152   vtkCoordinate *Position2Coordinate;
00153 
00154 private:
00155   vtkActor2D(const vtkActor2D&);  // Not implemented.
00156   void operator=(const vtkActor2D&);  // Not implemented.
00157 };
00158 
00159 #endif
00160 
00161 
00162