Skip to content
Snippets Groups Projects
Select Git revision
  • 445f49df0c49e528a94d04efd6e746ccea0c599e
  • master default protected
  • develop-GA
  • timeFstatmap
  • add-higher-spindown-components
  • develop-DK
  • adds-header-to-grid-search
  • v1.2
  • v1.1.2
  • v1.1.0
  • v1.0.1
11 results

semi_coherent_search_using_MCMC.py

Blame
  • Forked from Gregory Ashton / PyFstat
    Source project has a limited visibility.
    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;