00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkActor2D.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 =========================================================================*/ 00044 #ifndef __vtkActor2D_h 00045 #define __vtkActor2D_h 00046 00047 #include "vtkProp.h" 00048 #include "vtkCoordinate.h" // For vtkViewportCoordinateMacro 00049 00050 class vtkMapper2D; 00051 class vtkProperty2D; 00052 00053 class VTK_FILTERING_EXPORT vtkActor2D : public vtkProp 00054 { 00055 public: 00056 void PrintSelf(ostream& os, vtkIndent indent); 00057 vtkTypeRevisionMacro(vtkActor2D,vtkProp); 00058 00061 static vtkActor2D* New(); 00062 00064 00065 int RenderOverlay(vtkViewport *viewport); 00066 int RenderOpaqueGeometry(vtkViewport *viewport); 00067 int RenderTranslucentGeometry(vtkViewport *viewport); 00069 00071 00072 virtual void SetMapper(vtkMapper2D *mapper); 00073 vtkGetObjectMacro(Mapper, vtkMapper2D); 00075 00077 00078 vtkSetMacro(LayerNumber, int); 00079 vtkGetMacro(LayerNumber, int); 00081 00084 vtkProperty2D* GetProperty(); 00085 00087 virtual void SetProperty(vtkProperty2D*); 00088 00090 00093 vtkViewportCoordinateMacro(Position); 00095 00097 void SetDisplayPosition(int,int); 00098 00100 00104 vtkViewportCoordinateMacro(Position2); 00106 00108 00111 void SetWidth(double w); 00112 double GetWidth(); 00113 void SetHeight(double h); 00114 double GetHeight(); 00116 00118 unsigned long GetMTime(); 00119 00123 virtual void GetActors2D(vtkPropCollection *pc); 00124 00127 void ShallowCopy(vtkProp *prop); 00128 00132 virtual void ReleaseGraphicsResources(vtkWindow *); 00133 00135 00138 virtual vtkCoordinate *GetActualPositionCoordinate(void) 00139 { return this->PositionCoordinate; } 00141 00143 00146 virtual vtkCoordinate *GetActualPosition2Coordinate(void) 00147 { return this->Position2Coordinate; } 00149 00150 protected: 00151 vtkActor2D(); 00152 ~vtkActor2D(); 00153 00154 vtkMapper2D *Mapper; 00155 int LayerNumber; 00156 vtkProperty2D *Property; 00157 vtkCoordinate *PositionCoordinate; 00158 vtkCoordinate *Position2Coordinate; 00159 private: 00160 vtkActor2D(const vtkActor2D&); // Not implemented. 00161 void operator=(const vtkActor2D&); // Not implemented. 00162 }; 00163 00164 #endif 00165 00166 00167