summaryrefslogtreecommitdiffstats
path: root/tksao/frame/basemarker.h
blob: 7155b305487c8cfe945ec8523b64482c38544fb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// Copyright (C) 1999-2018
// Smithsonian Astrophysical Observatory, Cambridge, MA, USA
// For conditions of distribution and use, see copyright notice in "copyright"

#ifndef __basemarker_h__
#define __basemarker_h__

#include "marker.h"

#define MAXANNULI 512
#define MAXANGLES 720

class BaseMarker : public Marker {
protected:
  Vector* annuli_;
  int numAnnuli_;

  double *angles_;
  int numAngles_;

  double startAng_;
  double stopAng_;

protected:
  void sortAnnuli();
  int insertAnnuli(Vector);

  void sortAngles();
  void setAngles(double, double, int);
  void setAngles(int, const double*);
  void addAngle(double);
  void deleteAngle(int);
  int isInAngle(Vector&, int);

  Matrix fwdMatrix();
  Matrix bckMatrix();
  Vector fwdMap(const Vector&, Coord::InternalSystem);
  Vector bckMap(const Vector&, Coord::InternalSystem);

public:
  BaseMarker(Base*, const Vector&, double);
  BaseMarker(Base*, const Vector&, double,
	     const char*, int* dsh,
	     int, const char*, const char*, 
	     unsigned short, const char*,
	     const List<Tag>&, const List<CallBack>& cb);
  BaseMarker(const BaseMarker&);
  virtual ~BaseMarker();

  virtual Marker* dup() =0;
  void updateCoords(const Matrix&);

  int numAnnuli() {return numAnnuli_;}
  Vector annuli(int i) {return annuli_[i];}

  int numAngles() {return numAngles_;}
  double angles(int i) {return angles_[i];}

  void setAnnuli(const Vector&);
  void setAnnuli(const Vector&, const Vector&, int);
  void setAnnuli(const Vector*, int);
  
  virtual int addAnnuli(const Vector&) {return 0;}
  void deleteAnnuli(int h);
};

#endif