14 #include "msdevstudio/MSconfig.h"
40 m_plot_symbol( symbol )
56 m_x_flag( point_rep.m_x_flag ),
57 m_y_flag( point_rep.m_y_flag ),
58 m_plot_symbol( point_rep.m_plot_symbol )
140 double alpha,
double beta,
double gamma,
bool negative )
142 if ( negative ==
false ) lat-=180.0;
145 lat = M_PI * lat / 180.0;
146 lon = M_PI * lon / 180.0;
147 alpha = M_PI * alpha / 180.0;
148 beta = M_PI * beta / 180.0;
149 gamma = M_PI * gamma / 180.0;
153 double x = cos( lat ) * cos( lon );
154 double y = sin( lat ) * cos( lon );
155 double z = sin( lon );
159 double ry = y * cos( alpha ) + z * sin( alpha );
160 double rz = - y * sin( alpha ) + z * cos( alpha );
162 x = rx; y = ry; z = rz;
165 rx = x * cos( beta ) - z * sin( beta );
167 rz = x * sin( beta ) + z * cos( beta );
169 x = rx; y = ry; z = rz;
172 rx = x * cos( gamma ) + y * sin( gamma );
173 ry = - x * sin( gamma ) + y * cos( gamma );
176 x = rx; y = ry; z = rz;
179 lon = ( 180.0 / M_PI ) * asin( z );
180 lat = ( 180.0 / M_PI ) * atan2( y, x );
182 if (negative==
false) lat+=180.0;
196 unsigned int size = ntuple -> rows ();
197 if ( size == 0 )
return;
204 for (
unsigned int i = 0; i <
size; i++ ) {
211 tf -> transform (
m_x,
m_y);
228 m_x.reserve ( size );
229 m_y.reserve ( size );
234 if ( tf -> isPeriodic () ) {
251 const vector < double > & row = ntuple -> getRow ( i );
252 double x = row [
dp::X ];
253 double y = row [
dp::Y ];
258 if ( tf -> isPeriodic() )
float m_size
The size of the representation.
A Periodic transform that transforms coordinates from one 2D coordinate system to another...
A PointRep class draws a symbol to represent the value.
static void rotate(double &lat, double &lon, double alpha, double beta, double gamma, bool negative=true)
Rotates the coordinate.
The base class for the point representation hierarchy.
SymbolPointRep()
The default constructor.
virtual bool xError() const
Returns true if the point representation displays error on the X axis.
virtual bool uses(hippodraw::Symbol::Type) const
Returns true as this class uses hippodraw::Symbol::Type as a property.
hippodraw::ViewBase class interface
Type convert(unsigned int type)
double c_beta
Cached xOffset of PeriodicBinaryTransform.
A rep to draw error bars, owned by point reps.
virtual void setSize(float value)
Sets the size of the representation.
bool m_y_flag
The y error flag.
virtual void setErrorOn(hippodraw::Axes::Type axis, bool yes=true)
Sets the display of the error bar.
hippodraw::Symbol::Type m_plot_symbol
The PlotSymbol currently used.
virtual void setColor(const Color &)
Sets the color of the representation.
void beginPlot(unsigned int size, const BinaryTransform *tf, const ViewBase *view)
Sets the value of cached data members.
virtual RepBase * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
float size() const
Returns the size of the representation.
virtual unsigned int getStyle() const
Returns the style of the point symbol.
const PeriodicBinaryTransform * c_periodic_tf
Cached dynamic cast of BinaryTransform to PeriodicBinaryTransform if the BinaryTransform is periodic...
hippodraw::DataPointTuple namespace interface
A transform that transforms coordinates from one coordinate system to another.
Type
Enumeration of the type of symbols supported by this class.
RepBase * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
ErrorBarRep * m_error_rep
The error bar representation.
intp size(numeric::array arr)
bool drawProjectedValue(unsigned int i, const DataSource *ntuple, const BinaryTransform *transform, ViewBase *view)
Draws a projected value.
~SymbolPointRep()
The destructor.
virtual void transformPoints(const TransformBase &transform, ViewBase &view)
Transforms the cached coordinates using transform.
hippodraw::NTupleProjector class interface
A transform that transforms coordinates from one 2D coordinate system to another. ...
hippodraw::DataSource class interface.
A Color class for creating the color object following the standard RGB color space.
virtual void setColor(const Color &color)
Sets the color of the representation.
The base class for the point representation hierarchy.
Base class for DataSource.
virtual void setSize(float value)
Sets the size of the line drawing and that of the error bar.
double c_max_x
Cached xHighLimit of PeriodicBinaryTransform.
virtual bool yError() const
Returns true if the point representation displays error on the Y axis.
virtual void drawProjectedValues(const DataSource *ntuple, TransformBase *transform, ViewBase *view)
virtual void transform(double &x, double &y) const =0
Transform the coordinates on the X and Y axes.
bool includes(double value) const
Returns true if the argument value is inside the range.
Range c_x_range
Cached Range on X axis.
hippodraw::SymbolPointRep class interface
double c_gamma
Cached yOffset of PeriodBinaryTransform.
std::vector< double > m_y
A cache of the points to be drawn on the Y axis.
hippodraw::ErrorBarRep class interface
bool m_x_flag
The x error flag.
Range c_y_range
Cached Range on X axis.
hippodraw::PeriodicBinaryTransform class interface
virtual void setStyle(unsigned int symbol)
Sets the symbol of the representation.
std::vector< double > m_x
A cache of the points to be drawn on the X axis.
virtual const Color & color() const
Returns the representation's color.
Expresses a range of values.
A namespace to set the standard for indexing into 2 dimension data point tuple.
The abstract base class for views.