14 #include "msdevstudio/MSconfig.h"
35 using namespace hippodraw;
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;
186 namespace dp = hippodraw::DataPoint2DTuple;
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() )
virtual void setStyle(unsigned int symbol)
Sets the symbol of the representation.
The abstract base class for views.
virtual void setSize(float value)
Sets the size of the line drawing and that of the error bar.
hippodraw::Symbol::Type m_plot_symbol
The PlotSymbol currently used.
static void rotate(double &lat, double &lon, double alpha, double beta, double gamma, bool negative=true)
Rotates the coordinate.
double c_beta
Cached xOffset of PeriodicBinaryTransform.
hippodraw::NTupleProjector class interface
virtual void transformPoints(const TransformBase &transform, ViewBase &view)
Transforms the cached coordinates using transform.
Expresses a range of values.
Type
Enumeration of the type of symbols supported by this class.
hippodraw::DataPointTuple namespace interface
The base class for the point representation hierarchy.
Base class for DataSource.
A rep to draw error bars, owned by point reps.
std::vector< double > m_y
A cache of the points to be drawn on the Y axis.
virtual bool uses(hippodraw::Symbol::Type) const
Returns true as this class uses hippodraw::Symbol::Type as a property.
hippodraw::ViewBase class interface
The base class for the point representation hierarchy.
bool includes(double value) const
Returns true if the argument value is inside the range.
virtual RepBase * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
bool m_x_flag
The x error flag.
virtual const Color & color() const
Returns the representation's color.
void beginPlot(unsigned int size, const BinaryTransform *tf, const ViewBase *view)
Sets the value of cached data members.
bool drawProjectedValue(unsigned int i, const DataSource *ntuple, const BinaryTransform *transform, ViewBase *view)
Draws a projected value.
SymbolPointRep()
The default constructor.
hippodraw::ErrorBarRep class interface
virtual bool yError() const
Returns true if the point representation displays error on the Y axis.
RepBase * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
~SymbolPointRep()
The destructor.
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::PeriodicBinaryTransform class interface
A transform that transforms coordinates from one 2D coordinate system to another. ...
std::vector< double > m_x
A cache of the points to be drawn on the X axis.
Type convert(unsigned int type)
Range c_x_range
Cached Range on X axis.
float m_size
The size of the representation.
virtual bool xError() const
Returns true if the point representation displays error on the X axis.
intp size(numeric::array arr)
const PeriodicBinaryTransform * c_periodic_tf
Cached dynamic cast of BinaryTransform to PeriodicBinaryTransform if the BinaryTransform is periodic...
virtual void transform(double &x, double &y) const =0
Transform the coordinates on the X and Y axes.
A Periodic transform that transforms coordinates from one 2D coordinate system to another...
virtual void drawProjectedValues(const DataSource *ntuple, TransformBase *transform, ViewBase *view)
A PointRep class draws a symbol to represent the value.
double c_gamma
Cached yOffset of PeriodBinaryTransform.
float size() const
Returns the size of the representation.
double c_max_x
Cached xHighLimit of PeriodicBinaryTransform.
A Color class for creating the color object following the standard RGB color space.
virtual void setSize(float value)
Sets the size of the representation.
virtual unsigned int getStyle() const
Returns the style of the point symbol.
hippodraw::DataSource class interface.
Range c_y_range
Cached Range on X axis.
virtual void setColor(const Color &)
Sets the color of the representation.
hippodraw::SymbolPointRep class interface
virtual void setColor(const Color &color)
Sets the color of the representation.
A transform that transforms coordinates from one coordinate system to another.
ErrorBarRep * m_error_rep
The error bar representation.