00001 00012 // for truncation warning in debug mode 00013 #ifdef _MSC_VER 00014 #include "msdevstudio/MSconfig.h" 00015 #endif 00016 00017 #include "XYZPlot.h" 00018 00019 #include "projectors/Map3Projector.h" 00020 #include "reps/ColorSymbolPointRep.h" 00021 00022 #include <stdexcept> 00023 00024 using namespace hippodraw; 00025 00026 XYZPlot::XYZPlot () 00027 : DataRep () 00028 { 00029 m_name = "XYZ Plot"; 00030 00031 m_projector = new Map3Projector(); 00032 m_rep = new ColorSymbolPointRep ( Symbol::SOLIDSQUARE, 4.0 ); 00033 } 00034 00035 DataRep * XYZPlot::clone () 00036 { 00037 return new XYZPlot ( *this ); 00038 } 00039 00040 bool 00041 XYZPlot:: 00042 hasAxis ( hippodraw::Axes::Type axis ) const 00043 { 00044 return axis == Axes::X || axis == Axes::Y || axis ==Axes::Z; 00045 } 00046 00047 00048 void XYZPlot::setRepresentation( RepBase * pointrep ) { 00049 ColorSymbolPointRep * rep = dynamic_cast<ColorSymbolPointRep *>(pointrep); 00050 if (rep == 0) { 00051 std::string what("Only ColorSymbol pointreps are allowed "); 00052 what += "for this datarep."; 00053 throw std::runtime_error(what); 00054 } 00055 }