FunctionRep2.cxx
Go to the documentation of this file.
1 
12 // for truncation warning in debug mode
13 #ifdef _MSC_VER
14 #include "msdevstudio/MSconfig.h"
15 #endif
16 
17 #include "FunctionRep2.h"
18 
19 #include "functions/FunctionBase.h"
21 
23 
24 #include <cassert>
25 
26 using namespace hippodraw;
27 
29 FunctionRep2 ( FunctionBase * function, DataRep * rep )
30  : FunctionRep ( function, rep )
31 {
32  m_rep = new ContourFunctionRep();
33  // The above deleted in ~DataRep()
34 }
35 
37 FunctionRep2 ( const FunctionRep2 & rep )
38  : FunctionRep ( rep )
39 {
40 }
41 
44 {
45 }
46 
48 {
49  return new FunctionRep2 ( *this );
50 }
51 
52 bool
55 {
56  return axis == Axes::X || axis == Axes::Y || axis == Axes::Z;
57 }
58 
59 void
62  ViewBase * view )
63 {
64  drawCuts ( transform, view );
65 
66  const Range & x_range = m_projector -> getRange ( Axes::X );
67  const Range & y_range = m_projector -> getRange ( Axes::Y );
68  FunctionBase * function = getFunction ();
69  ContourFunctionRep * rep = dynamic_cast < ContourFunctionRep * > ( m_rep );
70  assert ( rep != 0 );
71 
72  rep -> drawProjectedValues ( x_range, y_range, function, transform, view );
73 
74  setDirty ( false );
75 }

Generated for HippoDraw Class Library by doxygen