Exemple #1
0
        void _resetRenderer()
        {
            if (fp64)
            {
                float color[4] = { 0.4f, 0.8f, 0.1f, 1.0f};
                m_renderer->setBaseColor(color);
            }
            else
            {
                float color[4] = { 1.0f, 0.6f, 0.3f, 1.0f};
                m_renderer->setBaseColor(color);
            }

            m_renderer->setColors(m_hColor, m_nbody->getNumBodies());
            m_renderer->setSpriteSize(activeParams.m_pointSize);
        }
Exemple #2
0
 void _reset(int numBodies, NBodyConfig config)
 {
     if (tipsyFile == "")
     {
         randomizeBodies(config, m_hPos, m_hVel, m_hColor,
                         activeParams.m_clusterScale,
                         activeParams.m_velocityScale,
                         numBodies, true);
         setArrays(m_hPos, m_hVel);
     }
     else
     {
         m_nbody->loadTipsyFile(tipsyFile);
         ::numBodies = m_nbody->getNumBodies();
     }
 }