VTK  9.2.6
vtkLabeledContourMapper.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkLabeledContourMapper.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm 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=========================================================================*/
31
32#ifndef vtkLabeledContourMapper_h
33#define vtkLabeledContourMapper_h
34
35#include "vtkRenderingCoreModule.h" // For export macro
36
37#include "vtkMapper.h"
38#include "vtkNew.h" // For vtkNew
39#include "vtkSmartPointer.h" // For vtkSmartPointer
40
41class vtkDoubleArray;
42class vtkTextActor3D;
43class vtkTextProperty;
45class vtkPolyData;
47
48class VTKRENDERINGCORE_EXPORT vtkLabeledContourMapper : public vtkMapper
49{
50public:
53 void PrintSelf(ostream& os, vtkIndent indent) override;
54
55 void Render(vtkRenderer* ren, vtkActor* act) override;
56
58
64
66
70 double* GetBounds() override;
71 void GetBounds(double bounds[6]) override;
73
81 virtual void SetTextProperty(vtkTextProperty* tprop);
82
84
104
106
115
117
122 vtkSetMacro(LabelVisibility, bool);
123 vtkGetMacro(LabelVisibility, bool);
124 vtkBooleanMacro(LabelVisibility, bool);
126
128
132 vtkSetMacro(SkipDistance, double);
133 vtkGetMacro(SkipDistance, double);
135
137
142
144
145protected:
148
149 virtual void ComputeBounds();
150
152
153 void Reset();
154
160 virtual bool CreateLabels(vtkActor* actor);
162 virtual bool ApplyStencil(vtkRenderer* ren, vtkActor* act);
164 virtual bool RemoveStencil(vtkRenderer* ren);
166
169
171
176
180
183 unsigned int* StencilQuadIndices;
186
188
189private:
191 void operator=(const vtkLabeledContourMapper&) = delete;
192
193 struct Private;
194 Private* Internal;
195};
196
197#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:52
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition vtkIndent.h:40
Store vtkAlgorithm input/output information.
void Render(vtkRenderer *ren, vtkActor *act) override
Method initiates the mapping process.
bool PrepareRender(vtkRenderer *ren, vtkActor *act)
~vtkLabeledContourMapper() override
bool RenderLabels(vtkRenderer *ren, vtkActor *act)
vtkPolyData * GetInput()
Specify the input data to map.
vtkNew< vtkPolyDataMapper > PolyDataMapper
virtual void SetTextProperty(vtkTextProperty *tprop)
The text property used to label the lines.
bool AllocateTextActors(vtkIdType num)
void GetBounds(double bounds[6]) override
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
double * GetBounds() override
Return bounding box (array of six doubles) of data expressed as (xmin,xmax, ymin,ymax,...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual bool ApplyStencil(vtkRenderer *ren, vtkActor *act)
virtual vtkTextPropertyCollection * GetTextProperties()
The text properties used to label the lines.
void SetInputData(vtkPolyData *in)
Specify the input data to map.
vtkSmartPointer< vtkDoubleArray > TextPropertyMapping
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this mapper.
vtkSmartPointer< vtkTextPropertyCollection > TextProperties
virtual bool CreateLabels(vtkActor *actor)
virtual void ComputeBounds()
bool CheckInputs(vtkRenderer *ren)
virtual void SetTextProperties(vtkTextPropertyCollection *coll)
The text properties used to label the lines.
static vtkLabeledContourMapper * New()
bool CheckRebuild(vtkRenderer *ren, vtkActor *act)
bool RenderPolyData(vtkRenderer *ren, vtkActor *act)
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
virtual vtkDoubleArray * GetTextPropertyMapping()
Values in this array correspond to vtkTextProperty objects in the TextProperties collection.
vtkGetNewMacro(PolyDataMapper, vtkPolyDataMapper)
The polydata mapper used to render the contours.
virtual void SetTextPropertyMapping(vtkDoubleArray *mapping)
Values in this array correspond to vtkTextProperty objects in the TextProperties collection.
virtual bool RemoveStencil(vtkRenderer *ren)
Allocate and hold a VTK object.
Definition vtkNew.h:62
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:91
abstract specification for renderers
Definition vtkRenderer.h:73
Hold a reference to a vtkObjectBase instance.
An actor that displays text.
an ordered list of vtkTextProperty objects.
represent text properties.
record modification and/or execution time
window superclass for vtkRenderWindow
Definition vtkWindow.h:39
int vtkIdType
Definition vtkType.h:332