VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Rendering
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 "
vtkLabeledDataMapper.h
"
47
48
class
vtkTree
;
49
class
vtkPoints
;
50
class
vtkCoordinate
;
51
class
vtkFloatArray
;
52
class
vtkStringArray
;
53
class
vtkIdList
;
54
55
class
VTK_RENDERING_EXPORT
vtkLabeledTreeMapDataMapper
:
public
vtkLabeledDataMapper
56
{
57
public
:
58
static
vtkLabeledTreeMapDataMapper
*
New
();
59
vtkTypeMacro(
vtkLabeledTreeMapDataMapper
,
vtkLabeledDataMapper
);
60
void
PrintSelf
(ostream& os,
vtkIndent
indent);
61
63
64
virtual
void
RenderOpaqueGeometry
(
vtkViewport
* viewport,
vtkActor2D
* actor);
65
virtual
void
RenderOverlay
(
vtkViewport
*viewport,
vtkActor2D
*actor);
67
69
virtual
vtkTree
*GetInputTree();
70
72
virtual
void
SetRectanglesArrayName(
const
char
*
name
);
73
75
78
vtkGetMacro(ClipTextMode,
int
);
79
vtkSetMacro(ClipTextMode,
int
);
81
83
84
vtkGetMacro(ChildMotion,
int
);
85
vtkSetMacro(ChildMotion,
int
);
87
89
90
vtkGetMacro(DynamicLevel,
int
);
91
vtkSetMacro(DynamicLevel,
int
);
93
95
virtual
void
ReleaseGraphicsResources
(
vtkWindow
*);
96
98
99
void
SetFontSizeRange(
int
maxSize,
int
minSize,
int
delta=4);
100
void
GetFontSizeRange(
int
range
[3]);
102
104
106
void
SetLevelRange(
int
startLevel,
int
endLevel);
107
void
GetLevelRange(
int
range
[2]);
109
110
protected
:
111
vtkLabeledTreeMapDataMapper
();
112
~
vtkLabeledTreeMapDataMapper
();
113
void
LabelTree(
vtkTree
*tree,
vtkFloatArray
*boxInfo,
114
vtkDataArray
*numericData,
vtkStringArray
*stringData,
115
int
activeComp,
int
numComps);
116
void
GetVertexLabel(
vtkIdType
vertex,
vtkDataArray
*numericData,
117
vtkStringArray
*stringData,
int
activeComp,
int
numComps,
118
char
*
string
);
119
void
UpdateFontSizes();
120
int
UpdateWindowInfo(
vtkViewport
*viewport);
121
int
GetStringSize(
char
*
string
,
int
level
);
122
// Returns 1 if the transformed box is off screen
123
int
ConvertToDC(
float
*origBoxInfo,
float
*newBoxInfo);
124
// Returns 1 if the label will not fit in box - 2 if the text could
125
// not be placed due to other labels
126
int
AnalyseLabel(
char
*
string
,
int
level
,
float
*blimitsDC,
127
float
*textPosWC,
128
vtkTextProperty
**tprop);
129
int
ApplyMasks(
int
level
,
float
flimits[4],
float
blimits[4]);
130
vtkViewport
*
CurrentViewPort
;
131
int
*
FontHeights
;
132
int
**
FontWidths
;
133
int
MaxFontLevel
;
134
int
*
ChildrenCount
;
135
int
MaxTreeLevels
;
136
double
BoxTrans[2][2];
137
double
WindowLimits[2][2];
138
//BTX
139
float (*LabelMasks)[4];
140
//ETX
141
vtkIdList
*
VertexList
;
142
vtkPoints
*
TextPoints
;
143
vtkCoordinate
*
VCoord
;
144
int
ClipTextMode
;
145
int
ChildMotion
;
146
int
StartLevel
;
147
int
EndLevel
;
148
int
DynamicLevel
;
149
vtkTextProperty
*
VerticalLabelProperty
;
150
vtkTextProperty
**
HLabelProperties
;
151
152
private
:
153
vtkLabeledTreeMapDataMapper
(
const
vtkLabeledTreeMapDataMapper
&);
// Not implemented.
154
void
operator=(
const
vtkLabeledTreeMapDataMapper
&);
// Not implemented.
155
};
156
157
158
#endif
Generated on Wed Nov 21 2012 21:34:04 for VTK by
1.8.2