Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
graphicsframework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Oliver Behnke
graphicsframework
Commits
3cbd9757
Commit
3cbd9757
authored
17 years ago
by
Oliver Bock
Browse files
Options
Downloads
Patches
Plain Diff
Added VIRGO to displayed observatories plus more doxygenized code
parent
b4e57594
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Starsphere.cpp
+56
-25
56 additions, 25 deletions
Starsphere.cpp
Starsphere.h
+59
-7
59 additions, 7 deletions
Starsphere.h
with
115 additions
and
32 deletions
Starsphere.cpp
+
56
−
25
View file @
3cbd9757
...
...
@@ -3,7 +3,7 @@
Starsphere
::
Starsphere
()
:
AbstractGraphicsEngine
()
{
Axes
=
0
,
Stars
=
0
,
Constellations
=
0
,
Pulsars
=
0
;
LLOmarker
=
0
,
LHOmarker
=
0
,
GEOmarker
=
0
;
LLOmarker
=
0
,
LHOmarker
=
0
,
GEOmarker
=
0
,
VIRGOmarker
=
0
;
sphGrid
=
0
,
SNRs
=
0
,
SearchMarker
=
0
;
/**
...
...
@@ -336,6 +336,36 @@ void Starsphere::make_obs()
glEnd
();
glEndList
();
/**
* VIRGO Interferometer:
*/
Lat
=
43.63139
;
Lon
=
-
10.505
;
arm_len_deg
=
3.000
;
// not to scale
RAdeg
=
RAofZenith
(
observatoryDrawTimeGMT
,
Lon
);
DEdeg
=
Lat
;
if
(
!
VIRGOmarker
)
VIRGOmarker
=
glGenLists
(
1
);
glNewList
(
VIRGOmarker
,
GL_COMPILE
);
glColor3f
(
1.0
,
1.0
,
1.0
);
glLineWidth
(
lineSize
);
glBegin
(
GL_LINE_STRIP
);
// North/South arm:
sphVertex3D
(
RAdeg
,
DEdeg
+
arm_len_deg
,
radius
);
sphVertex3D
(
RAdeg
,
DEdeg
,
radius
);
// West/East arm:
sphVertex3D
(
RAdeg
-
arm_len_deg
,
DEdeg
,
radius
);
glEnd
();
// arm joint
glPointSize
((
GLfloat
)
lineSize
);
glBegin
(
GL_POINTS
);
sphVertex3D
(
RAdeg
,
DEdeg
,
radius
);
glEnd
();
glEndList
();
return
;
}
...
...
@@ -704,6 +734,7 @@ void Starsphere::render(const double timeOfDay)
glCallList
(
LLOmarker
);
glCallList
(
LHOmarker
);
glCallList
(
GEOmarker
);
glCallList
(
VIRGOmarker
);
glPopMatrix
();
}
...
...
This diff is collapsed.
Click to expand it.
Starsphere.h
+
59
−
7
View file @
3cbd9757
...
...
@@ -35,13 +35,51 @@
using
namespace
std
;
/**
* \brief %Starsphere rendering engine for \b Einstein\@Home
*
* This class comprises the generic parts of the %Starsphere rendering engine.
* %Starsphere displays the celestial sphere indicating a fixed set of stars with
* their constellations as well as known pulsars and supernova remnants. Apart from
* that the four main gravitational wave observatory locations are shown at their actual
* real-time position. Furthermore a head-up display (HUD) shows relevant BOINC
* statistics as well as information on the current workunit (WU) being processed.
*
* For more details please refer to http://einstein.phys.uwm.edu/starsphere.php
*
* Note: all science run specific parts are implemented in specialized subclasses
* of this engine.
*
* \todo The code of this implementaion is based on the former version of %Starsphere
* by Bruce Allen, David Hammer and Eric Myers. Due to this there's still
* some refactoring and code cleanup left to be done.
*
* \author Oliver Bock\n
* Max-Planck-Institute for Gravitational Physics\n
* Hannover, Germany
*/
class
Starsphere
:
public
AbstractGraphicsEngine
{
public:
/// Destructor
virtual
~
Starsphere
();
// core methods
/**
* \brief This method is called to initialize the engine
*
* \param width The current width of the display surface
* \param height The current height of the display surface
* \param font A pointer to a Resource object containing TTF font faces for text rendering
*/
virtual
void
initialize
(
const
int
width
,
const
int
height
,
const
Resource
*
font
);
/**
* \brief This method is called when the windowing system encounters a window resize event
*
* \param width The new width of the display surface
* \param height The new height of the display surface
*/
virtual
void
resize
(
const
int
width
,
const
int
height
);
void
render
(
const
double
timeOfDay
);
...
...
@@ -52,13 +90,30 @@ public:
const
AbstractGraphicsEngine
::
MouseButton
buttonPressed
);
void
keyboardPressEvent
(
const
AbstractGraphicsEngine
::
KeyBoardKey
keyPressed
);
// update HUD content
/**
* \brief This method is called when the BOINC client information should be updated
*/
virtual
void
refreshBOINCInformation
();
protected:
/// Contructor (protected since this an abstract class)
/**
* \brief Default contructor
*
* The constructor is protected since this an abstract class.
*/
Starsphere
();
/**
* \brief Render science run specific search information
*
* This abtract method is to be defined by derived classes implementing
* the science run specific search information handling and rendering.
*
* Note: for this engine this also includes the "BOINC Statistics"
* as it is top-aligned to the "Search Information".
*/
virtual
void
renderSearchInformation
()
=
0
;
// resource handling
OGLFT
::
TranslucentTexture
*
m_FontLogo1
;
...
...
@@ -107,7 +162,7 @@ private:
* (someday the keyboard can be used to turn display of items on/off)
*/
GLuint
Axes
,
Stars
,
Constellations
,
Pulsars
;
GLuint
LLOmarker
,
LHOmarker
,
GEOmarker
;
GLuint
LLOmarker
,
LHOmarker
,
GEOmarker
,
VIRGOmarker
;
GLuint
sphGrid
,
SNRs
,
SearchMarker
;
/**
...
...
@@ -133,9 +188,6 @@ private:
//------------ new clean members -----
// application specific rendering
virtual
void
renderSearchInformation
()
=
0
;
// view control
void
rotateSphere
(
const
int
relativeRotation
,
const
int
relativeElevation
);
void
zoomSphere
(
const
int
relativeZoom
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment