Added default parameter for setParticlesAreGlobal. Code cleaning in other files.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1451 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
8099c45b64
commit
a5654c661f
|
@ -169,12 +169,12 @@ namespace scene
|
|||
: Name ( name ) {}
|
||||
|
||||
// construct from a matrix
|
||||
SMD3QuaterionTag ( const core::stringc& name, const core::matrix4 &m )
|
||||
{
|
||||
Name = name;
|
||||
position = m.getTranslation ();
|
||||
rotation = m;
|
||||
}
|
||||
SMD3QuaterionTag ( const core::stringc& name, const core::matrix4 &m ) : Name(name), position(m.getTranslation()), rotation(m)
|
||||
{ }
|
||||
|
||||
// construct from a position and euler angles in degrees
|
||||
SMD3QuaterionTag ( const core::vector3df &pos, const core::vector3df &angle ) : position(pos), rotation(angle * core::DEGTORAD)
|
||||
{ }
|
||||
|
||||
// set to matrix
|
||||
void setto ( core::matrix4 &m )
|
||||
|
@ -183,13 +183,6 @@ namespace scene
|
|||
m.setTranslation ( position );
|
||||
}
|
||||
|
||||
// construct from a position and euler angles in degrees
|
||||
SMD3QuaterionTag ( const core::vector3df &pos, const core::vector3df &angle )
|
||||
{
|
||||
position = pos;
|
||||
rotation.set ( angle * core::DEGTORAD );
|
||||
}
|
||||
|
||||
bool operator == ( const SMD3QuaterionTag &other ) const
|
||||
{
|
||||
return Name == other.Name;
|
||||
|
@ -217,7 +210,12 @@ namespace scene
|
|||
return Container.size();
|
||||
}
|
||||
|
||||
SMD3QuaterionTag& operator[] (u32 index )
|
||||
const SMD3QuaterionTag& operator[](u32 index) const
|
||||
{
|
||||
return Container[index];
|
||||
}
|
||||
|
||||
SMD3QuaterionTag& operator[](u32 index)
|
||||
{
|
||||
return Container[index];
|
||||
}
|
||||
|
|
|
@ -536,6 +536,3 @@ public:
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -25,8 +25,8 @@ namespace scene
|
|||
|
||||
//! A particle system scene node for creating snow, fire, exlosions, smoke...
|
||||
/** A scene node controlling a particle System. The behavior of the particles
|
||||
can be controlling by setting the right particle emitters and effectors.
|
||||
You can for example easily a campfire by doing this:
|
||||
can be controlled by setting the right particle emitters and affectors.
|
||||
You can for example easily create a campfire by doing this:
|
||||
|
||||
\code
|
||||
scene::IParticleSystemSceneNode* p = scenemgr->addParticleSystemSceneNode();
|
||||
|
@ -59,14 +59,14 @@ public:
|
|||
const core::dimension2d<f32> &size = core::dimension2d<f32>(5.0f, 5.0f)) = 0;
|
||||
|
||||
//! Sets if the particles should be global.
|
||||
/** If it is, the particles are affected by the movement of the
|
||||
/** If they are, the particles are affected by the movement of the
|
||||
particle system scene node too, otherwise they completely ignore it.
|
||||
Default is true. */
|
||||
virtual void setParticlesAreGlobal(bool global) = 0;
|
||||
virtual void setParticlesAreGlobal(bool global=true) = 0;
|
||||
|
||||
//! Sets the particle emitter, which creates the particles.
|
||||
/** A particle emitter can be created using one of the methods. For
|
||||
example to create and use a simple PointEmitter, call
|
||||
/** A particle emitter can be created using one of the createEmitter
|
||||
methods. For example to create and use a simple PointEmitter, call
|
||||
IParticleEmitter* p = createPointEmitter(); setEmitter(p); p->drop();
|
||||
\param emitter: Sets the particle emitter. You can set this to 0 for
|
||||
removing the current emitter and stopping the particle system emitting
|
||||
|
@ -82,7 +82,7 @@ public:
|
|||
addAffector(p);
|
||||
p->drop();
|
||||
\endcode
|
||||
Please note that a affector is not necessary for the particle system to
|
||||
Please note that an affector is not necessary for the particle system to
|
||||
work.
|
||||
\param affector: New affector. */
|
||||
virtual void addAffector(IParticleAffector* affector) = 0;
|
||||
|
|
|
@ -157,8 +157,6 @@ namespace scene
|
|||
core::vector3df Animatedscale;
|
||||
core::quaternion Animatedrotation;
|
||||
|
||||
|
||||
|
||||
core::matrix4 GlobalInversedMatrix; //the x format pre-calculates this
|
||||
|
||||
private:
|
||||
|
@ -192,21 +190,16 @@ namespace scene
|
|||
//! loaders should call this after populating the mesh
|
||||
virtual void finalize() = 0;
|
||||
|
||||
|
||||
virtual SSkinMeshBuffer *createBuffer() = 0;
|
||||
|
||||
virtual SJoint *createJoint(SJoint *parent=0) = 0;
|
||||
virtual SWeight *createWeight(SJoint *joint) = 0;
|
||||
|
||||
virtual SPositionKey *createPositionKey(SJoint *joint) = 0;
|
||||
virtual SScaleKey *createScaleKey(SJoint *joint) = 0;
|
||||
virtual SRotationKey *createRotationKey(SJoint *joint) = 0;
|
||||
|
||||
virtual SWeight *createWeight(SJoint *joint) = 0;
|
||||
|
||||
|
||||
virtual bool isStatic()=0;
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // end namespace scene
|
||||
|
|
|
@ -165,7 +165,7 @@ public:
|
|||
//! Sets if the particles should be global. If they are, the particles are affected by
|
||||
//! the movement of the particle system scene node too, otherwise they completely
|
||||
//! ignore it. Default is true.
|
||||
virtual void setParticlesAreGlobal(bool global);
|
||||
virtual void setParticlesAreGlobal(bool global=true);
|
||||
|
||||
//! Writes attributes of the scene node.
|
||||
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const;
|
||||
|
|
Loading…
Reference in New Issue