1 // visibleregion.h
2 //
3 // Visible region reference mark for ellipsoidal bodies.
4 //
5 // Copyright (C) 2008, the Celestia Development Team
6 // Initial version by Chris Laurel, claurel@gmail.com
7 //
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License
10 // as published by the Free Software Foundation; either version 2
11 // of the License, or (at your option) any later version.
12 
13 #ifndef _CELENGINE_VISIBLEREGION_H_
14 #define _CELENGINE_VISIBLEREGION_H_
15 
16 #include <celengine/referencemark.h>
17 #include <celengine/selection.h>
18 #include <celutil/color.h>
19 
20 class Body;
21 
22 
23 /*! VisibleRegion is a reference mark that shows the outline of
24  *  region on the surface of a body in which a specified target
25  *  is visible.
26  */
27 class VisibleRegion : public ReferenceMark
28 {
29 public:
30     VisibleRegion(const Body& body, const Selection& target);
31     ~VisibleRegion();
32 
33     void render(Renderer* renderer,
34                 const Point3f& pos,
35                 float discSizeInPixels,
36                 double tdb) const;
37     float boundingSphereRadius() const;
38 
39     Color color() const;
40     void setColor(Color color);
41     float opacity() const;
42     void setOpacity(float opacity);
43 
44 private:
45     const Body& m_body;
46     const Selection m_target;
47     Color m_color;
48     float m_opacity;
49 };
50 
51 #endif // _CELENGINE_TERMINATOR_H_
52 
53