VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Rendering
Label
vtkLabeledTreeMapDataMapper.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkLabeledTreeMapDataMapper.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
=========================================================================*/
15
/*-------------------------------------------------------------------------
16
Copyright 2008 Sandia Corporation.
17
Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18
the U.S. Government retains certain rights in this software.
19
-------------------------------------------------------------------------*/
43
#ifndef __vtkLabeledTreeMapDataMapper_h
44
#define __vtkLabeledTreeMapDataMapper_h
45
46
#include "vtkRenderingLabelModule.h"
// For export macro
47
#include "
vtkLabeledDataMapper.h
"
48
49
class
vtkTree
;
50
class
vtkPoints
;
51
class
vtkCoordinate
;
52
class
vtkFloatArray
;
53
class
vtkStringArray
;
54
class
vtkIdList
;
55
56
class
VTKRENDERINGLABEL_EXPORT
vtkLabeledTreeMapDataMapper
:
public
vtkLabeledDataMapper
57
{
58
public
:
59
static
vtkLabeledTreeMapDataMapper
*
New
();
60
vtkTypeMacro(
vtkLabeledTreeMapDataMapper
,
vtkLabeledDataMapper
);
61
void
PrintSelf
(ostream& os,
vtkIndent
indent);
62
64
65
virtual
void
RenderOpaqueGeometry
(
vtkViewport
* viewport,
vtkActor2D
* actor);
66
virtual
void
RenderOverlay
(
vtkViewport
*viewport,
vtkActor2D
*actor);
68
70
virtual
vtkTree
*GetInputTree();
71
73
virtual
void
SetRectanglesArrayName(
const
char
*
name
);
74
76
79
vtkGetMacro(ClipTextMode,
int
);
80
vtkSetMacro(ClipTextMode,
int
);
82
84
85
vtkGetMacro(ChildMotion,
int
);
86
vtkSetMacro(ChildMotion,
int
);
88
90
91
vtkGetMacro(DynamicLevel,
int
);
92
vtkSetMacro(DynamicLevel,
int
);
94
96
virtual
void
ReleaseGraphicsResources
(
vtkWindow
*);
97
99
100
void
SetFontSizeRange(
int
maxSize,
int
minSize,
int
delta=4);
101
void
GetFontSizeRange(
int
range
[3]);
103
105
107
void
SetLevelRange(
int
startLevel,
int
endLevel);
108
void
GetLevelRange(
int
range
[2]);
110
111
protected
:
112
vtkLabeledTreeMapDataMapper
();
113
~
vtkLabeledTreeMapDataMapper
();
114
void
LabelTree(
vtkTree
*tree,
vtkFloatArray
*boxInfo,
115
vtkDataArray
*numericData,
vtkStringArray
*stringData,
116
int
activeComp,
int
numComps);
117
void
GetVertexLabel(
vtkIdType
vertex,
vtkDataArray
*numericData,
118
vtkStringArray
*stringData,
int
activeComp,
int
numComps,
119
char
*
string
);
120
void
UpdateFontSizes();
121
int
UpdateWindowInfo(
vtkViewport
*viewport);
122
int
GetStringSize(
char
*
string
,
int
level
);
123
// Returns 1 if the transformed box is off screen
124
int
ConvertToDC(
float
*origBoxInfo,
float
*newBoxInfo);
125
// Returns 1 if the label will not fit in box - 2 if the text could
126
// not be placed due to other labels
127
int
AnalyseLabel(
char
*
string
,
int
level
,
float
*blimitsDC,
128
float
*textPosWC,
129
vtkTextProperty
**tprop);
130
int
ApplyMasks(
int
level
,
float
flimits[4],
float
blimits[4]);
131
vtkViewport
*
CurrentViewPort
;
132
int
*
FontHeights
;
133
int
**
FontWidths
;
134
int
MaxFontLevel
;
135
int
*
ChildrenCount
;
136
int
MaxTreeLevels
;
137
double
BoxTrans[2][2];
138
double
WindowLimits[2][2];
139
//BTX
140
float
(*LabelMasks)[4];
141
//ETX
142
vtkIdList
*
VertexList
;
143
vtkPoints
*
TextPoints
;
144
vtkCoordinate
*
VCoord
;
145
int
ClipTextMode
;
146
int
ChildMotion
;
147
int
StartLevel
;
148
int
EndLevel
;
149
int
DynamicLevel
;
150
vtkTextProperty
*
VerticalLabelProperty
;
151
vtkTextProperty
**
HLabelProperties
;
152
153
private
:
154
vtkLabeledTreeMapDataMapper
(
const
vtkLabeledTreeMapDataMapper
&);
// Not implemented.
155
void
operator=(
const
vtkLabeledTreeMapDataMapper
&);
// Not implemented.
156
};
157
158
159
#endif
Generated on Thu May 24 2012 22:22:35 for VTK by
1.8.1