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 
31  : CutPlotter ( "Cut2DPlotter" )
32 {
33  setEnableZ ( true );
34 }
35 
37  : CutPlotter ( plotter )
38 {
39  setEnableZ ( true );
40 }
41 
43 {
44 }
45 
47 {
48  return new Cut2DPlotter ( *this );
49 }
50 
51 void
54 {
55  m_datarep = rep;
56  m_datarep -> addCut ( TupleCut () );
57  m_datarep -> addCut ( TupleCut () );
58 }
59 
60 
61 void
64 {
65  XyPlotter::addDataRep ( rep );
66 }
67 
68 void
70 setAxisBinding ( const std::vector < std::string > & bindings )
71 {
72  assert ( bindings.size () == 2 );
73 
74  CutPlotter::setAxisBinding ( bindings );
75 }
76 
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 
89 {
90  m_datarep -> toggleInverted ( 0 );
91  m_datarep -> toggleInverted ( 1 );
92 
93  updateTargets ();
94 }
95 
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 doxygen