Select Git revision
semi_coherent_search_using_MCMC.py
Forked from
Gregory Ashton / PyFstat
Source project has a limited visibility.
-
Gregory Ashton authoredGregory Ashton authored
Starsphere.h 4.28 KiB
#ifndef STARSPHERE_H_
#define STARSPHERE_H_
#include <cmath>
#include <cstdio>
#include <ctime>
#include <string>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <SDL.h>
#include <SDL_opengl.h>
#include <FTGLPolygonFont.h>
#include <oglft/OGLFT.h>
#include <util.h>
#include "AbstractGraphicsEngine.h"
/* SIN and COS take arguments in DEGREES */
#define PI 3.14159265
#define PI2 (2*PI)
#define COS(X) cos( (X) * PI2/360.0 )
#define SIN(X) sin( (X) * PI2/360.0 )
/* search marker status */
#define MARKER_NONE 0
#define MARKER_SHOW 1
#define MARKER_NEW 2
// needed to find OpenGL 1.4 prototypes in glext.h (alternatives?)
#define GL_GLEXT_PROTOTYPES
using namespace std;
class Starsphere : public AbstractGraphicsEngine
{
public:
virtual ~Starsphere();
// core methods
void initialize(const int width, const int height, const Resource *font);
void resize(const int width, const int height);
void render(const double timeOfDay);
// event handling
void mouseButtonEvent(const int positionX, const int positionY,
const AbstractGraphicsEngine::MouseButton buttonPressed);
void mouseMoveEvent(const int deltaX, const int deltaY,
const AbstractGraphicsEngine::MouseButton buttonPressed);
void keyboardPressEvent(const AbstractGraphicsEngine::KeyBoardKey keyPressed);
// update HUD content
virtual void refreshBOINCInformation();
protected:
/// Contructor (protected since this an abstract class)
Starsphere();
// resource handling
FTFont *m_PolygonFont;
OGLFT::TranslucentTexture* face;
// Graphics state info:
float aspect;