VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkContextActor.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 =========================================================================*/ 00026 #ifndef __vtkContextActor_h 00027 #define __vtkContextActor_h 00028 00029 #include "vtkRenderingContext2DModule.h" // For export macro 00030 #include "vtkProp.h" 00031 #include "vtkNew.h" // For ivars 00032 #include "vtkSmartPointer.h" // For ivars 00033 00034 class vtkContext2D; 00035 class vtkContext3D; 00036 class vtkContextScene; 00037 00038 class VTKRENDERINGCONTEXT2D_EXPORT vtkContextActor : public vtkProp 00039 { 00040 public: 00041 void PrintSelf(ostream& os, vtkIndent indent); 00042 vtkTypeMacro(vtkContextActor,vtkProp); 00043 00044 static vtkContextActor* New(); 00045 00047 virtual int RenderOverlay(vtkViewport *viewport); 00048 00050 00051 vtkGetNewMacro(Context, vtkContext2D); 00053 00055 vtkContextScene * GetScene(); 00056 00058 void SetScene(vtkContextScene *scene); 00059 00063 virtual void ReleaseGraphicsResources(vtkWindow *window); 00064 00065 protected: 00066 vtkContextActor(); 00067 ~vtkContextActor(); 00068 00071 void Initialize(vtkViewport* viewport); 00072 00073 vtkSmartPointer<vtkContextScene> Scene; 00074 vtkNew<vtkContext2D> Context; 00075 vtkNew<vtkContext3D> Context3D; 00076 bool Initialized; 00077 00078 private: 00079 vtkContextActor(const vtkContextActor&); // Not implemented. 00080 void operator=(const vtkContextActor&); // Not implemented. 00081 }; 00082 00083 #endif