Skip to content
Snippets Groups Projects
Select Git revision
  • e7315b44efb5d46baaeb53b1a74023322b0c90bf
  • master default
  • mingw_gcc44
  • release_ABP1_012
  • release_ABP1_008
  • release_ABP1_006
  • release_ABP1_007
  • release_ABP1_005
  • release_ABP1_004
  • release_ABP1_003
  • pre_release_0.15
  • release_ABP1_001
  • release_ABP1_002
  • pre_release_0.13
  • pre_release_0.14
  • pre_release_0.11
  • pre_release_0.12
  • pre_release_0.10
  • pre_release_0.09
  • pre_release_0.08
20 results

ResourceFactory.h

Blame
  • Forked from einsteinathome / graphicsframework
    Source project has a limited visibility.
    StarsphereS5R3.h 3.92 KiB
    #ifndef STARSPHERES5R3_H_
    #define STARSPHERES5R3_H_
    
    #include <sstream>
    
    #include "Starsphere.h"
    #include "EinsteinS5R3Adapter.h"
    
    using namespace std;
    
    /**
     * \brief Specialized rendering engine for the S5R3 science run
     * 
     * This class comprises the specialized parts of the Starsphere rendering engine.
     * The main differences stem from the fact that most science runs differ in their
     * search configuration and parameters. Thus the parameters exposed by the HUD
     * (head-up display) are positioned and rendered here. For the time being the
     * "BOINC Statistics" are top-aligned to the "Search Parameters", hence they're
     * also positioned and rendered here.
     * 
     * \author Oliver Bock\n
     * Max-Planck-Institute for Gravitational Physics\n
     * Hannover, Germany
     */
    class StarsphereS5R3 : public Starsphere
    {
    public:
    	/// Default contructor
    	StarsphereS5R3();
    	
    	/// Destructor
    	virtual ~StarsphereS5R3();
    	
    	/**
    	 * \brief This method is called to initialize the engine
    	 * 
    	 * As this method overrides its parent's implementation, it calls Starsphere::initialize()
    	 * first in order to "add" the sepcialized parts afterwards.
    	 * 
    	 * \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 
    	 * \param recycle This flag indicates whether we initialize (FALSE) or reinitialize (TRUE) the context
    	 */
    	virtual void initialize(const int width, const int height, const Resource *font, const bool recycle = false);
    	
    	/**
    	 * \brief This method is called when the windowing system encounters a window resize event
    	 * 
    	 * As this method overrides its parent's implementation, it calls Starsphere::resize()
    	 * first in order to "add" the sepcialized parts afterwards.
    	 * 
    	 * \param width The new width of the display surface
    	 * \param height The new height of the display surface
    	 */
    	void resize(const int width, const int height);
    	
    	/**
    	 * \brief This method is called when the BOINC client information should be updated
    	 * 
    	 * This method implements AbstractGraphicsEngine::refreshBOINCInformation() and calls
    	 * Starsphere::refreshLocalBOINCInformation() first and "adds" the sepcialized
    	 * parts afterwards.
    	 * 
    	 * \see AbstractGraphicsEngine::refreshBOINCInformation()
    	 * \see Starsphere::refreshLocalBOINCInformation()
    	 */
    	void refreshBOINCInformation();
    	
    private:
    	/**
    	 * \brief Render science run specific search information
    	 * 
    	 * For this specific implementation this also includes the "BOINC Statistics"
    	 * as it is top-aligned to the "Search Information".
    	 */
    	void renderSearchInformation();
    	
    	/// Specialized BOINC client adapter instance for information retrieval
    	EinsteinS5R3Adapter m_EinsteinAdapter;
    	
    	/// Local copy of the current WU's search parameter "Right-Ascension" (degrees)
    	string m_WUSkyPosRightAscension;
    	
    	/// Local copy of the current WU's search parameter "Declination" (degrees)
    	string m_WUSkyPosDeclination;
    	
    	/// Local copy of the current WU's search parameter "Percent done"
    	string m_WUPercentDone;
    	
    	/// Local copy of the current WU's search parameter "CPU Time"
    	string m_WUCPUTime;
    	
    	/// HUD configuration setting (line offset for medium sized font)
    	GLfloat m_YOffsetMedium;
    	
    	/// HUD configuration setting (horizontal start position for the right part)
    	GLfloat m_XStartPosRight;
    	
    	/// HUD configuration setting (vertical start postion for the bottom part, header)
    	GLfloat m_YStartPosBottom;
    	
    	/// HUD configuration setting (vertical start postion for the bottom part, line 1)
    	GLfloat m_Y1StartPosBottom;
    	
    	/// HUD configuration setting (vertical start postion for the bottom part, line 2)
    	GLfloat m_Y2StartPosBottom;
    	
    	/// HUD configuration setting (vertical start postion for the bottom part, line 3)
    	GLfloat m_Y3StartPosBottom;
    	
    	/// HUD configuration setting (vertical start postion for the bottom part, line 4)
    	GLfloat m_Y4StartPosBottom;
    };
    
    #endif /*STARSPHERES5R3_H_*/