Plot3D.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2001 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/Util/pgutil/Plot3D.h
10 
11 #ifndef __CurvePlotter2D3_H
12 #define __CurvePlotter2D3_H
13 
14 #include "Cartesian.h"
15 #include <vector>
16 
17 namespace pgplot {
18 
19  class Plot3D {
20 
21  public:
22 
23  static bool verbose;
24 
25  Plot3D() { init(); }
26  virtual ~Plot3D() {}
27 
28  // primitives
29  void move (const Cartesian& pt);
30  void draw (const Cartesian& pt);
31  void plot (const Cartesian& pt, int symbol);
32  void text (const Cartesian& pt, const char* text, float align=.5);
33 
34  void arrow (const Cartesian& from, const Cartesian& to);
35 
36  void poly (const std::vector<Cartesian>& pts);
37 
38  // make hatching run parallel to pp
39  void set_hatch (const Cartesian& hp);
40 
41  // set camera position - phi and theta in degrees
42  void set_camera (double theta, double phi);
43 
44  void where (float& x, float& y, const Cartesian& pt);
45 
46  const Cartesian& get_xaxis () { return vx_axis; };
47  const Cartesian& get_yaxis () { return vy_axis; };
48 
49  protected:
50  Cartesian vx_axis;
51  Cartesian vy_axis;
52 
53  void init();
54  };
55 }
56 
57 #endif
58 
const ScalarMath atan(const ScalarMath &x)
bool verbose
Definition: timer++.C:25

Generated using doxygen 1.8.17