VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkDynamic2DLabelMapper.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 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright 2008 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 00019 -------------------------------------------------------------------------*/ 00061 #ifndef __vtkDynamic2DLabelMapper_h 00062 #define __vtkDynamic2DLabelMapper_h 00063 00064 #include "vtkRenderingLabelModule.h" // For export macro 00065 #include "vtkLabeledDataMapper.h" 00066 00067 class VTKRENDERINGLABEL_EXPORT vtkDynamic2DLabelMapper : public vtkLabeledDataMapper 00068 { 00069 public: 00071 00073 static vtkDynamic2DLabelMapper *New(); 00074 vtkTypeMacro(vtkDynamic2DLabelMapper, vtkLabeledDataMapper); 00075 void PrintSelf(ostream& os, vtkIndent indent); 00077 00080 void SetPriorityArrayName(const char* name); 00081 00083 00085 vtkSetMacro(ReversePriority, bool); 00086 vtkGetMacro(ReversePriority, bool); 00087 vtkBooleanMacro(ReversePriority, bool); 00089 00091 00093 vtkSetMacro(LabelHeightPadding, float); 00094 vtkGetMacro(LabelHeightPadding, float); 00096 00098 00100 vtkSetMacro(LabelWidthPadding, float); 00101 vtkGetMacro(LabelWidthPadding, float); 00103 00105 00106 void RenderOpaqueGeometry(vtkViewport* viewport, vtkActor2D* actor); 00107 void RenderOverlay(vtkViewport *viewport, vtkActor2D *actor); 00109 00110 protected: 00111 vtkDynamic2DLabelMapper(); 00112 ~vtkDynamic2DLabelMapper(); 00113 00115 double GetCurrentScale(vtkViewport *viewport); 00116 00117 float* LabelWidth; 00118 float* LabelHeight; 00119 float* Cutoff; 00120 float ReferenceScale; 00121 float LabelHeightPadding; 00122 float LabelWidthPadding; 00123 00124 bool ReversePriority; 00125 00126 private: 00127 vtkDynamic2DLabelMapper(const vtkDynamic2DLabelMapper&); // Not implemented. 00128 void operator=(const vtkDynamic2DLabelMapper&); // Not implemented. 00129 }; 00130 00131 #endif 00132