Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
RLoc.h
Go to the documentation of this file.
1 /* Project Starshatter 4.5
2  Destroyer Studios LLC
3  Copyright © 1997-2004. All Rights Reserved.
4 
5  SUBSYSTEM: Stars.exe
6  FILE: RLoc.h
7  AUTHOR: John DiCamillo
8 
9 
10  OVERVIEW
11  ========
12  Relative Location (RLoc) class declaration
13 */
14 
15 #ifndef RLoc_h
16 #define RLoc_h
17 
18 #include "Types.h"
19 #include "Geometry.h"
20 
21 // +--------------------------------------------------------------------+
22 
23 class RLoc
24 {
25 public:
26  RLoc();
27  RLoc(const Point& loc, double d, double dv=5e3);
28  RLoc(RLoc* rloc, double d, double dv=5e3);
29  RLoc(const RLoc& r);
30  ~RLoc();
31 
32  // accessors:
33  const Point& Location();
34  const Point& BaseLocation() const { return base_loc; }
35  RLoc* ReferenceLoc() const { return rloc; }
36  double Distance() const { return dex; }
37  double DistanceVar() const { return dex_var; }
38  double Azimuth() const { return az; }
39  double AzimuthVar() const { return az_var; }
40  double Elevation() const { return el; }
41  double ElevationVar() const { return el_var; }
42 
43  void Resolve();
44 
45  // mutators:
46  void SetBaseLocation(const Point& l);
47  void SetReferenceLoc(RLoc* r) { rloc = r; }
48  void SetDistance(double d) { dex = (float) d; }
49  void SetDistanceVar(double dv) { dex_var = (float) dv; }
50  void SetAzimuth(double a) { az = (float) a; }
51  void SetAzimuthVar(double av) { az_var = (float) av; }
52  void SetElevation(double e) { el = (float) e; }
53  void SetElevationVar(double ev) { el_var = (float) ev; }
54 
55 private:
56  Point loc;
57  Point base_loc;
58  RLoc* rloc;
59 
60  float dex;
61  float dex_var;
62  float az;
63  float az_var;
64  float el;
65  float el_var;
66 };
67 
68 // +--------------------------------------------------------------------+
69 
70 #endif RLoc_h
71