Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
plotters
Cut2DPlotter.cxx
Go to the documentation of this file.
1
12
// for truncation warning
13
#ifdef _MSC_VER
14
#include "msdevstudio/MSconfig.h"
15
#endif
16
17
#include "
Cut2DPlotter.h
"
18
19
#include "
datareps/DataRep.h
"
20
#include "
datasrcs/TupleCut.h
"
21
#include "
reps/CutRangeRep.h
"
22
23
#include <cassert>
24
25
using
std::vector;
26
27
namespace
hippodraw {
28
29
Cut2DPlotter::
30
Cut2DPlotter
( )
31
:
CutPlotter
(
"Cut2DPlotter"
)
32
{
33
setEnableZ
(
true
);
34
}
35
36
Cut2DPlotter::Cut2DPlotter
(
const
Cut2DPlotter
& plotter )
37
:
CutPlotter
( plotter )
38
{
39
setEnableZ
(
true
);
40
}
41
42
Cut2DPlotter::~Cut2DPlotter
()
43
{
44
}
45
46
PlotterBase
*
Cut2DPlotter::clone
()
47
{
48
return
new
Cut2DPlotter
( *
this
);
49
}
50
51
void
52
Cut2DPlotter::
53
addTupleCut
(
DataRep
* rep )
54
{
55
m_datarep
= rep;
56
m_datarep
-> addCut (
TupleCut
() );
57
m_datarep
-> addCut (
TupleCut
() );
58
}
59
60
61
void
62
Cut2DPlotter::
63
addDataRep
(
DataRep
* rep )
64
{
65
XyPlotter::addDataRep
( rep );
66
}
67
68
void
69
Cut2DPlotter::
70
setAxisBinding
(
const
std::vector < std::string > & bindings )
71
{
72
assert ( bindings.size () == 2 );
73
74
CutPlotter::setAxisBinding
( bindings );
75
}
76
77
void
Cut2DPlotter::setCutRangeFull
( )
78
{
79
const
Range
& rangeX =
getRange
(
Axes::X
,
false
);
80
m_datarep
->
setCutRangeAt
(rangeX, 0 );
81
82
const
Range
& rangeY =
getRange
(
Axes::Y
,
false
);
83
m_datarep
->
setCutRangeAt
( rangeY, 1 );
84
85
updateTargets
();
86
}
87
88
void
Cut2DPlotter::toggleInverted
( )
89
{
90
m_datarep
->
toggleInverted
( 0 );
91
m_datarep
->
toggleInverted
( 1 );
92
93
updateTargets
();
94
}
95
96
Range
Cut2DPlotter::getCutRangeY
( )
97
{
98
TupleCut
* cut =
getCutAt
( 1 );
99
Range
range = cut ->
getRange
();
100
101
return
range;
102
}
103
104
}
// namespace hippodraw
Generated for HippoDraw Class Library by