Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
datareps
XYZPlot.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 "
XYZPlot.h
"
18
19
#include "
projectors/Map3Projector.h
"
20
#include "
reps/ColorSymbolPointRep.h
"
21
22
#include <stdexcept>
23
24
using namespace
hippodraw;
25
26
XYZPlot::XYZPlot
()
27
:
DataRep
()
28
{
29
m_name
=
"XYZ Plot"
;
30
31
m_projector
=
new
Map3Projector
();
32
m_rep
=
new
ColorSymbolPointRep
(
Symbol::SOLIDSQUARE
, 4.0 );
33
}
34
35
DataRep
*
XYZPlot::clone
()
36
{
37
return
new
XYZPlot
( *
this
);
38
}
39
40
bool
41
XYZPlot::
42
hasAxis
(
hippodraw::Axes::Type
axis )
const
43
{
44
return
axis ==
Axes::X
|| axis ==
Axes::Y
|| axis ==
Axes::Z
;
45
}
46
47
48
void
XYZPlot::setRepresentation
(
RepBase
* pointrep ) {
49
ColorSymbolPointRep
* rep =
dynamic_cast<
ColorSymbolPointRep
*
>
(pointrep);
50
if
(rep == 0) {
51
std::string what(
"Only ColorSymbol pointreps are allowed "
);
52
what +=
"for this datarep."
;
53
throw
std::runtime_error(what);
54
}
55
}
Generated for HippoDraw Class Library by