MAXScript Extensions > MAXScript Extensions for Particle Flow > Particle Flow Interfaces > Interfaces >

# Interface: test

The test Interface is exposed by all Test Classes.

Methods:

    <void><PFlowTest>.proceedStep1 <IObject>container <object>particleSystem <node>particleSystemNode <node>actionNode <Interface>integrator

<IObject>container - the current particle container. Can be accessed via the Interface: MaxscriptParticleContainer inside a hander using pCont.GetParticleContainer()

<object>particleSystem - the particle system that generates the particle stream.

Note

The same operator may get calls from different particle systems. If the result varies according to the particle system that generates particles, then this parameter defines which one to be used.

<node>particleSystemNode - Node of the particle system that generates the particles.

<node>actionNode - Node of the Test action.

<Interface>integrator - an operator to proceed particles according to "inertia" rules. The operator updates time, speed, position, spin, orientation channels on the basis of time, acceleration, speed, angular acceleration and spin channels. Each particle system has a default inertia operator. When an action wants to update the current time for particles, it uses the "inertia" operator. An Action in the ActionList stack may "switch" the suggested "inertia" operator by its own if the Action supports the "inertial" operator interface. The particle system recognizes such an Action as a holder of "inertia" interface, and uses it for "inertia" purposes later on. If the parameter is NULL then the particle system doesn't allow the test to advance particles in the time channel.

    <bool><PFlowTest>.proceedStep2 <time>timeStartTick <float>timeStartFraction <&time>timeEndTick <&float>timeEndFraction <&bitArray>testResult <&float array>testTime

    timeEndTick is In and Out parameter
    timeEndFraction is In and Out parameter
    testResult is In and Out parameter
    testTime is In and Out parameter

Returns true if the test has been proceeded successfully.

The proceedStep1 and proceedStep2 verify the test condition and may change particle channels. Particles that satisfy the condition may be advanced to the time of the condition satisfaction according to the inertia operator integrator .

<time>timeStartTick - The time for a particle to start the simulation. Each particle may have its own current valid time greater than timeStart. In this case the test should consider the current particle time and timeEnd parameter.

<float>timeStartFraction <&float>timeEndFraction - Float portion of the real TimeValue

<&bitArray>testResult - A bit array indicating which particles satisfy the test condition

<&float array>testTime - For particles that satisfy the condition, the list of time moments when a particle satisfies the condition. The tab has the same number of entries as particles in the container. The entry is set only for particles that satisfy the condition .

See Speed Operator in Script Operator Example for sample usage.

    <node><PFlowTest>.getNextActionList <node>testNode <*bool>linkActive

    linkActive is In and Out parameter

Returns the next Action List of the specified testNode. This is basically the ActionList (Event) wired to the Test. If a particle satisfies the test then it is directed to this Action List. Since a Test may have several instances with different next events, it is necessary to pass the TestNode as parameter.

Note For future use only. The parameter <*bool>linkActive is passed by NULL as default in the current release of Particle Flow.

EXAMPLE
    ev1_a11.GetNextActionList ev1_a11 false

For a complete example, see VolumeDocking Sample Script.

    <bool><PFlowTest>.setNextActionList <node>actionList <node>testNode

Wires the specified testNode to the supplied actionList node. Returns true on success. The next actionList node can be rejected if it is not a real actionList.

    <bool><PFlowTest>.clearNextActionList <node>testNode

Disconnects the specified testNode from its Action List.

    <bool><PFlowTest>.setLinkActive <bool>linkActive <node>testNode

Will set the Active status of the Link to the supplied boolean value for the specified testNode. Returns true on success.

Note For future use only. Currently it can be used only to test if the Test Action has a link.

EXAMPLE
    ev1_a11.setLinkActive true ev1_a11

For a complete example, see VolumeDocking Sample Script.

This Interface is available in:

Age_Test : Helper Collision : Helper Collision_Spawn : Helper Copy_Out : Helper Data_Test : Helper | Find_Target : Helper Go_To_Rotation : Helper mP_Collision : Helper mP_Glue : Helper mP_InterCollision : Helper | mP_World : Helper Scale_Test : Helper Script_Test : Helper Send_Out : Helper Spawn : Helper | speed : Helper Split_Amount : Helper Split_Selected : Helper Split_Source : Helper

#### See Also

- Particle Flow Interfaces

- Speed Operator in Script Operator Example

- VolumeDocking Sample Script