ParaView
vtkRulerSourceRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkRulerSourceRepresentation.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
22 #ifndef vtkRulerSourceRepresentation_h
23 #define vtkRulerSourceRepresentation_h
24 
25 #include "vtkNew.h" //needed for instances of vtkPVCacheKeeper, vtkPolyData
26 #include "vtkPVClientServerCoreRenderingModule.h" //needed for exports
28 
29 class vtkDistanceRepresentation2D;
30 class vtkPolyData;
31 class vtkProperty2D;
32 class vtkPVCacheKeeper;
33 class vtkTextProperty;
34 
35 class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtkRulerSourceRepresentation
37 {
38 public:
39  static vtkRulerSourceRepresentation* New();
41  void PrintSelf(ostream& os, vtkIndent indent);
42 
44 
47  void SetDistanceRepresentation(vtkDistanceRepresentation2D*);
48  vtkGetObjectMacro(DistanceRepresentation, vtkDistanceRepresentation2D);
50 
54  void SetTextProperty(vtkTextProperty* prop);
55 
59  void SetAxisLineWidth(float width);
60 
64  void SetAxisColor(double red, double green, double blue);
65 
66  virtual void MarkModified();
67 
71  virtual void SetVisibility(bool);
72 
78  void SetLabelFormat(char* labelFormat);
79 
81 
88  void SetRulerMode(int choice);
89  int GetRulerMode();
91 
93 
98  void SetRulerDistance(double distance);
99  double GetRulerDistance();
101 
103 
108  void SetScale(double distance);
109  double GetScale();
111 
117  void SetNumberOfRulerTicks(int numberOfRulerTicks);
118 
125  int ProcessViewRequest(
126  vtkInformationRequestKey* request_type, vtkInformation* inInfo, vtkInformation* outInfo);
127 
128 protected:
131 
132  virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
133 
137  virtual int FillInputPortInformation(int port, vtkInformation* info);
138 
144  virtual bool AddToView(vtkView* view);
145 
151  virtual bool RemoveFromView(vtkView* view);
152 
156  virtual bool IsCached(double cache_key);
157 
158  vtkDistanceRepresentation2D* DistanceRepresentation;
159  vtkNew<vtkPVCacheKeeper> CacheKeeper;
160  vtkNew<vtkPolyData> Clone;
161 
162 private:
164  void operator=(const vtkRulerSourceRepresentation&) VTK_DELETE_FUNCTION;
165 };
166 
167 #endif
vtkNew< vtkPVCacheKeeper > CacheKeeper
void PrintSelf(ostream &os, vtkIndent indent)
vtkPVDataRepresentation adds some ParaView specific API to data representations.
virtual bool IsCached(double cache_key)
Subclasses should override this method when they support caching to indicate if the particular key is...
virtual void SetVisibility(bool val)
Get/Set the visibility for this representation.
virtual bool AddToView(vtkView *view)
Making these methods public.
virtual int ProcessViewRequest(vtkInformationRequestKey *request_type, vtkInformation *inInfo, vtkInformation *outInfo)
vtkAlgorithm::ProcessRequest() equivalent for rendering passes.
vtkDistanceRepresentation2D * DistanceRepresentation
virtual void MarkModified()
This is one of the most important functions.
virtual bool RemoveFromView(vtkView *view)
Making these methods public.
manages data cache for flip book animations.
vtkRulerSourceRepresentation is a representation to show a ruler.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Overridden to invoke vtkCommand::UpdateDataEvent.