Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
datareps
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
"
20
#include "
projectors/ProjectorBase.h
"
21
22
#include "
reps/ContourFunctionRep.h
"
23
24
#include <cassert>
25
26
using namespace
hippodraw;
27
28
FunctionRep2::
29
FunctionRep2
(
FunctionBase
*
function
,
DataRep
* rep )
30
:
FunctionRep
( function, rep )
31
{
32
m_rep
=
new
ContourFunctionRep
();
33
// The above deleted in ~DataRep()
34
}
35
36
FunctionRep2::
37
FunctionRep2
(
const
FunctionRep2
& rep )
38
:
FunctionRep
( rep )
39
{
40
}
41
42
FunctionRep2::
43
~FunctionRep2
()
44
{
45
}
46
47
DataRep
*
FunctionRep2::clone
()
48
{
49
return
new
FunctionRep2
( *
this
);
50
}
51
52
bool
53
FunctionRep2::
54
hasAxis
(
hippodraw::Axes::Type
axis )
const
55
{
56
return
axis ==
Axes::X
|| axis ==
Axes::Y
|| axis ==
Axes::Z
;
57
}
58
59
void
60
FunctionRep2::
61
drawProjectedValues
(
TransformBase
* transform,
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