本文整理汇总了C++中ParticleEmitter::getRotationSpeedMin方法的典型用法代码示例。如果您正苦于以下问题:C++ ParticleEmitter::getRotationSpeedMin方法的具体用法?C++ ParticleEmitter::getRotationSpeedMin怎么用?C++ ParticleEmitter::getRotationSpeedMin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParticleEmitter
的用法示例。
在下文中一共展示了ParticleEmitter::getRotationSpeedMin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: controlEvent
//.........这里部分代码省略.........
accel.z = _accelZ->getValue();
emitter->setAcceleration(accel, emitter->getAccelerationVariance());
}
else if (control == _accelVarX)
{
Vector3 accelVar = emitter->getAccelerationVariance();
accelVar.x = _accelVarX->getValue();
emitter->setAcceleration(emitter->getAcceleration(), accelVar);
}
else if (control == _accelVarY)
{
Vector3 accelVar = emitter->getAccelerationVariance();
accelVar.y = _accelVarY->getValue();
emitter->setAcceleration(emitter->getAcceleration(), accelVar);
}
else if (control == _accelVarZ)
{
Vector3 accelVar = emitter->getAccelerationVariance();
accelVar.z = _accelVarZ->getValue();
emitter->setAcceleration(emitter->getAcceleration(), accelVar);
}
else if (control == _spinSpeedMin)
{
emitter->setRotationPerParticle(_spinSpeedMin->getValue(), emitter->getRotationPerParticleSpeedMax());
}
else if (control == _spinSpeedMax)
{
emitter->setRotationPerParticle(emitter->getRotationPerParticleSpeedMin(), _spinSpeedMax->getValue());
}
else if (control == _axisX)
{
Vector3 axis = emitter->getRotationAxis();
axis.x = _axisX->getValue();
emitter->setRotation(emitter->getRotationSpeedMin(), emitter->getRotationSpeedMax(), axis, emitter->getRotationAxisVariance());
}
else if (control == _axisY)
{
Vector3 axis = emitter->getRotationAxis();
axis.y = _axisY->getValue();
emitter->setRotation(emitter->getRotationSpeedMin(), emitter->getRotationSpeedMax(), axis, emitter->getRotationAxisVariance());
}
else if (control == _axisZ)
{
Vector3 axis = emitter->getRotationAxis();
axis.z = _axisZ->getValue();
emitter->setRotation(emitter->getRotationSpeedMin(), emitter->getRotationSpeedMax(), axis, emitter->getRotationAxisVariance());
}
else if (control == _axisVarX)
{
Vector3 axisVar = emitter->getRotationAxisVariance();
axisVar.x = _axisVarX->getValue();
emitter->setRotation(emitter->getRotationSpeedMin(), emitter->getRotationSpeedMax(), emitter->getRotationAxis(), axisVar);
}
else if (control == _axisVarY)
{
Vector3 axisVar = emitter->getRotationAxisVariance();
axisVar.y = _axisVarY->getValue();
emitter->setRotation(emitter->getRotationSpeedMin(), emitter->getRotationSpeedMax(), emitter->getRotationAxis(), axisVar);
}
else if (control == _axisVarZ)
{
Vector3 axisVar = emitter->getRotationAxisVariance();
axisVar.z = _axisVarZ->getValue();
emitter->setRotation(emitter->getRotationSpeedMin(), emitter->getRotationSpeedMax(), emitter->getRotationAxis(), axisVar);
}
else if (control == _rotationSpeedMin)
示例2: emitterChanged
//.........这里部分代码省略.........
{
Vector3 v3;
if (ns->getVector3("cameraTranslation", &v3))
{
_cameraParent->setTranslation(v3);
}
if (ns->getVector3("cameraZoom", &v3))
{
_scene->getActiveCamera()->getNode()->setTranslation(v3);
}
Quaternion q;
if (ns->getQuaternionFromAxisAngle("cameraRotation", &q))
{
_cameraParent->setRotation(q);
}
float f;
if ((f = ns->getFloat("sizeMax")) != 0.0f)
{
_startMin->setMax(f);
_startMax->setMax(f);
_endMin->setMax(f);
_endMax->setMax(f);
}
if ((f = ns->getFloat("energyMax")) != 0.0f)
{
_energyMin->setMax(f);
_energyMax->setMax(f);
}
}
SAFE_DELETE(p);
// Set the values of UI controls to display the new emitter's settings.
_startRed->setValue(emitter->getColorStart().x);
_startGreen->setValue(emitter->getColorStart().y);
_startBlue->setValue(emitter->getColorStart().z);
_startAlpha->setValue(emitter->getColorStart().w);
_endRed->setValue(emitter->getColorEnd().x);
_endGreen->setValue(emitter->getColorEnd().y);
_endBlue->setValue(emitter->getColorEnd().z);
_endAlpha->setValue(emitter->getColorEnd().w);
_startMin->setValue(emitter->getSizeStartMin());
_startMax->setValue(emitter->getSizeStartMax());
_endMin->setValue(emitter->getSizeEndMin());
_endMax->setValue(emitter->getSizeEndMax());
_energyMin->setValue(emitter->getEnergyMin());
_energyMax->setValue(emitter->getEnergyMax());
_emissionRate->setValue(emitter->getEmissionRate());
const Vector3& posVar = emitter->getPositionVariance();
_posVarX->setValue(posVar.x);
_posVarY->setValue(posVar.y);
_posVarZ->setValue(posVar.z);
const Vector3& vel = emitter->getVelocity();
_velX->setValue(vel.x);
_velY->setValue(vel.y);
_velZ->setValue(vel.z);
const Vector3& velVar = emitter->getVelocityVariance();
_velVarX->setValue(velVar.x);
_velVarY->setValue(velVar.y);
_velVarZ->setValue(velVar.z);
const Vector3& accel = emitter->getAcceleration();
_accelX->setValue(accel.x);
_accelY->setValue(accel.y);
_accelZ->setValue(accel.z);
const Vector3& accelVar = emitter->getAccelerationVariance();
_accelVarX->setValue(accelVar.x);
_accelVarY->setValue(accelVar.y);
_accelVarZ->setValue(accelVar.z);
_spinSpeedMin->setValue(emitter->getRotationPerParticleSpeedMin());
_spinSpeedMax->setValue(emitter->getRotationPerParticleSpeedMax());
const Vector3& axis = emitter->getRotationAxis();
_axisX->setValue(axis.x);
_axisY->setValue(axis.y);
_axisZ->setValue(axis.z);
const Vector3& axisVar = emitter->getRotationAxisVariance();
_axisVarX->setValue(axisVar.x);
_axisVarY->setValue(axisVar.y);
_axisVarZ->setValue(axisVar.z);
_rotationSpeedMin->setValue(emitter->getRotationSpeedMin());
_rotationSpeedMax->setValue(emitter->getRotationSpeedMax());
// Update our image control
updateImageControl();
// Start the emitter
emitter->start();
}