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

AbstractGraphicsEngine.h

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