Skip to content
Snippets Groups Projects
Select Git revision
  • 0ec129e99a6c41fe40dce99d6b4c4181fd81f408
  • 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

glitch_robust_search.py

Blame
  • Forked from Gregory Ashton / PyFstat
    Source project has a limited visibility.
    pulsaranimationwidget.cpp 28.31 KiB
    /******************************************************************************
     *   Copyright (C) 2008 by Oliver Bock                                        *
     *   oliver.bock[AT]aei.mpg.de                                                *
     *                                                                            *
     *   This file is part of PulsatingScience.                                   *
     *                                                                            *
     *   PulsatingScience is free software: you can redistribute it and/or modify *
     *   it under the terms of the GNU General Public License as published        *
     *   by the Free Software Foundation, version 3 of the License.               *
     *                                                                            *
     *   PulsatingScience is distributed in the hope that it will be useful,      *
     *   but WITHOUT ANY WARRANTY; without even the implied warranty of           *
     *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the             *
     *   GNU General Public License for more details.                             *
     *                                                                            *
     *   You should have received a copy of the GNU General Public License        *
     *   along with PulsatingScience. If not, see <http://www.gnu.org/licenses/>. *
     *                                                                            *
     ******************************************************************************/
    
    #include "pulsaranimationwidget.h"
    
    const double PulsarAnimationWidget::deg2rad = PI/180.0;
    
    PulsarAnimationWidget::PulsarAnimationWidget(QWidget *parent) :
        QGLWidget(QGLFormat(QGL::AlphaChannel | QGL::SampleBuffers), parent),
        m_frameTimer(),
        m_pulseProfile(360, 0.0)
    {
        QString msgThis = tr("3D animation");
        if(!format().directRendering()) {
            QString msg = tr("Sorry, no direct rendering support for %1...");
            qWarning() << msg.arg(msgThis);
        }
        if(!format().doubleBuffer()) {
            QString msg = tr("Sorry, no double buffering support for %1...");
            qWarning() << msg.arg(msgThis);
        }
        if(!format().rgba()) {
            QString msg = tr("Sorry, no RGBA support for %1...");
            qWarning() << msg.arg(msgThis);
        }
        if(!format().alpha()) {
            QString msg = tr("Sorry, no alpha channel support for %1...");
            qWarning() << msg.arg(msgThis);
        }
        if(!format().sampleBuffers()) {
            QString msg = tr("Sorry, no multisampling support for %1...");
            qWarning() << msg.arg(msgThis);
        }
    
        // connect primary rendering timer to local callback
        connect(&m_frameTimer, SIGNAL(timeout()), this, SLOT(updateFrame()));
    
        // initialize quadric pointers
        m_quadricCompanionOrbitPlane = NULL;
        m_quadricCompanion = NULL;
        m_quadricPulsarOrbitPlane = NULL;
        m_quadricPulsar = NULL;
        m_quadricPulsarCone1Shell = NULL;
        m_quadricPulsarCone2Shell = NULL;
        m_quadricPulsarSpinAxis = NULL;
        m_quadricPulsarSpinAxisTop1 = NULL;
        m_quadricPulsarSpinAxisTop2 = NULL;
        m_quadricPulsarMagneticAxis = NULL;
    
        // initialize texture pointers
        m_backgroundTexture = 0;
        m_beamTexture = 0;