Removed unnecessary default value.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1514 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
57485235b9
commit
320c8b91cb
|
@ -89,9 +89,9 @@ s32 CParticleAnimatedMeshSceneNodeEmitter::emitt(u32 now, u32 timeSinceLastCall,
|
|||
if( MaxAngleDegrees )
|
||||
{
|
||||
core::vector3df tgt = p.vector;
|
||||
tgt.rotateXYBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees, core::vector3df());
|
||||
tgt.rotateYZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees, core::vector3df());
|
||||
tgt.rotateXZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees, core::vector3df());
|
||||
tgt.rotateXYBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees);
|
||||
tgt.rotateYZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees);
|
||||
tgt.rotateXZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees);
|
||||
p.vector = tgt;
|
||||
}
|
||||
|
||||
|
@ -140,9 +140,9 @@ s32 CParticleAnimatedMeshSceneNodeEmitter::emitt(u32 now, u32 timeSinceLastCall,
|
|||
if( MaxAngleDegrees )
|
||||
{
|
||||
core::vector3df tgt = Direction;
|
||||
tgt.rotateXYBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees, core::vector3df(0,0,0));
|
||||
tgt.rotateYZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees, core::vector3df(0,0,0));
|
||||
tgt.rotateXZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees, core::vector3df(0,0,0));
|
||||
tgt.rotateXYBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees);
|
||||
tgt.rotateYZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees);
|
||||
tgt.rotateXZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees);
|
||||
p.vector = tgt;
|
||||
}
|
||||
|
||||
|
|
|
@ -65,9 +65,9 @@ s32 CParticleBoxEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& outAr
|
|||
if (MaxAngleDegrees)
|
||||
{
|
||||
core::vector3df tgt = Direction;
|
||||
tgt.rotateXYBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees, core::vector3df());
|
||||
tgt.rotateYZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees, core::vector3df());
|
||||
tgt.rotateXZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees, core::vector3df());
|
||||
tgt.rotateXYBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees);
|
||||
tgt.rotateYZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees);
|
||||
tgt.rotateXZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees);
|
||||
p.vector = tgt;
|
||||
}
|
||||
|
||||
|
|
|
@ -62,9 +62,7 @@ s32 CParticleCylinderEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*&
|
|||
distance = Radius;
|
||||
|
||||
// Random direction from center
|
||||
p.pos.X = Center.X + distance;
|
||||
p.pos.Y = Center.Y;
|
||||
p.pos.Z = Center.Z + distance;
|
||||
p.pos.set(Center.X + distance, Center.Y, Center.Z + distance);
|
||||
p.pos.rotateXZBy( os::Randomizer::rand() % 360, Center );
|
||||
|
||||
// Random length
|
||||
|
|
|
@ -49,9 +49,9 @@ s32 CParticlePointEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& out
|
|||
if (MaxAngleDegrees)
|
||||
{
|
||||
core::vector3df tgt = Direction;
|
||||
tgt.rotateXYBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees, core::vector3df(0,0,0));
|
||||
tgt.rotateYZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees, core::vector3df(0,0,0));
|
||||
tgt.rotateXZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees, core::vector3df(0,0,0));
|
||||
tgt.rotateXYBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees);
|
||||
tgt.rotateYZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees);
|
||||
tgt.rotateXZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees);
|
||||
Particle.vector = tgt;
|
||||
}
|
||||
|
||||
|
|
|
@ -57,10 +57,7 @@ s32 CParticleRingEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& outA
|
|||
distance *= -1.0f;
|
||||
distance += Radius;
|
||||
|
||||
p.pos.X = Center.X + distance;
|
||||
p.pos.Y = Center.Y;
|
||||
p.pos.Z = Center.Z + distance;
|
||||
|
||||
p.pos.set(Center.X + distance, Center.Y, Center.Z + distance);
|
||||
p.pos.rotateXZBy( ( os::Randomizer::rand() % 3600 ) * 0.1f, Center );
|
||||
|
||||
p.startTime = now;
|
||||
|
|
|
@ -59,9 +59,7 @@ s32 CParticleSphereEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& ou
|
|||
f32 distance = fmodf( (f32)os::Randomizer::rand(), Radius * 1000.0f ) * 0.001f;
|
||||
|
||||
// Random direction from center
|
||||
p.pos.X = Center.X + distance;
|
||||
p.pos.Y = Center.Y + distance;
|
||||
p.pos.Z = Center.Z + distance;
|
||||
p.pos.set(Center + distance);
|
||||
p.pos.rotateXYBy( os::Randomizer::rand() % 360, Center );
|
||||
p.pos.rotateYZBy( os::Randomizer::rand() % 360, Center );
|
||||
p.pos.rotateXZBy( os::Randomizer::rand() % 360, Center );
|
||||
|
@ -72,9 +70,9 @@ s32 CParticleSphereEmitter::emitt(u32 now, u32 timeSinceLastCall, SParticle*& ou
|
|||
if(MaxAngleDegrees)
|
||||
{
|
||||
core::vector3df tgt = Direction;
|
||||
tgt.rotateXYBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees, core::vector3df());
|
||||
tgt.rotateYZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees, core::vector3df());
|
||||
tgt.rotateXZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees, core::vector3df());
|
||||
tgt.rotateXYBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees);
|
||||
tgt.rotateYZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees);
|
||||
tgt.rotateXZBy((os::Randomizer::rand()%(MaxAngleDegrees*2)) - MaxAngleDegrees);
|
||||
p.vector = tgt;
|
||||
}
|
||||
|
||||
|
|
|
@ -78,6 +78,7 @@ bool CSceneNodeAnimatorCameraMaya::OnEvent(const SEvent& event)
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
//! OnAnimate() is called just before rendering the whole scene.
|
||||
//! nodes may calculate or store animations here, and may do other useful things,
|
||||
//! dependent on what they are.
|
||||
|
@ -222,8 +223,8 @@ void CSceneNodeAnimatorCameraMaya::animateNode(ISceneNode *node, u32 timeMs)
|
|||
|
||||
// jox: fixed bug: jitter when rotating to the top and bottom of y
|
||||
UpVector.set(0,1,0);
|
||||
UpVector.rotateXYBy(-nRotY, core::vector3df(0,0,0));
|
||||
UpVector.rotateXZBy(-nRotX+180.f, core::vector3df(0,0,0));
|
||||
UpVector.rotateXYBy(-nRotY);
|
||||
UpVector.rotateXZBy(-nRotX+180.f);
|
||||
|
||||
camera->setPosition(Pos);
|
||||
camera->setTarget(Target);
|
||||
|
@ -254,7 +255,7 @@ void CSceneNodeAnimatorCameraMaya::updateAnimationState()
|
|||
RotX = (f32)vec2d.getAngle();
|
||||
|
||||
// Y rotation
|
||||
pos.rotateXZBy(RotX, core::vector3df());
|
||||
pos.rotateXZBy(RotX);
|
||||
vec2d.set(pos.X, pos.Y);
|
||||
RotY = -(f32)vec2d.getAngle();
|
||||
|
||||
|
@ -262,18 +263,21 @@ void CSceneNodeAnimatorCameraMaya::updateAnimationState()
|
|||
CurrentZoom = (f32)Pos.getDistanceFrom(Target);
|
||||
}
|
||||
|
||||
|
||||
//! Sets the rotation speed
|
||||
void CSceneNodeAnimatorCameraMaya::setRotateSpeed(f32 speed)
|
||||
{
|
||||
RotateSpeed = speed;
|
||||
}
|
||||
|
||||
|
||||
//! Sets the movement speed
|
||||
void CSceneNodeAnimatorCameraMaya::setMoveSpeed(f32 speed)
|
||||
{
|
||||
TranslateSpeed = speed;
|
||||
}
|
||||
|
||||
|
||||
//! Sets the zoom speed
|
||||
void CSceneNodeAnimatorCameraMaya::setZoomSpeed(f32 speed)
|
||||
{
|
||||
|
@ -287,18 +291,21 @@ f32 CSceneNodeAnimatorCameraMaya::getRotateSpeed() const
|
|||
return RotateSpeed;
|
||||
}
|
||||
|
||||
|
||||
// Gets the movement speed
|
||||
f32 CSceneNodeAnimatorCameraMaya::getMoveSpeed() const
|
||||
{
|
||||
return TranslateSpeed;
|
||||
}
|
||||
|
||||
|
||||
//! Gets the zoom speed
|
||||
f32 CSceneNodeAnimatorCameraMaya::getZoomSpeed() const
|
||||
{
|
||||
return ZoomSpeed;
|
||||
}
|
||||
|
||||
|
||||
} // end namespace
|
||||
} // end namespace
|
||||
|
||||
|
|
Loading…
Reference in New Issue