14 #include "msdevstudio/MSconfig.h"
28 using namespace hippodraw;
51 m_color_gen ( rep.m_color_gen->
clone () )
79 namespace dp = hippodraw::DataPoint3DTuple;
91 unsigned int size = ntuple -> rows ();
97 double high = range.
high();
98 double low = range.
low();
100 bt -> transformZ ( high );
101 bt -> transformZ ( low );
103 Range newrange ( low, high, range.
pos() );
108 if ( size == 0 )
return;
110 m_x.reserve ( size );
111 m_y.reserve ( size );
114 for (
unsigned int i = 0;
i <
size;
i++ ) {
115 const vector < double > & row = ntuple -> getRow (
i );
117 double value = row [
dp::Z ];
119 if ( range.
includes ( value ) == false )
continue;
122 const Range & limit_z = bt -> limitZ ();
123 bool retval = limit_z.
includes ( value );
124 if ( retval ==
false )
continue;
126 if ( retval ==
false )
continue;
128 bt -> transformZ ( value );
136 bint -> transform (
m_x,
m_y);
double high() const
Returns the maximum of the range object.
std::vector< Color > m_colors
A cache of the colors to be used.
virtual void setValueTransform(BinToColor *)
Sets the value transform.
A transform that transforms coordinates from one coordinate system to another.
The base class for the value to the color transformation.
hippodraw::Symbol::Type m_plot_symbol
The PlotSymbol currently used.
static BinToColorFactory * instance()
Returns a pointer to the singleton instance.
~ColorSymbolPointRep()
The destructor.
Type
Enumeration of the type of symbols supported by this class.
ColorSymbolPointRep()
The default constructor.
virtual RepBase * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
void beginPlot(unsigned int size, const BinaryTransform *tf, const ViewBase *view)
Sets the value of cached data members.
ColorSymbolPointRep class interface.
bool includes(double value) const
Returns true if the argument value is inside the range.
Value
A few common colors.
std::string m_name
The name of the representation.
A Color class for creating the color object following the standard RGB color space.
hippodraw::DataSource class interface.
A PointRep class draws a symbol to represent the value.
std::vector< double > m_y
A cache of the points to be drawn on the Y axis.
hippodraw::BinaryTransform class interface
numeric::array clone(numeric::array arr)
hippodraw::BinToColor class interface
intp size(numeric::array arr)
virtual const Color & color() const
Returns the representation's color.
virtual bool uses(Color::Value) const
Returns false as this classes uses color for a Z value.
bool drawProjectedValue(unsigned int i, const DataSource *ntuple, const BinaryTransform *transform, ViewBase *view)
Draws a projected value.
float m_size
The size of the representation.
virtual void drawProjectedValues(const DataSource *ntuple, TransformBase *transform, ViewBase *view)
virtual const BinToColor * getValueTransform() const
Returns the value transform.
A PointRep class draws a symbol to represent the coordinate in a color that represents the value...
The abstract base class for views.
std::vector< double > m_x
A cache of the points to be drawn on the X axis.
A transform that transforms coordinates from one 2D coordinate system to another. ...
A factory for creation of objects whose class is derived from BinToColor.
double low() const
Returns the minimum of the range object.
Expresses a range of values.
BinToColor * m_color_gen
The color scale generator.
hippodraw::DataPointTuple namespace interface
hippodraw::ViewBase class interface
float size() const
Returns the size of the representation.
The base class for the point representation hierarchy.
double pos() const
Returns the first positive element in range.
void setRange(const Range &r)
Sets the range of the values passed.
BinToColorFactory class interface.
Base class for DataSource.