Commit 763acaa7 authored by hybrid's avatar hybrid

Merge revisions 1495:1497 from 1.4 branch. GUIImage fix by CuteAlien. Default...

Merge revisions 1495:1497 from 1.4 branch. GUIImage fix by CuteAlien. Default value changes in particle system and scene manager.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1498 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 9c33ae93
...@@ -10,8 +10,6 @@ Changes in version 1.5 (... 2008) ...@@ -10,8 +10,6 @@ Changes in version 1.5 (... 2008)
- Enable use of other meshes for shadow mesh generation, can be used to speed up shadow generation and rendering for complex meshes. Patch based on a version by tonic. - Enable use of other meshes for shadow mesh generation, can be used to speed up shadow generation and rendering for complex meshes. Patch based on a version by tonic.
- Fixed Software renderer color flicker, was a signed shift bug I believe.
- Fixed usage of SIrrCreationParameters struct, which dind't have copy constructor and assignment operator anymore, since the Irrlicht version string was made const. - Fixed usage of SIrrCreationParameters struct, which dind't have copy constructor and assignment operator anymore, since the Irrlicht version string was made const.
- New glext.h (version 40) - New glext.h (version 40)
...@@ -204,6 +202,10 @@ Changes in version 1.5 (... 2008) ...@@ -204,6 +202,10 @@ Changes in version 1.5 (... 2008)
------------------------------------------- -------------------------------------------
Changes in version 1.4.2 (x.x.2008) Changes in version 1.4.2 (x.x.2008)
- Fixed rounding problem in getScreenCoordinatesFrom3DPosition
- Fixed Software renderer color flicker, was a shift bug I believe.
- irrMap fix to make root node always black, by rogerborg. - irrMap fix to make root node always black, by rogerborg.
- Possible core dump fixed in particle system node, by CuteAlien. - Possible core dump fixed in particle system node, by CuteAlien.
......
...@@ -130,7 +130,7 @@ public: ...@@ -130,7 +130,7 @@ public:
it any more, see IReferenceCounted::drop() for more informations. */ it any more, see IReferenceCounted::drop() for more informations. */
virtual IParticleAnimatedMeshSceneNodeEmitter* createAnimatedMeshSceneNodeEmitter( virtual IParticleAnimatedMeshSceneNodeEmitter* createAnimatedMeshSceneNodeEmitter(
scene::IAnimatedMeshSceneNode* node, bool useNormalDirection = true, scene::IAnimatedMeshSceneNode* node, bool useNormalDirection = true,
const core::vector3df& direction = core::vector3df(0.0f,0.0f,0.0f), const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f),
f32 normalDirectionModifier = 100.0f, s32 mbNumber = -1, f32 normalDirectionModifier = 100.0f, s32 mbNumber = -1,
bool everyMeshVertex = false, bool everyMeshVertex = false,
u32 minParticlesPerSecond = 5, u32 maxParticlesPerSecond = 10, u32 minParticlesPerSecond = 5, u32 maxParticlesPerSecond = 10,
...@@ -200,7 +200,7 @@ public: ...@@ -200,7 +200,7 @@ public:
const core::vector3df& center, f32 radius, const core::vector3df& center, f32 radius,
const core::vector3df& normal, f32 length, const core::vector3df& normal, f32 length,
bool outlineOnly = false, bool outlineOnly = false,
const core::vector3df& direction = core::vector3df(0.0f,0.0f,0.0f), const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f),
u32 minParticlesPerSecond = 5, u32 maxParticlesPerSecond = 10, u32 minParticlesPerSecond = 5, u32 maxParticlesPerSecond = 10,
const video::SColor& minStartColor = video::SColor(255,0,0,0), const video::SColor& minStartColor = video::SColor(255,0,0,0),
const video::SColor& maxStartColor = video::SColor(255,255,255,255), const video::SColor& maxStartColor = video::SColor(255,255,255,255),
...@@ -246,7 +246,7 @@ public: ...@@ -246,7 +246,7 @@ public:
it any more, see IReferenceCounted::drop() for more informations. */ it any more, see IReferenceCounted::drop() for more informations. */
virtual IParticleMeshEmitter* createMeshEmitter( virtual IParticleMeshEmitter* createMeshEmitter(
scene::IMesh* mesh, bool useNormalDirection = true, scene::IMesh* mesh, bool useNormalDirection = true,
const core::vector3df& direction = core::vector3df(0.0f,0.0f,0.0f), const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f),
f32 normalDirectionModifier = 100.0f, s32 mbNumber = -1, f32 normalDirectionModifier = 100.0f, s32 mbNumber = -1,
bool everyMeshVertex = false, bool everyMeshVertex = false,
u32 minParticlesPerSecond = 5, u32 maxParticlesPerSecond = 10, u32 minParticlesPerSecond = 5, u32 maxParticlesPerSecond = 10,
......
...@@ -1015,9 +1015,10 @@ namespace scene ...@@ -1015,9 +1015,10 @@ namespace scene
and the animator will animate it. and the animator will animate it.
If you no longer need the animator, you should call ISceneNodeAnimator::drop(). If you no longer need the animator, you should call ISceneNodeAnimator::drop().
See IReferenceCounted::drop() for more information. */ See IReferenceCounted::drop() for more information. */
virtual ISceneNodeAnimator* createFlyCircleAnimator(const core::vector3df& center, virtual ISceneNodeAnimator* createFlyCircleAnimator(
f32 radius, f32 speed=0.001f, const core::vector3df& center=core::vector3df(0.f,0.f,0.f),
const core::vector3df& direction=core::vector3df ( 0.f, 1.f, 0.f ) ) = 0; f32 radius=100.f, f32 speed=0.001f,
const core::vector3df& direction=core::vector3df(0.f, 1.f, 0.f)) = 0;
//! Creates a fly straight animator, which lets the attached scene node fly or move along a line between two points. //! Creates a fly straight animator, which lets the attached scene node fly or move along a line between two points.
/** \param startPoint: Start point of the line. /** \param startPoint: Start point of the line.
......
...@@ -40,6 +40,9 @@ CGUIImage::~CGUIImage() ...@@ -40,6 +40,9 @@ CGUIImage::~CGUIImage()
//! sets an image //! sets an image
void CGUIImage::setImage(video::ITexture* image) void CGUIImage::setImage(video::ITexture* image)
{ {
if (image == Texture)
return;
if (Texture) if (Texture)
Texture->drop(); Texture->drop();
......
...@@ -60,7 +60,7 @@ public: ...@@ -60,7 +60,7 @@ public:
//! Creates a particle emitter for an animated mesh scene node //! Creates a particle emitter for an animated mesh scene node
virtual IParticleAnimatedMeshSceneNodeEmitter* createAnimatedMeshSceneNodeEmitter( virtual IParticleAnimatedMeshSceneNodeEmitter* createAnimatedMeshSceneNodeEmitter(
scene::IAnimatedMeshSceneNode* node, bool useNormalDirection = true, scene::IAnimatedMeshSceneNode* node, bool useNormalDirection = true,
const core::vector3df& direction = core::vector3df(0.0f,0.0f,0.0f), const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f),
f32 normalDirectionModifier = 100.0f, s32 mbNumber = -1, f32 normalDirectionModifier = 100.0f, s32 mbNumber = -1,
bool everyMeshVertex = false, u32 minParticlesPerSecond = 5, bool everyMeshVertex = false, u32 minParticlesPerSecond = 5,
u32 maxParticlesPerSecond = 10, u32 maxParticlesPerSecond = 10,
...@@ -84,7 +84,7 @@ public: ...@@ -84,7 +84,7 @@ public:
virtual IParticleCylinderEmitter* createCylinderEmitter( virtual IParticleCylinderEmitter* createCylinderEmitter(
const core::vector3df& center, f32 radius, const core::vector3df& center, f32 radius,
const core::vector3df& normal, f32 length, const core::vector3df& normal, f32 length,
bool outlineOnly = false, const core::vector3df& direction = core::vector3df(0.0f,0.0f,0.0f), bool outlineOnly = false, const core::vector3df& direction = core::vector3df(0.0f,0.5f,0.0f),
u32 minParticlesPerSecond = 5, u32 maxParticlesPersSecond = 10, u32 minParticlesPerSecond = 5, u32 maxParticlesPersSecond = 10,
const video::SColor& minStartColor = video::SColor(255,0,0,0), const video::SColor& minStartColor = video::SColor(255,0,0,0),
const video::SColor& maxStartColor = video::SColor(255,255,255,255), const video::SColor& maxStartColor = video::SColor(255,255,255,255),
...@@ -94,7 +94,7 @@ public: ...@@ -94,7 +94,7 @@ public:
//! Creates a mesh particle emitter. //! Creates a mesh particle emitter.
virtual IParticleMeshEmitter* createMeshEmitter( virtual IParticleMeshEmitter* createMeshEmitter(
scene::IMesh* mesh, bool useNormalDirection = true, scene::IMesh* mesh, bool useNormalDirection = true,
const core::vector3df& direction = core::vector3df(0.0f,0.0f,0.0f), const core::vector3df& direction = core::vector3df(0.0f,0.03f,0.0f),
f32 normalDirectionModifier = 100.0f, s32 mbNumber = -1, f32 normalDirectionModifier = 100.0f, s32 mbNumber = -1,
bool everyMeshVertex = false, bool everyMeshVertex = false,
u32 minParticlesPerSecond = 5, u32 minParticlesPerSecond = 5,
......
...@@ -1379,10 +1379,11 @@ ISceneNodeAnimator* CSceneManager::createRotationAnimator(const core::vector3df& ...@@ -1379,10 +1379,11 @@ ISceneNodeAnimator* CSceneManager::createRotationAnimator(const core::vector3df&
//! creates a fly circle animator, which lets the attached scene node fly around a center. //! creates a fly circle animator, which lets the attached scene node fly around a center.
ISceneNodeAnimator* CSceneManager::createFlyCircleAnimator( ISceneNodeAnimator* CSceneManager::createFlyCircleAnimator(
const core::vector3df& normal, f32 radius, f32 speed, const core::vector3df& center, f32 radius, f32 speed,
const core::vector3df& direction) const core::vector3df& direction)
{ {
ISceneNodeAnimator* anim = new CSceneNodeAnimatorFlyCircle(os::Timer::getTime(), normal, ISceneNodeAnimator* anim = new CSceneNodeAnimatorFlyCircle(
os::Timer::getTime(), center,
radius, speed, direction); radius, speed, direction);
return anim; return anim;
} }
......
...@@ -276,13 +276,16 @@ namespace scene ...@@ -276,13 +276,16 @@ namespace scene
//! and the animator will animate it. //! and the animator will animate it.
virtual ISceneNodeAnimator* createRotationAnimator(const core::vector3df& rotationPerSecond); virtual ISceneNodeAnimator* createRotationAnimator(const core::vector3df& rotationPerSecond);
//! creates a fly circle animator, which lets the attached scene node fly //! creates a fly circle animator
//! around a center. The center is the position of the scene node. /** Lets the attached scene node fly around a center.
//! \param rotationSpeed: \param center Center relative to node origin
//! \return Returns the animator. Attach it to a scene node with ISceneNode::addAnimator() \param speed rotation speed
//! and the animator will animate it. \return Animator. Attach it to a scene node with ISceneNode::addAnimator()
virtual ISceneNodeAnimator* createFlyCircleAnimator(const core::vector3df& normal, f32 radius, f32 speed, and the animator will animate it. */
const core::vector3df& direction); virtual ISceneNodeAnimator* createFlyCircleAnimator(
const core::vector3df& center=core::vector3df(0.f, 0.f, 0.f),
f32 radius=100.f, f32 speed=0.001f,
const core::vector3df& direction=core::vector3df(0.f, 1.f, 0.f));
//! Creates a fly straight animator, which lets the attached scene node //! Creates a fly straight animator, which lets the attached scene node
//! fly or move along a line between two points. //! fly or move along a line between two points.
......
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