package nape.callbacks

BodyCallback

Callback object for Body type events. *

* This, like all other callback objects are automatically reused * and you should not keep any reference to them.

BodyListener

Event listener for Body type events. *

* The events that can be caught are WAKE and SLEEP type events. * Theses listeners will only operate on Bodys, not Interactors in general.

Callback

Base type for Callback event objects. *

* Callback objects are automatically reused and you should not keep references * to them.

CbEvent

Enumeration of possible callback event types.

CbType

Callback Type applied to Interactors and Constraints. *

* Callback types are ranged over by listeners.

CbTypeIterator

Haxe Iterator compatible iterator over Nape list.

CbTypeList

Nape list of CbType type objects *

* Internally this list is at present implemented as a linked list with * object pooled nodes and iterators with various fast paths made for * standard access patterns (For instance accessing successive elements * runs in constant time when using random access functions) *

* Iteration of this list can be done in various ways, but the preferred * way on all targets, is through use of the foreach function: *

 * 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. *

* This, like all other callback objects are automatically reused * and you should not keep any reference to them.

ConstraintListener

Event listener for Constraint type events. *

* The events that can be caught are WAKE, SLEEP and BREAK type events. * Theses listeners will only operate on Constraints.

InteractionCallback

Callback object for Interaction type events. *

* This, like all other callback objects are automatically reused * and you should not keep any reference to them.

InteractionListener

Event listener for Interaction type events. *

* Interaction type events can occur between any two Interactors (whether they * be Shapes, Bodys, Compounds or a mix thereof). *

* The events that can be caught are BEGIN, ONGOING, and END type events. * Theses listeners will operate between pairs of Interactors. *

 *          _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 compatible iterator over Nape list.

ListenerList

Nape list of Listener type objects *

* Internally this list is at present implemented as a linked list with * object pooled nodes and iterators with various fast paths made for * standard access patterns (For instance accessing successive elements * runs in constant time when using random access functions) *

* Iteration of this list can be done in various ways, but the preferred * way on all targets, is through use of the foreach function: *

 * 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. *

* An object's set of CbType's 'matches' against an OptionType iff. * the OptionType's includes list intersects the object's set of CbTypes * and the OptionType's excludes list 'does not' intersect the object's set * of CbTypes. *

 * 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. *

* This, like all other callback objects are automatically reused * and you should not keep any reference to them.

PreFlag

Enumeration of interaction states for arbiters. These values are returned * by PreListener callback handlers.

PreListener

Event listener for Pre-Interaction type events. *

* Pre-Interaction type events can occur between any two Interactors (whether they * be Shapes, Bodys, Compounds or a mix thereof).