1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"[]> 2<html xml:lang="en-US" lang="en-US"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 6 <link rel="stylesheet" href="../../../css/document.css" type="text/css" /> 7 <title>Graphix Library (gfx) Sample Demos</title> 8 </head> 9 <body> 10 <h1>ParticleChokeDemo</h1> 11 <div class="section"><img src="images/ParticleChokeDemo.png" border="0" width="400" height="240" /></div> 12 <h2>Overview</h2> 13 <p>This demo includes termination of particle emissions. This demo uses the demo library, <a href="../../../nw/demo/ParticleEffect/Overview.html">demo::ParticleEffect</a> class, and <a href="../../../nw/demo/ParticleNode/Overview.html">demo::ParticleNode</a> class.<br /> 14 </p> 15 <h2>How to Use</h2> 16 <p> 17 <ul> 18 <li>Demo-specific operations</li> 19 <ul> 20 <li>R Button: Re-initialize effect and play</li> 21 </ul> 22 <li>Common Operations</li> 23 <ul> 24 <li>Slide pad: Rotate the camera</li> 25 <li>Slide pad + A Button: Move the camera back and forth</li> 26 <li>Slide pad + B Button: Move the camera in parallel</li> 27 <li>Slide pad + Y Button: Move the camera up and down</li> 28 <li>X Button: Reset the camera position</li> 29 <li>START Button: Restart the demo.</li> 30 </ul> 31 </ul> 32 </p> 33 <h2>Description</h2> 34 <p> 35 This demo detects the end of effect playback and and detaches the effect from the scene node after playback ends. Since the effect is always detached after playback ends, be sure to omit the cost of scene operations, for example. Within demo code, effect termination notification is performed using the IsDone() method in the ParticleNode class. In the IsDone() method, termination is determined while taking into account the number of particles and termination of emitter emissions, to be introduced below. 36 </p> 37 <h2>Checking that Particles Exist</h2> 38 <p>After emissions end, the method given here can be used to check if particles exist. This can be determined as follows. For <a href="../../../nw/gfx/ParticleModel/Overview.html">nw::gfx::ParticleModel</a>* particleModel, 39 </p> 40 <pre> 41 if (particleModel->HasParticle()) 42 { 43 // Processing when particles exist 44 }</pre> 45 46 <p> When determining that a chain expression of particles has ended, use of this API only may make the wrong determination if the emitter is emitting particles intermittently. Be sure to check in conjunction with termination of particle emission by the emitter. 47 </p> 48 <div> 49 <h2>Checking that Emitter Emission Has Ended</h2> 50 </div> 51 <p>The method given here is used to check if the emitter's emission time has completed.<br /> To do this, use <a href="../../../nw/gfx/ParticleEmitter/IsAlive.html">ParticleEmitter::IsAlive<a href="../../../nw/gfx/ParticleEmitter/IsAlive.html">. <a href="../../../nw/gfx/ParticleEmitter/IsAlive.html">ParticleEmitter::IsAlive</a> checks the time given by <a href="../../../nw/anim/AnimFrameController/Overview.html">AnimFrameController</a> for the emitter, and returns false if the emission time has ended. <br /> If an unlimited lifespan is set, the function always returns true as long as the resource is enabled. Specifically, emission is taken to have ended if any of the following conditions are satisfied. 52 </p> 53 <ul> 54 <li>The resource is enabled.</li> 55 <li>The emission volume is 0.</li> 56 <li>The automatic connection process is complete.</li> 57 </ul> 58 <hr><p>CONFIDENTIAL</p></body> 59</html> 60