diff -Nauwr Irrlicht/CSceneManager.cpp Irrlicht/CSceneManager.cpp --- Irrlicht/CSceneManager.cpp 2005-08-24 18:01:14.000000000 +0200 +++ Irrlicht/CSceneManager.cpp 2005-09-27 15:50:08.000000000 +0200 @@ -805,53 +877,42 @@ //! creates a rotation animator, which rotates the attached scene node around itself. -ISceneNodeAnimator* CSceneManager::createRotationAnimator(const core::vector3df& rotationPerSecond) +ISceneNodeAnimatorRotation* CSceneManager::createRotationAnimator(const core::vector3df& rotationPerSecond) { - ISceneNodeAnimator* anim = new CSceneNodeAnimatorRotation(os::Timer::getTime(), - rotationPerSecond); - - return anim; + return new CSceneNodeAnimatorRotation(os::Timer::getTime(), rotationPerSecond); } //! creates a fly circle animator, which lets the attached scene node fly around a center. -ISceneNodeAnimator* CSceneManager::createFlyCircleAnimator(const core::vector3df& normal, +ISceneNodeAnimatorFlyCircle* CSceneManager::createFlyCircleAnimator(const core::vector3df& normal, f32 radius, f32 speed) { - ISceneNodeAnimator* anim = new CSceneNodeAnimatorFlyCircle(os::Timer::getTime(), normal, - radius, speed); - return anim; + return new CSceneNodeAnimatorFlyCircle(os::Timer::getTime(), normal, radius, speed); } //! Creates a fly straight animator, which lets the attached scene node //! fly or move along a line between two points. -ISceneNodeAnimator* CSceneManager::createFlyStraightAnimator(const core::vector3df& startPoint, +ISceneNodeAnimatorFlyStraight* CSceneManager::createFlyStraightAnimator(const core::vector3df& startPoint, const core::vector3df& endPoint, u32 timeForWay, bool loop) { - ISceneNodeAnimator* anim = new CSceneNodeAnimatorFlyStraight(startPoint, - endPoint, timeForWay, loop, os::Timer::getTime()); - - return anim; + return new CSceneNodeAnimatorFlyStraight(startPoint, endPoint, timeForWay, loop, os::Timer::getTime()); } //! Creates a texture animator, which switches the textures of the target scene //! node based on a list of textures. -ISceneNodeAnimator* CSceneManager::createTextureAnimator(const core::array& textures, +ISceneNodeAnimatorTexture* CSceneManager::createTextureAnimator(const core::array& textures, s32 timePerFrame, bool loop) { - ISceneNodeAnimator* anim = new CSceneNodeAnimatorTexture(textures, - timePerFrame, loop, os::Timer::getTime()); - - return anim; + return new CSceneNodeAnimatorTexture(textures, timePerFrame, loop, os::Timer::getTime()); } //! Creates a scene node animator, which deletes the scene node after //! some time automaticly. -ISceneNodeAnimator* CSceneManager::createDeleteAnimator(u32 when) +ISceneNodeAnimatorDelete* CSceneManager::createDeleteAnimator(u32 when) { return new CSceneNodeAnimatorDelete(this, os::Timer::getTime() + when); } @@ -876,13 +937,11 @@ //! Creates a follow spline animator. -ISceneNodeAnimator* CSceneManager::createFollowSplineAnimator(s32 startTime, +ISceneNodeAnimatorFollowSpline* CSceneManager::createFollowSplineAnimator(s32 startTime, const core::array< core::vector3df >& points, f32 speed, f32 tightness) { - ISceneNodeAnimator* a = new CSceneNodeAnimatorFollowSpline(startTime, points, - speed, tightness); - return a; + return new CSceneNodeAnimatorFollowSpline(startTime, points, speed, tightness); } diff -Nauwr Irrlicht/CSceneManager.h Irrlicht/CSceneManager.h --- Irrlicht/CSceneManager.h 2005-08-20 22:17:50.000000000 +0200 +++ Irrlicht/CSceneManager.h 2005-09-27 15:46:54.000000000 +0200 @@ -206,28 +233,28 @@ //! \param rotationPerSecond: Specifies the speed of the animation //! \return Returns the animator. Attach it to a scene node with ISceneNode::addAnimator() //! and the animator will animate it. - virtual ISceneNodeAnimator* createRotationAnimator(const core::vector3df& rotationPerSecond); + virtual ISceneNodeAnimatorRotation* createRotationAnimator(const core::vector3df& rotationPerSecond); //! creates a fly circle animator, which lets the attached scene node fly //! around a center. The center is the position of the scene node. //! \param rotationSpeed: //! \return Returns the animator. Attach it to a scene node with ISceneNode::addAnimator() //! and the animator will animate it. - virtual ISceneNodeAnimator* createFlyCircleAnimator(const core::vector3df& normal, f32 radius, f32 speed); + virtual ISceneNodeAnimatorFlyCircle* createFlyCircleAnimator(const core::vector3df& normal, f32 radius, f32 speed); //! Creates a fly straight animator, which lets the attached scene node //! fly or move along a line between two points. - virtual ISceneNodeAnimator* createFlyStraightAnimator(const core::vector3df& startPoint, + virtual ISceneNodeAnimatorFlyStraight* createFlyStraightAnimator(const core::vector3df& startPoint, const core::vector3df& endPoint, u32 timeForWay, bool loop=false); //! Creates a texture animator, which switches the textures of the target scene //! node based on a list of textures. - virtual ISceneNodeAnimator* createTextureAnimator(const core::array& textures, + virtual ISceneNodeAnimatorTexture* createTextureAnimator(const core::array& textures, s32 timePerFrame, bool loop); //! Creates a scene node animator, which deletes the scene node after //! some time automaticly. - virtual ISceneNodeAnimator* createDeleteAnimator(u32 timeMS); + virtual ISceneNodeAnimatorDelete* createDeleteAnimator(u32 timeMS); //! Creates a special scene node animator for doing automatic collision detection @@ -240,7 +267,7 @@ f32 slidingValue = 0.0005f); //! Creates a follow spline animator. - virtual ISceneNodeAnimator* createFollowSplineAnimator(s32 startTime, + virtual ISceneNodeAnimatorFollowSpline* createFollowSplineAnimator(s32 startTime, const core::array< core::vector3df >& points, f32 speed = 1.0f, f32 tightness = 0.5f); diff -Nauwr Irrlicht/CSceneNodeAnimatorDelete.h Irrlicht/CSceneNodeAnimatorDelete.h --- Irrlicht/CSceneNodeAnimatorDelete.h 2005-08-20 22:17:52.000000000 +0200 +++ Irrlicht/CSceneNodeAnimatorDelete.h 2005-09-27 15:54:22.000000000 +0200 @@ -5,13 +5,14 @@ #ifndef __C_SCENE_NODE_ANIMATOR_DELETE_H_INCLUDED__ #define __C_SCENE_NODE_ANIMATOR_DELETE_H_INCLUDED__ +#include "ISceneNodeAnimatorDelete.h" #include "ISceneNode.h" namespace irr { namespace scene { - class CSceneNodeAnimatorDelete : public ISceneNodeAnimator + class CSceneNodeAnimatorDelete : public ISceneNodeAnimatorDelete { public: @@ -24,6 +25,12 @@ //! animates a scene node virtual void animateNode(ISceneNode* node, u32 timeMs); + //! set the time to delete + virtual void setDeleteTime( u32 deleteTime ) { DeleteTime = deleteTime; } + + //! get the deletion time + virtual const u32& getDeleteTime() { return DeleteTime; } + private: u32 DeleteTime; diff -Nauwr Irrlicht/CSceneNodeAnimatorFlyCircle.h Irrlicht/CSceneNodeAnimatorFlyCircle.h --- Irrlicht/CSceneNodeAnimatorFlyCircle.h 2005-08-20 22:17:52.000000000 +0200 +++ Irrlicht/CSceneNodeAnimatorFlyCircle.h 2005-09-27 15:55:26.000000000 +0200 @@ -5,13 +5,14 @@ #ifndef __C_SCENE_NODE_ANIMATOR_FLY_CIRCLE_H_INCLUDED__ #define __C_SCENE_NODE_ANIMATOR_FLY_CIRCLE_H_INCLUDED__ +#include "ISceneNodeAnimatorFlyCircle.h" #include "ISceneNode.h" namespace irr { namespace scene { - class CSceneNodeAnimatorFlyCircle : public ISceneNodeAnimator + class CSceneNodeAnimatorFlyCircle : public ISceneNodeAnimatorFlyCircle { public: @@ -24,6 +25,24 @@ //! animates a scene node virtual void animateNode(ISceneNode* node, u32 timeMs); + //! set the radius for the circle to fly + virtual void setRadius( f32 radius ) { Radius = radius; } + + //! set the speed to fly the circle + virtual void setSpeed( f32 speed ) { Speed = speed; } + + //! set the center of the cirlce to fly + virtual void setCenter( core::vector3df center ) { Center = center; } + + //! get the radius of the circle + virtual const f32& getRadius() const { return Radius; } + + //! get the speed to fly + virtual const f32& getSpeed() const { return Speed; } + + //! get the center of the circle + virtual const core::vector3df& getCenter() const { return Center; } + private: core::vector3df Center; diff -Nauwr Irrlicht/CSceneNodeAnimatorFlyStraight.h Irrlicht/CSceneNodeAnimatorFlyStraight.h --- Irrlicht/CSceneNodeAnimatorFlyStraight.h 2005-08-20 22:17:52.000000000 +0200 +++ Irrlicht/CSceneNodeAnimatorFlyStraight.h 2005-09-27 15:57:32.000000000 +0200 @@ -5,13 +5,14 @@ #ifndef __C_SCENE_NODE_ANIMATOR_FLY_STRAIGHT_H_INCLUDED__ #define __C_SCENE_NODE_ANIMATOR_FLY_STRAIGHT_H_INCLUDED__ +#include "ISceneNodeAnimatorFlyStraight.h" #include "ISceneNode.h" namespace irr { namespace scene { - class CSceneNodeAnimatorFlyStraight : public ISceneNodeAnimator + class CSceneNodeAnimatorFlyStraight : public ISceneNodeAnimatorFlyStraight { public: @@ -26,6 +27,60 @@ //! animates a scene node virtual void animateNode(ISceneNode* node, u32 timeMs); + //! set start point + virtual void setStart( core::vector3df start ) { Start = start; } + + //! set end point + virtual void setEnd( core::vector3df end ) { End = end; } + + //! set vector + virtual void setVector( core::vector3df vector ) { Vector = vector; } + + //! set waypoint length + virtual void setWayLength( f32 wayLength ) { WayLength = wayLength; } + + //! set time factor + virtual void setTimeFactor( f32 timeFactor ) { TimeFactor = timeFactor; } + + //! set starttime + virtual void setStartTime( u32 startTime ) { StartTime = startTime; } + + //! set endtime + virtual void setEndTime( u32 endTime ) { EndTime = endTime; } + + //! set time for waypoint + virtual void setTimeForWay( u32 timeForWay ) { TimeForWay = timeForWay; } + + //! set wheter or not to loop + virtual void setLoop( bool loop ) { Loop = loop; } + + //! get start point + virtual const core::vector3df& getStart() const { return Start; } + + //! get end point + virtual const core::vector3df& getEnd() const { return End; } + + //! get vector + virtual const core::vector3df& getVector() const { return Vector; } + + //! get waypoint length + virtual const f32& getWayLength() const { return WayLength; } + + //! get time factor + virtual const f32& getTimeFactor() const { return TimeFactor; } + + //! get start time + virtual const u32& getStartTime() const { return StartTime; } + + //! get end time + virtual const u32& getEndTime() const { return EndTime; } + + //! get time for each way point + virtual const u32& getTimeForWay() const { return TimeForWay; } + + //! get whether or not this animation is looping + virtual const bool& getLoop() const { return Loop; } + private: core::vector3df Start; diff -Nauwr Irrlicht/CSceneNodeAnimatorFollowSpline.h Irrlicht/CSceneNodeAnimatorFollowSpline.h --- Irrlicht/CSceneNodeAnimatorFollowSpline.h 2005-08-20 22:17:52.000000000 +0200 +++ Irrlicht/CSceneNodeAnimatorFollowSpline.h 2005-09-27 16:16:34.000000000 +0200 @@ -5,6 +5,7 @@ #ifndef __C_SCENE_NODE_ANIMATOR_FOLLOW_SPLINE_H_INCLUDED__ #define __C_SCENE_NODE_ANIMATOR_FOLLOW_SPLINE_H_INCLUDED__ +#include "ISceneNodeAnimatorFollowSpline.h" #include "ISceneNode.h" #include "irrArray.h" @@ -14,7 +15,7 @@ { //! Scene node animator based free code Matthias Gall wrote and sent in. (Most of //! this code is written by him, I only modified bits.) - class CSceneNodeAnimatorFollowSpline : public ISceneNodeAnimator + class CSceneNodeAnimatorFollowSpline : public ISceneNodeAnimatorFollowSpline { public: @@ -29,6 +30,33 @@ //! animates a scene node virtual void animateNode(ISceneNode* node, u32 timeMs); + //! set a specific point in the Points list + virtual void setPoint( u32 index, core::vector3df point ) { Points[index] = point; } + + //! set a completely new point list + virtual void setPoints( core::array< core::vector3df > points ) { Points = points; NumPoints = points.size(); } + + //! set speed to traverse the points + virtual void setSpeed( f32 speed ) { Speed = speed; } + + //! set tightness + virtual void setTightness( f32 tightness ) { Tightness = tightness; } + + //! get a specific point + virtual const core::vector3df& getPoint( u32 index ) const { return Points[index]; } + + //! get the array of points + virtual const core::array< core::vector3df >& getPoints() const { return Points; } + + //! get the speed that the spline is traversed + virtual const f32& getSpeed() const { return Speed; } + + //! get the tightness + virtual const f32& getTightness() const { return Tightness; } + + //! get the number of points + virtual const u32& getNumPoints() const { return NumPoints; } + protected: //! clamps a the value idx to fit into range 0..size-1 diff -Nauwr Irrlicht/CSceneNodeAnimatorRotation.h Irrlicht/CSceneNodeAnimatorRotation.h --- Irrlicht/CSceneNodeAnimatorRotation.h 2005-08-20 22:17:52.000000000 +0200 +++ Irrlicht/CSceneNodeAnimatorRotation.h 2005-09-27 16:19:58.000000000 +0200 @@ -5,13 +5,14 @@ #ifndef __C_SCENE_NODE_ANIMATOR_ROTATION_H_INCLUDED__ #define __C_SCENE_NODE_ANIMATOR_ROTATION_H_INCLUDED__ +#include "ISceneNodeAnimatorRotation.h" #include "ISceneNode.h" namespace irr { namespace scene { - class CSceneNodeAnimatorRotation : public ISceneNodeAnimator + class CSceneNodeAnimatorRotation : public ISceneNodeAnimatorRotation { public: @@ -24,6 +25,12 @@ //! animates a scene node virtual void animateNode(ISceneNode* node, u32 timeMs); + //! set rotation + virtual void setRotation( core::vector3df rotation ) { Rotation = rotation; } + + //! get rotation + virtual const core::vector3df& getRotation() const { return Rotation; } + private: core::vector3df Rotation; diff -Nauwr Irrlicht/CSceneNodeAnimatorTexture.h Irrlicht/CSceneNodeAnimatorTexture.h --- Irrlicht/CSceneNodeAnimatorTexture.h 2005-08-20 22:17:52.000000000 +0200 +++ Irrlicht/CSceneNodeAnimatorTexture.h 2005-09-27 15:52:58.000000000 +0200 @@ -5,6 +5,7 @@ #ifndef __C_SCENE_NODE_ANIMATOR_TEXTURE_H_INCLUDED__ #define __C_SCENE_NODE_ANIMATOR_TEXTURE_H_INCLUDED__ +#include "ISceneNodeAnimatorTexture.h" #include "irrArray.h" #include "ISceneNode.h" @@ -12,7 +13,7 @@ { namespace scene { - class CSceneNodeAnimatorTexture : public ISceneNodeAnimator + class CSceneNodeAnimatorTexture : public ISceneNodeAnimatorTexture { public: @@ -26,6 +27,25 @@ //! animates a scene node virtual void animateNode(ISceneNode* node, u32 timeMs); + //! set a texture, this grabs the texture + virtual void setTexture( u32 index, video::ITexture* texture ) + { + if( Textures[index] ) + Textures[index]->drop(); + + Textures[index] = texture; + Textures[index]->grab(); + } + + //! set timer per frame + virtual void setTimePerFrame( u32 timePerFrame ) { TimePerFrame = timePerFrame; } + + //! get texture specified by index + virtual const video::ITexture* getTexture( u32 index ) { return Textures[index]; } + + //! get time per frame + virtual const u32& getTimePerFrame() const { return TimePerFrame; } + private: core::array Textures; diff -Nauwr Irrlicht/include/irrlicht.h Irrlicht/include/irrlicht.h --- Irrlicht/include/irrlicht.h 2005-08-20 22:46:48.000000000 +0200 +++ Irrlicht/include/irrlicht.h 2005-09-28 10:14:26.000000000 +0200 @@ -81,9 +81,15 @@ #include "IStringParameters.h" #include "ITriangleSelector.h" #include "ISceneNodeAnimator.h" +#include "ISceneNodeAnimatorDelete.h" +#include "ISceneNodeAnimatorTexture.h" +#include "ISceneNodeAnimatorFlyCircle.h" +#include "ISceneNodeAnimatorFlyStraight.h" +#include "ISceneNodeAnimatorFollowSpline.h" +#include "ISceneNodeAnimatorRotation.h" +#include "ISceneNodeAnimatorCollisionResponse.h" #include "ISceneCollisionManager.h" #include "IMaterialRenderer.h" -#include "ISceneNodeAnimatorCollisionResponse.h" #include "IShaderConstantSetCallBack.h" #include "IParticleSystemSceneNode.h" #include "ITerrainSceneNode.h" diff -Nauwr Irrlicht/include/ISceneManager.h Irrlicht/include/ISceneManager.h --- Irrlicht/include/ISceneManager.h 2005-08-23 18:51:58.000000000 +0200 +++ Irrlicht/include/ISceneManager.h 2005-09-27 15:46:10.000000000 +0200 @@ -150,6 +150,12 @@ class ICameraSceneNode; class IAnimatedMeshSceneNode; class ISceneNodeAnimator; + class ISceneNodeAnimatorTexture; + class ISceneNodeAnimatorDelete; + class ISceneNodeAnimatorFlyCircle; + class ISceneNodeAnimatorFlyStraight; + class ISceneNodeAnimatorFollowSpline; + class ISceneNodeAnimatorRotation; class ISceneNodeAnimatorCollisionResponse; class ILightSceneNode; class IBillboardSceneNode; @@ -779,7 +818,7 @@ and the animator will animate it. If you no longer need the animator, you should call ISceneNodeAnimator::drop(). See IUnknown::drop() for more information. */ - virtual ISceneNodeAnimator* createRotationAnimator(const core::vector3df& rotationPerSecond) = 0; + virtual ISceneNodeAnimatorRotation* createRotationAnimator(const core::vector3df& rotationPerSecond) = 0; //! Creates a fly circle animator, which lets the attached scene node fly around a center. /** \param center: Center of the circle. @@ -789,7 +828,7 @@ and the animator will animate it. If you no longer need the animator, you should call ISceneNodeAnimator::drop(). See IUnknown::drop() for more information. */ - virtual ISceneNodeAnimator* createFlyCircleAnimator(const core::vector3df& center, + virtual ISceneNodeAnimatorFlyCircle* createFlyCircleAnimator(const core::vector3df& center, f32 radius, f32 speed=0.001f) = 0; //! Creates a fly straight animator, which lets the attached scene node fly or move along a line between two points. @@ -803,7 +842,7 @@ and the animator will animate it. If you no longer need the animator, you should call ISceneNodeAnimator::drop(). See IUnknown::drop() for more information. */ - virtual ISceneNodeAnimator* createFlyStraightAnimator(const core::vector3df& startPoint, + virtual ISceneNodeAnimatorFlyStraight* createFlyStraightAnimator(const core::vector3df& startPoint, const core::vector3df& endPoint, u32 timeForWay, bool loop=false) = 0; //! Creates a texture animator, which switches the textures of the target scene node based on a list of textures. @@ -816,7 +855,7 @@ and the animator will animate it. If you no longer need the animator, you should call ISceneNodeAnimator::drop(). See IUnknown::drop() for more information. */ - virtual ISceneNodeAnimator* createTextureAnimator(const core::array& textures, + virtual ISceneNodeAnimatorTexture* createTextureAnimator(const core::array& textures, s32 timePerFrame, bool loop=true) = 0; //! Creates a scene node animator, which deletes the scene node after some time automaticly. @@ -825,7 +864,7 @@ and the animator will animate it. If you no longer need the animator, you should call ISceneNodeAnimator::drop(). See IUnknown::drop() for more information. */ - virtual ISceneNodeAnimator* createDeleteAnimator(u32 timeMs) = 0; + virtual ISceneNodeAnimatorDelete* createDeleteAnimator(u32 timeMs) = 0; //! Creates a special scene node animator for doing automatic collision detection and response. /** See ISceneNodeAnimatorCollisionResponse for details. @@ -870,7 +909,7 @@ wrote: Uses a subset of hermite splines: either cardinal splines (tightness != 0.5) or catmull-rom-splines (tightness == 0.5) but this is just my understanding of this stuff, I'm not a mathematician, so this might be wrong ;) */ - virtual ISceneNodeAnimator* createFollowSplineAnimator(s32 startTime, + virtual ISceneNodeAnimatorFollowSpline* createFollowSplineAnimator(s32 startTime, const core::array< core::vector3df >& points, f32 speed = 1.0f, f32 tightness = 0.5f) = 0; diff -Nauwr Irrlicht/include/ISceneNodeAnimatorDelete.h Irrlicht/include/ISceneNodeAnimatorDelete.h --- Irrlicht/include/ISceneNodeAnimatorDelete.h 1970-01-01 01:00:00.000000000 +0100 +++ Irrlicht/include/ISceneNodeAnimatorDelete.h 2005-09-27 15:54:34.000000000 +0200 @@ -0,0 +1,36 @@ +// Copyright (C) 2002-2005 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SCENE_NODE_ANIMATOR_DELETE_H_INCLUDED__ +#define __I_SCENE_NODE_ANIMATOR_DELETE_H_INCLUDED__ + +#include "ISceneNodeAnimator.h" + +namespace irr +{ +namespace scene +{ + //! Animates a scene node. Can animate position, rotation, material, and so on. + /** A scene node animator is able to animate a scene node in a very simple way. It may + change its position, rotation, scale and/or material. There are lots of animators + to choose from. You can create scene node animators with the ISceneManager interface. + */ + class ISceneNodeAnimatorDelete : public ISceneNodeAnimator + { + public: + + //! destructor + virtual ~ISceneNodeAnimatorDelete() {} + + //! set the time to delete + virtual void setDeleteTime( u32 deleteTime ) = 0; + + //! get the deletion time + virtual const u32& getDeleteTime() = 0; + }; +} // end namespace scene +} // end namespace irr + +#endif // __I_SCENE_NODE_ANIMATOR_DELETE_H_INCLUDED__ + diff -Nauwr Irrlicht/include/ISceneNodeAnimatorFlyCircle.h Irrlicht/include/ISceneNodeAnimatorFlyCircle.h --- Irrlicht/include/ISceneNodeAnimatorFlyCircle.h 1970-01-01 01:00:00.000000000 +0100 +++ Irrlicht/include/ISceneNodeAnimatorFlyCircle.h 2005-09-27 15:55:48.000000000 +0200 @@ -0,0 +1,49 @@ +// Copyright (C) 2002-2005 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SCENE_NODE_ANIMATOR_FLY_CIRCLE_H_INCLUDED__ +#define __I_SCENE_NODE_ANIMATOR_FLY_CIRCLE_H_INCLUDED__ + +#include "ISceneNodeAnimator.h" + +namespace irr +{ +namespace scene +{ + //! Animates a scene node. Can animate position, rotation, material, and so on. + /** A scene node animator is able to animate a scene node in a very simple way. It may + change its position, rotation, scale and/or material. There are lots of animators + to choose from. You can create scene node animators with the ISceneManager interface. + */ + class ISceneNodeAnimatorFlyCircle : public ISceneNodeAnimator + { + public: + + //! destructor + virtual ~ISceneNodeAnimatorFlyCircle() {} + + //! set the radius for the circle to fly + virtual void setRadius( f32 radius ) = 0; + + //! set the speed to fly the circle + virtual void setSpeed( f32 speed ) = 0; + + //! set the center of the cirlce to fly + virtual void setCenter( core::vector3df center ) = 0; + + //! get the radius of the circle + virtual const f32& getRadius() const = 0; + + //! get the speed to fly + virtual const f32& getSpeed() const = 0; + + //! get the center of the circle + virtual const core::vector3df& getCenter() const = 0; + }; + +} // end namespace scene +} // end namespace irr + +#endif // __I_SCENE_NODE_ANIMATOR_FLY_CIRCLE_H_INCLUDED__ + diff -Nauwr Irrlicht/include/ISceneNodeAnimatorFlyStraight.h Irrlicht/include/ISceneNodeAnimatorFlyStraight.h --- Irrlicht/include/ISceneNodeAnimatorFlyStraight.h 1970-01-01 01:00:00.000000000 +0100 +++ Irrlicht/include/ISceneNodeAnimatorFlyStraight.h 2005-09-27 15:58:16.000000000 +0200 @@ -0,0 +1,85 @@ +// Copyright (C) 2002-2005 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SCENE_NODE_ANIMATOR_FLY_STRAIGHT_H_INCLUDED__ +#define __I_SCENE_NODE_ANIMATOR_FLY_STRAIGHT_H_INCLUDED__ + +#include "ISceneNodeAnimator.h" + +namespace irr +{ +namespace scene +{ + //! Animates a scene node. Can animate position, rotation, material, and so on. + /** A scene node animator is able to animate a scene node in a very simple way. It may + change its position, rotation, scale and/or material. There are lots of animators + to choose from. You can create scene node animators with the ISceneManager interface. + */ + class ISceneNodeAnimatorFlyStraight : public ISceneNodeAnimator + { + public: + + //! destructor + virtual ~ISceneNodeAnimatorFlyStraight() {} + + //! set start point + virtual void setStart( core::vector3df start ) = 0; + + //! set end point + virtual void setEnd( core::vector3df end ) = 0; + + //! set vector + virtual void setVector( core::vector3df vector ) = 0; + + //! set waypoint length + virtual void setWayLength( f32 wayLength ) = 0; + + //! set time factor + virtual void setTimeFactor( f32 timeFactor ) = 0; + + //! set starttime + virtual void setStartTime( u32 startTime ) = 0; + + //! set endtime + virtual void setEndTime( u32 endTime ) = 0; + + //! set time for waypoint + virtual void setTimeForWay( u32 timeForWay ) = 0; + + //! set wheter or not to loop + virtual void setLoop( bool loop ) = 0; + + //! get start point + virtual const core::vector3df& getStart() const = 0; + + //! get end point + virtual const core::vector3df& getEnd() const = 0; + + //! get vector + virtual const core::vector3df& getVector() const = 0; + + //! get waypoint length + virtual const f32& getWayLength() const = 0; + + //! get time factor + virtual const f32& getTimeFactor() const = 0; + + //! get start time + virtual const u32& getStartTime() const = 0; + + //! get end time + virtual const u32& getEndTime() const = 0; + + //! get time for each way point + virtual const u32& getTimeForWay() const = 0; + + //! get whether or not this animation is looping + virtual const bool& getLoop() const = 0; + }; + +} // end namespace scene +} // end namespace irr + +#endif // __I_SCENE_NODE_ANIMATOR_FLY_STRAIGHT_H_INCLUDED__ + diff -Nauwr Irrlicht/include/ISceneNodeAnimatorFollowSpline.h Irrlicht/include/ISceneNodeAnimatorFollowSpline.h --- Irrlicht/include/ISceneNodeAnimatorFollowSpline.h 1970-01-01 01:00:00.000000000 +0100 +++ Irrlicht/include/ISceneNodeAnimatorFollowSpline.h 2005-09-27 16:19:40.000000000 +0200 @@ -0,0 +1,59 @@ +// Copyright (C) 2002-2005 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SCENE_NODE_ANIMATOR_FOLLOW_SPLINE_H_INCLUDED__ +#define __I_SCENE_NODE_ANIMATOR_FOLLOW_SPLINE_H_INCLUDED__ + +#include "ISceneNodeAnimator.h" +#include "irrArray.h" + +namespace irr +{ +namespace scene +{ + //! Animates a scene node. Can animate position, rotation, material, and so on. + /** A scene node animator is able to animate a scene node in a very simple way. It may + change its position, rotation, scale and/or material. There are lots of animators + to choose from. You can create scene node animators with the ISceneManager interface. + */ + class ISceneNodeAnimatorFollowSpline : public ISceneNodeAnimator + { + public: + + //! destructor + virtual ~ISceneNodeAnimatorFollowSpline() {} + + //! set a specific point in the Points list + virtual void setPoint( u32 index, core::vector3df point ) = 0; + + //! set a completely new point list + virtual void setPoints( core::array< core::vector3df > points ) = 0; + + //! set speed to traverse the points + virtual void setSpeed( f32 speed ) = 0; + + //! set tightness + virtual void setTightness( f32 tightness ) = 0; + + //! get a specific point + virtual const core::vector3df& getPoint( u32 index ) const = 0; + + //! get the array of points + virtual const core::array< core::vector3df >& getPoints() const = 0; + + //! get the speed that the spline is traversed + virtual const f32& getSpeed() const = 0; + + //! get the tightness + virtual const f32& getTightness() const = 0; + + //! get the number of points + virtual const u32& getNumPoints() const = 0; + }; + +} // end namespace scene +} // end namespace irr + +#endif // __I_SCENE_NODE_ANIMATOR_FOLLOW_SPLINE_H_INCLUDED__ + diff -Nauwr Irrlicht/include/ISceneNodeAnimatorRotation.h Irrlicht/include/ISceneNodeAnimatorRotation.h --- Irrlicht/include/ISceneNodeAnimatorRotation.h 1970-01-01 01:00:00.000000000 +0100 +++ Irrlicht/include/ISceneNodeAnimatorRotation.h 2005-09-27 16:20:14.000000000 +0200 @@ -0,0 +1,37 @@ +// Copyright (C) 2002-2005 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SCENE_NODE_ANIMATOR_ROTATION_H_INCLUDED__ +#define __I_SCENE_NODE_ANIMATOR_ROTATION_H_INCLUDED__ + +#include "ISceneNodeAnimator.h" + +namespace irr +{ +namespace scene +{ + //! Animates a scene node. Can animate position, rotation, material, and so on. + /** A scene node animator is able to animate a scene node in a very simple way. It may + change its position, rotation, scale and/or material. There are lots of animators + to choose from. You can create scene node animators with the ISceneManager interface. + */ + class ISceneNodeAnimatorRotation : public ISceneNodeAnimator + { + public: + + //! destructor + virtual ~ISceneNodeAnimatorRotation() {} + + //! set rotation + virtual void setRotation( core::vector3df rotation ) = 0; + + //! get rotation + virtual const core::vector3df& getRotation() const = 0; + }; + +} // end namespace scene +} // end namespace irr + +#endif // __I_SCENE_NODE_ANIMATOR_ROTATION_H_INCLUDED__ + diff -Nauwr Irrlicht/include/ISceneNodeAnimatorTexture.h Irrlicht/include/ISceneNodeAnimatorTexture.h --- Irrlicht/include/ISceneNodeAnimatorTexture.h 1970-01-01 01:00:00.000000000 +0100 +++ Irrlicht/include/ISceneNodeAnimatorTexture.h 2005-09-27 15:53:48.000000000 +0200 @@ -0,0 +1,45 @@ +// Copyright (C) 2002-2005 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __I_SCENE_NODE_ANIMATOR_TEXTURE_H_INCLUDED__ +#define __I_SCENE_NODE_ANIMATOR_TEXTURE_H_INCLUDED__ + +#include "ISceneNodeAnimator.h" +#include "ITexture.h" + +namespace irr +{ +namespace scene +{ + //! Animates a scene node. Can animate position, rotation, material, and so on. + /** A scene node animator is able to animate a scene node in a very simple way. It may + change its position, rotation, scale and/or material. There are lots of animators + to choose from. You can create scene node animators with the ISceneManager interface. + */ + class ISceneNodeAnimatorTexture : public ISceneNodeAnimator + { + public: + + //! destructor + virtual ~ISceneNodeAnimatorTexture() {} + + //! set a texture, this grabs the texture + virtual void setTexture( u32 index, video::ITexture* texture ) = 0; + + //! set timer per frame + virtual void setTimePerFrame( u32 timePerFrame ) = 0; + + //! get texture specified by index + virtual const video::ITexture* getTexture( u32 index ) = 0; + + //! get time per frame + virtual const u32& getTimePerFrame() const = 0; + + }; + +} // end namespace scene +} // end namespace irr + +#endif // __I_SCENE_NODE_ANIMATOR_TEXTURE_H_INCLUDED__ +