//--------------------------------------------------------------
void AnimationParticlesMega2::VM_update(float dt)
{
	if (hasPitch())
	{
//		if (mp_volumeAccum)
//			m_particlesSize = ofMap(mp_volumeAccum->m_valueMean,0.0f,1.0f,m_properties.getFloat("particles size")->m_min, m_properties.getFloat("particles size")->m_max);
		m_ampAttraction = ofMap(m_pitchLast, 0.0f,1.0f, 5, 50);
		m_ampRepulsion = ofMap(m_pitchLast, 0.0f,1.0f, 40, 100);
		m_repulsionRadius = ofMap(m_pitchLast, 0.0f,1.0f, 140, 300);
	}

	updateUIVolume();
	updateUI();


	map<string,ParticleForce*>::iterator it = m_mapParticleForce.begin();
	ParticleForce* pParticleForce=0;
	for ( ; it != m_mapParticleForce.end() ; ++it)
	{
		pParticleForce = it->second;
		pParticleForce->update(dt);
	}
	
    //SoundManager::instance()->setVolumeSoundMainNormalized(m_volume);
}
Beispiel #2
0
//--------------------------------------------------------------
void AnimationLinesFF::VM_update(float dt)
{
	updateUIVolume();

	vector<LineFFElement*>::iterator it = m_lines.begin();
	for (; it != m_lines.end();)
	{
		(*it)->update(dt);
		if ( (*it)->m_pos.z >= 1000.0f){
			m_lines.erase(it);
		}
		else
			++it;
	}
}
Beispiel #3
0
//--------------------------------------------------------------
void AnimationParticlesMega2::VM_update(float dt)
{
	updateUIVolume();
    particleSystem.setParticleSize(m_particlesSize);

    m_volume += (m_volumeTarget-m_volume)*0.4f;
	map<string,ParticleForce*>::iterator it = m_mapParticleForce.begin();
	ParticleForce* pParticleForce=0;
	for ( ; it != m_mapParticleForce.end() ; ++it)
	{
		pParticleForce = it->second;
		pParticleForce->update(dt);
	}
	
    //SoundManager::instance()->setVolumeSoundMainNormalized(m_volume);
}
Beispiel #4
0
//--------------------------------------------------------------
void AnimationWaves::VM_update(float dt)
{
	updateUIVolume();
	if (hasPitch())
	{
//		m_nbWavePoints = (int)ofMap(m_pitchLast,0.0f,1.0f,15,3);
//		updateNbPointsForWaves();

		if (mp_sliderNbWavePoints) mp_sliderNbWavePoints->setValue( m_nbWavePoints );
	}

	m_wavesDeviceIt = m_wavesDevice.begin();
	for ( ; m_wavesDeviceIt != m_wavesDevice.end(); ++m_wavesDeviceIt)
	{
		WaveManager* pWaveManager = m_wavesDeviceIt->second;
		pWaveManager->update(dt);

	}
}