Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
datareps
FunctionRep1.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 "
FunctionRep1.h
"
18
19
#include "
functions/FunctionBase.h
"
20
#include "
projectors/ProjectorBase.h
"
21
22
#include "
reps/LineFunctionRep.h
"
23
24
#include <cassert>
25
26
using namespace
hippodraw;
27
28
FunctionRep1::
29
FunctionRep1
(
FunctionBase
*
function
,
DataRep
* rep )
30
:
FunctionRep
( function, rep )
31
{
32
m_rep
=
new
LineFunctionRep
();
33
// The above deleted in ~DataRep()
34
35
const
Color
red (
Color::red
);
36
m_rep
->
setColor
( red );
37
}
38
39
FunctionRep1::
40
FunctionRep1
(
const
FunctionRep1
& rep )
41
:
FunctionRep
( rep )
42
{
43
}
44
45
FunctionRep1::
46
~FunctionRep1
()
47
{
48
}
49
50
DataRep
*
FunctionRep1::clone
()
51
{
52
return
new
FunctionRep1
( *
this
);
53
}
54
55
bool
56
FunctionRep1::
57
hasAxis
(
hippodraw::Axes::Type
axis )
const
58
{
59
return
axis ==
Axes::X
|| axis ==
Axes::Y
;
60
}
61
62
void
63
FunctionRep1::
64
drawProjectedValues
(
TransformBase
* transform,
65
ViewBase
* view )
66
{
67
drawCuts
( transform, view );
68
69
const
Range
& range =
m_projector
-> getRange (
Axes::X
);
70
FunctionBase
*
function
=
getFunction
();
71
LineFunctionRep
* rep = dynamic_cast <
LineFunctionRep
* > (
m_rep
);
72
assert ( rep != 0 );
73
74
rep ->
drawProjectedValues
( range,
function
, transform, view );
75
76
setDirty
(
false
);
77
}
Generated for HippoDraw Class Library by