Commit b50f464a authored by hybrid's avatar hybrid

Removed unused member.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2311 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 9e695384
...@@ -15,8 +15,8 @@ CSceneNodeAnimatorFlyStraight::CSceneNodeAnimatorFlyStraight(const core::vector3 ...@@ -15,8 +15,8 @@ CSceneNodeAnimatorFlyStraight::CSceneNodeAnimatorFlyStraight(const core::vector3
const core::vector3df& endPoint, u32 timeForWay, const core::vector3df& endPoint, u32 timeForWay,
bool loop, u32 now, bool pingpong) bool loop, u32 now, bool pingpong)
: ISceneNodeAnimatorFinishing(now + timeForWay), : ISceneNodeAnimatorFinishing(now + timeForWay),
Start(startPoint), End(endPoint), WayLength(0.0f), Start(startPoint), End(endPoint), TimeFactor(0.0f), StartTime(now),
TimeFactor(0.0f), StartTime(now), TimeForWay(timeForWay), Loop(loop), PingPong ( pingpong ) TimeForWay(timeForWay), Loop(loop), PingPong(pingpong)
{ {
#ifdef _DEBUG #ifdef _DEBUG
setDebugName("CSceneNodeAnimatorFlyStraight"); setDebugName("CSceneNodeAnimatorFlyStraight");
...@@ -29,10 +29,8 @@ CSceneNodeAnimatorFlyStraight::CSceneNodeAnimatorFlyStraight(const core::vector3 ...@@ -29,10 +29,8 @@ CSceneNodeAnimatorFlyStraight::CSceneNodeAnimatorFlyStraight(const core::vector3
void CSceneNodeAnimatorFlyStraight::recalculateIntermediateValues() void CSceneNodeAnimatorFlyStraight::recalculateIntermediateValues()
{ {
Vector = End - Start; Vector = End - Start;
WayLength = (f32)Vector.getLength(); TimeFactor = (f32)Vector.getLength() / TimeForWay;
Vector.normalize(); Vector.normalize();
TimeFactor = WayLength / TimeForWay;
} }
...@@ -96,7 +94,7 @@ void CSceneNodeAnimatorFlyStraight::deserializeAttributes(io::IAttributes* in, i ...@@ -96,7 +94,7 @@ void CSceneNodeAnimatorFlyStraight::deserializeAttributes(io::IAttributes* in, i
ISceneNodeAnimator* CSceneNodeAnimatorFlyStraight::createClone(ISceneNode* node, ISceneManager* newManager) ISceneNodeAnimator* CSceneNodeAnimatorFlyStraight::createClone(ISceneNode* node, ISceneManager* newManager)
{ {
CSceneNodeAnimatorFlyStraight * newAnimator = CSceneNodeAnimatorFlyStraight * newAnimator =
new CSceneNodeAnimatorFlyStraight(Start, End, TimeForWay, Loop, StartTime, PingPong); new CSceneNodeAnimatorFlyStraight(Start, End, TimeForWay, Loop, StartTime, PingPong);
return newAnimator; return newAnimator;
......
...@@ -32,7 +32,7 @@ namespace scene ...@@ -32,7 +32,7 @@ namespace scene
//! Returns type of the scene node animator //! Returns type of the scene node animator
virtual ESCENE_NODE_ANIMATOR_TYPE getType() const { return ESNAT_FLY_STRAIGHT; } virtual ESCENE_NODE_ANIMATOR_TYPE getType() const { return ESNAT_FLY_STRAIGHT; }
//! Creates a clone of this animator. //! Creates a clone of this animator.
/** Please note that you will have to drop /** Please note that you will have to drop
(IReferenceCounted::drop()) the returned pointer after calling this. */ (IReferenceCounted::drop()) the returned pointer after calling this. */
...@@ -45,7 +45,6 @@ namespace scene ...@@ -45,7 +45,6 @@ namespace scene
core::vector3df Start; core::vector3df Start;
core::vector3df End; core::vector3df End;
core::vector3df Vector; core::vector3df Vector;
f32 WayLength;
f32 TimeFactor; f32 TimeFactor;
u32 StartTime; u32 StartTime;
u32 TimeForWay; u32 TimeForWay;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment