From Marco Jez, updates to osgParticle, with integration of changes from Tom
Jolly.
This commit is contained in:
@@ -102,6 +102,15 @@ namespace osgParticle
|
||||
/// Get the reset time of this processor.
|
||||
inline double getResetTime() const;
|
||||
|
||||
/**
|
||||
Check whether the processor is alive with respect to start time and
|
||||
life duration. Note that this method may return true even if the
|
||||
processor has been disabled by calling setEnabled(false). To test
|
||||
whether the processor is actually processing particles or not, you
|
||||
should evaluate (isEnabled() && isAlive()).
|
||||
*/
|
||||
inline bool isAlive() const;
|
||||
|
||||
void traverse(osg::NodeVisitor &nv);
|
||||
|
||||
/// Get the current local-to-world transformation matrix (valid only during cull traversal).
|
||||
@@ -289,6 +298,11 @@ namespace osgParticle
|
||||
return getWorldToLocalMatrix().preMult(P) -
|
||||
getWorldToLocalMatrix().preMult(osg::Vec3(0, 0, 0));
|
||||
}
|
||||
|
||||
inline bool ParticleProcessor::isAlive() const
|
||||
{
|
||||
return currentTime_ < (lifeTime_ + startTime_);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user