package nape.callbacks
BodyCallback | Callback object for Body type events.
* |
BodyListener | Event listener for Body type events.
* |
Callback | Base type for Callback event objects.
* |
CbEvent | Enumeration of possible callback event types. |
CbType | Callback Type applied to Interactors and Constraints.
* |
CbTypeIterator | Haxe Iterator |
CbTypeList | Nape list of CbType type objects
* * list.foreach(function (obj) { * }); ** This method is inlined so that in haxe no closure will need to be created. * * In AS3, a closure would need to be created in general, so for performance * reasons you 'may' choose to use iteration as follows: * * for (var i:int = 0; i < list.length; i++) { * var obj:CbType = list.at(i); * } ** * NOTE: It is 'not' safe to modify a list whilst iterating over it. * If you wish to remove elements during an iteration you should use the * filter method, for example: * * list.filter(function (obj) { * // operate on object. * // ... * return (false if you want object to be removed); * }); ** * In AS3, if you wish to avoid a closure generation, you can perform such * an iteration in a safe manner as follows: * * var i:int = 0; * while (i < list.length) { * var obj:CbType = list.at(i); * // operate on object. * // ... * if (should remove obj) { * list.remove(obj); * continue; * } * else i++; * } ** Or if you are always clearing the list entirely you could write: * * while (!list.empty()) { * var obj:CbType = list.pop(); * // operate on object. * // ... * } * |
ConstraintCallback | Callback object for Constraint type events.
* |
ConstraintListener | Event listener for Constraint type events.
* |
InteractionCallback | Callback object for Interaction type events.
* |
InteractionListener | Event listener for Interaction type events.
* * _Space * / \ * Cmp1 Cmp3 * / \ | * Body1 Cmp2 Body3 * | | | * Shp1 Body2 Shp3 * | * Shp2 ** The possible interactor pairs for callbacks are formed by finding the most * recent common ancestor in the world for the given pair of shapes and taking all * possible pairings. In the above situation we have: * * MRCA(Shp1, Shp2) = Cmp1 --> Possible pairings = [Shp1, Body1] x [Shp2, Body2, Cmp2] * MRCA(Shp1, Shp3) = Space --> Possible pairings = [Shp1, Body1, Cmp1] x [Shp3, Body3, Cmp3] * MRCA(Shp2, Shp3) = Space --> Possible pairings = [Shp2, Body2, Cmp2, Cmp1] x [Shp3, Body3, Cmp3] ** Of course, not all of these pairings will generate callbacks, only those for which * a valid listener exists for the event type, and for the cbtypes of each interactor. * * Furthermore, the listener specifies an interaction type which works even in mixed * cases where many types of interaction between two objects is happening at once. |
InteractionType | Enumeration of Interaction types. |
Listener | Base type for all Nape callback listeners. |
ListenerIterator | Haxe Iterator |
ListenerList | Nape list of Listener type objects
* * list.foreach(function (obj) { * }); ** This method is inlined so that in haxe no closure will need to be created. * * In AS3, a closure would need to be created in general, so for performance * reasons you 'may' choose to use iteration as follows: * * for (var i:int = 0; i < list.length; i++) { * var obj:Listener = list.at(i); * } ** * NOTE: It is 'not' safe to modify a list whilst iterating over it. * If you wish to remove elements during an iteration you should use the * filter method, for example: * * list.filter(function (obj) { * // operate on object. * // ... * return (false if you want object to be removed); * }); ** * In AS3, if you wish to avoid a closure generation, you can perform such * an iteration in a safe manner as follows: * * var i:int = 0; * while (i < list.length) { * var obj:Listener = list.at(i); * // operate on object. * // ... * if (should remove obj) { * list.remove(obj); * continue; * } * else i++; * } ** Or if you are always clearing the list entirely you could write: * * while (!list.empty()) { * var obj:Listener = list.pop(); * // operate on object. * // ... * } * |
ListenerType | Enumeration of Listener types. |
OptionType | OptionType representing matching behaviour for Listeners.
* * option = new OptionType([A, B], [C, D]); * obj.cbTypes = [] // => does not match option. * obj.cbTypes = [A] // => matches the option * obj.cbTypes = [A, C] // => does not match option. ** The optionType's includes and excludes list are managed to be always * disjoint: The action of including an already excluded type serves to * remove it from the excludes list, equalliy excluding an already included * type serves to remove it from the includes list. * * var option = new OptionType(); * option.including(A); // option = {[A]:[]} * option.excluding(A); // option = {[]:[]} * option.excluding(A); // option = {[]:[A]} * option.including(A); // option = {[A]:[]} * |
PreCallback | Callback object for Pre-Interaction type events.
* |
PreFlag | Enumeration of interaction states for arbiters. These values are returned * by PreListener callback handlers. |
PreListener | Event listener for Pre-Interaction type events.
* |