Posted: Sun Oct 02, 2005 8:51 pm
Or Paging Landscape Manager(like the Ogre users call it).
Official forum of the Irrlicht Engine
https://irrlicht.sourceforge.io/forum/
It's not hard to modify animators at real time by me but another thinks hurts me about:Spintz wrote: It would be nice to modify animators at real time, instead of dropping them and creating new ones.
Spintz wrote:Yeah, that's kind of a pain, because there is nothing common between the different animators. The only thing, they use time for something, but for all different times
that link doesnt work SpintzSpintz wrote: http://irrlicht.spintz.com/spintzfundemo.rar
What about for scale animator? I saw this animator in Arrena of Honor project and added loop and autoreverse features. I added this animator in my VisualEditor for test.Spintz wrote: So any other ideas for events for animators, or even more ideas for new animators, particle emitters/affectors???
Hope this covers what you were expecting Etcaptor, if not, let me know, gimme more ideas!
Code: Select all
//---------------------------------------------------------------------------
#ifndef IScaleAnimatorH
#define IScaleAnimatorH
//---------------------------------------------------------------------------
#endif
#include <irrlicht.h>
namespace irr
{
namespace scene
{
class IScaleAnimator : public scene::ISceneNodeAnimator
{
public:
IScaleAnimator(u32 TimeToScale, core::vector3df StartScale, core::vector3df EndScale, bool autoreverse = false, bool loop = false);
virtual ~IScaleAnimator ();
virtual void animateNode (scene::ISceneNode *node, u32 timeMs);
virtual ISceneNode* getNode(){return Node;} //etcaptor
private:
u32 mStartTime;
u32 mTimeToScale;
core::vector3df mStartScale;
core::vector3df mEndScale;
bool AutoReverse;
bool Loop;
ISceneNode* Node;//etcaptor
};
} // end namespace scene
} // end namespace irr
Code: Select all
/* ------------------------------------------------------------- */
namespace irr
{
namespace scene
{
IScaleAnimator::IScaleAnimator(u32 TimeToScale, core::vector3df StartScale, core::vector3df EndScale, bool autoreverse, bool loop)
{
mStartTime = 0;
mTimeToScale = TimeToScale;
mStartScale = StartScale;
mEndScale = EndScale;
AutoReverse = autoreverse;
if(AutoReverse && loop)
Loop = true;
else
Loop = false;
}
IScaleAnimator::~IScaleAnimator ()
{
}
void IScaleAnimator::animateNode (scene::ISceneNode *node, u32 timeMs)
{
Node = node;
if (mStartTime == 0)
{
mStartTime = timeMs;
}
u32 passedTime = timeMs - mStartTime;
if ( passedTime > mTimeToScale )
{
if(!Loop) //etcaptor
return ; //end of process
}
f32 progress = f32(passedTime) / f32(mTimeToScale);
core::vector3df scale = mStartScale + (mEndScale-mStartScale) * progress;
node->setScale(scale);
if(AutoReverse && passedTime > mTimeToScale/2) //etcaptor
{
core::vector3df scale = mEndScale - (mEndScale-mStartScale) * progress;
node->setScale(scale);
if (passedTime > mTimeToScale)
mStartTime = timeMs;
}
}
} // end namespace scene
} // end namespace irr
Code: Select all
../../libs/irrlicht-spintz-0.12/lib/Linux/libIrrlicht-Spintz.a(CParticleSystemSceneNode.o): In function `irr::scene::CParticleSystemSceneNode::createSphereEmitter(irr::core::vector3d<float>, float, irr::core::vector3d<float>, unsigned, unsigned, irr::video::SColor, irr::video::SColor, unsigned, unsigned, int)':
CParticleSystemSceneNode.cpp:(.text+0xbe6): undefined reference to `irr::scene::CParticleSphereEmitter::CParticleSphereEmitter[in-charge](irr::core::vector3d<float>, float, irr::core::vector3d<float>, unsigned, unsigned, irr::video::SColor, irr::video::SColor, unsigned, unsigned, int)'
../../libs/irrlicht-spintz-0.12/lib/Linux/libIrrlicht-Spintz.a(CParticleSystemSceneNode.o): In function `irr::scene::CParticleSystemSceneNode::createRingEmitter(irr::core::vector3d<float>, float, float, irr::core::vector3d<float>, unsigned, unsigned, irr::video::SColor, irr::video::SColor, unsigned, unsigned, int)':
CParticleSystemSceneNode.cpp:(.text+0xcbb): undefined reference to `irr::scene::CParticleRingEmitter::CParticleRingEmitter[in-charge](irr::core::vector3d<float>, float, float, irr::core::vector3d<float>, unsigned, unsigned, irr::video::SColor, irr::video::SColor, unsigned, unsigned, int)'
../../libs/irrlicht-spintz-0.12/lib/Linux/libIrrlicht-Spintz.a(CParticleSystemSceneNode.o): In function `irr::scene::CParticleSystemSceneNode::createMeshEmitter(irr::scene::IMesh*, bool, irr::core::vector3d<float>, float, int, bool, unsigned, unsigned, irr::video::SColor, irr::video::SColor, unsigned, unsigned, int)':
CParticleSystemSceneNode.cpp:(.text+0xd9b): undefined reference to `irr::scene::CParticleMeshEmitter::CParticleMeshEmitter[in-charge](irr::scene::IMesh*, bool, irr::core::vector3d<float>, float, int, bool, unsigned, unsigned, irr::video::SColor, irr::video::SColor, unsigned, unsigned, int)'
../../libs/irrlicht-spintz-0.12/lib/Linux/libIrrlicht-Spintz.a(CParticleSystemSceneNode.o): In function `irr::scene::CParticleSystemSceneNode::createAttractionAffector(irr::core::vector3d<float>, float, bool, bool, bool)':
CParticleSystemSceneNode.cpp:(.text+0xf35): undefined reference to `irr::scene::CParticleAttractionAffector::CParticleAttractionAffector[in-charge](irr::core::vector3d<float>, float, bool, bool, bool)'
../../libs/irrlicht-spintz-0.12/lib/Linux/libIrrlicht-Spintz.a(CParticleSystemSceneNode.o): In function `irr::scene::CParticleSystemSceneNode::createRotationAffector(float, float, float, irr::core::vector3d<float>)':
CParticleSystemSceneNode.cpp:(.