package nape.phys
Body | Class representing a physics Rigid Body. |
BodyIterator | Haxe Iterator |
BodyList | Nape list of Body 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:Body = 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:Body = 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:Body = list.pop(); * // operate on object. * // ... * } * |
BodyType | Enumeration of rigid body types. |
Compound | Compound represents a grouping of physics objects into a single object.
* * Cmp1_ * / / \ \ * Body1 Body2--Joint Cmp2 * | | \ | * Shp1 Shp2 Body3 * | * Shp3 ** For example if you have a complex car built with several bodies and * constraints you might store this in a Compound providing an easy way * of removing/adding/copying the Car as well as being able to get a single * callback for when the car collides with something. * * When you add a compound to a Space, all of it's constituents get added * and furthermore, those constituents cannot be added seperately. |
CompoundIterator | Haxe Iterator |
CompoundList | Nape list of Compound 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:Compound = 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:Compound = 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:Compound = list.pop(); * // operate on object. * // ... * } * |
FluidProperties | FluidProperties providing shared parameters for fluid interaction. |
GravMassMode | Enumeration of GravMassMode values for a Body. |
InertiaMode | Enumeration of InertiaMode values for a Body. |
Interactor | |
InteractorIterator | Haxe Iterator |
InteractorList | Nape list of Interactor 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:Interactor = 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:Interactor = 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:Interactor = list.pop(); * // operate on object. * // ... * } * |
MassMode | Enumeration of MassMode values for a Body. |
Material | Material property providing physical attributes to a Shape. |