Skip to content
Snippets Groups Projects
Select Git revision
  • a7b7ecc6776ffca8deec0a85dc661180d4b0e6cd
  • trunk
  • RELEASE_6_5_DRIVEDB
  • RELEASE_6_6_DRIVEDB
  • RELEASE_7_0_DRIVEDB
  • RELEASE_7_2_DRIVEDB
  • RELEASE_7_3_DRIVEDB
  • RELEASE_6_0_DRIVEDB
  • RELEASE_6_1_DRIVEDB
  • RELEASE_6_2_DRIVEDB
  • RELEASE_6_3_DRIVEDB
  • RELEASE_6_4_DRIVEDB
  • tags/RELEASE_7_4
  • tags/RELEASE_7_3
  • RELEASE_5_41_DRIVEDB
  • RELEASE_5_42_DRIVEDB
  • RELEASE_5_43_DRIVEDB
  • tags/RELEASE_7_2
  • tags/RELEASE_7_1
  • tags/RELEASE_7_0
  • RELEASE_5_40_DRIVEDB
21 results

rcsinfo

Blame
  • pulsaranimationwidget.cpp 17.61 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_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);
        }
    
        // initialize quadric pointers
        m_quadricVirgoh = NULL;
        m_quadricVirgov = NULL;
        m_quadricEarth = NULL;
        m_quadricLLOh = NULL;
        m_quadricLLOv = NULL;
        m_quadricSourcePlane = NULL;
        m_quadricSourcePlaneNormal = NULL;
        m_quadricSourcePlaneNormalCap = NULL;
        m_quadricLHOv = NULL;
        m_quadricLHOh = NULL;
    
        // initialize texture pointers
        m_beamTexture = 0;
    
        // initial parameters (have to match GUI!)
        m_LHOAngle = 180;
        m_LLOAngle = -100;
        m_VirgoAngle = 165;