package nape.geom
AABB | Axis Aligned Bounding Box (AABB)
* |
ConvexResult | Class representing the results of a convex cast operation.
* |
ConvexResultIterator | Haxe Iterator |
ConvexResultList | Nape list of ConvexResult 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:ConvexResult = 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:ConvexResult = 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:ConvexResult = list.pop(); * // operate on object. * // ... * } * |
Geom | Geom class provides interface to collision detection routines in nape. |
GeomPoly | Polygon class with various geometric methods
* |
GeomPolyIterator | Haxe Iterator |
GeomPolyList | Nape list of GeomPoly 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:GeomPoly = 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:GeomPoly = 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:GeomPoly = list.pop(); * // operate on object. * // ... * } * |
GeomVertexIterator | Haxe compatible iterator over vertices of GeomPoly.
* |
IsoFunction | For 'flash' targets only.
* |
IsoFunctionDef | Typedef defining iso-function type for MarchingSquares.
* |
MarchingSquares | Iso-surface extraction into polygons.
* * function (x, y) { * var ix = if (x < 0) 0 else if (x >= bitmap.width - 1) bitmap.width - 2 else Std.int(x); * var iy = if (y < 0) 0 else if (y >= bitmap.height - 1) bitmap.height - 2 else Std.int(y); * var fx = x - ix; * var fy = y - iy; * var gx = 1 - fx; * var gy = 1 - fy; * var a00 = bitmap.getPixel32(ix, iy) >>> 24; * var a01 = bitmap.getPixel32(ix, iy + 1) >>> 24; * var a10 = bitmap.getPixel32(ix + 1, iy) >>> 24; * var a11 = bitmap.getPixel32(ix + 1, iy + 1) >>> 24; * return 0x80 - (gxgya00 + fxgya10 + gxfya01 + fxfy*a11); * } ** For 'flash', we must wrap this in an IsoFunction interface to be used * by MarchingSquares for performance reasons: * * class BitmapIsoFunction implements nape.geom.IsoFunction { * public function iso(x:Float, y:Float):Float { * ... * } * } ** This function is converted into a set of polygons by sampling along regular * grid points, and then recursively interpolating along cell edges based on * the function provided to find the point in space along that edge where the * function is approximately 0. * * From this we generate polygons in each grid cell, which are then by default * combined into larger, weakly simply polygons suitable for use in the * decomposition routines of GeomPoly like convexDecomposition! * * The runtime of the algorithm is O(N+K) for N number of cells and K number * of output vertices (A final pass is made to remove unnecessary vertices). |
Mat23 | 2D Matrix class representing affine transformations: * * [ a b tx ] * [ c d ty ] * [ 0 0 1 ] ** * Note that in AS3, flash.geom.Matrix has 'b' and 'c' swapped! so if you are * converting between flash.geom.Matrix and nape.geom.Mat23 you should use the * methods provided to avoid any mistakes with this. |
MatMN | A general MxN dimensional matrix.
* |
Ray | Parametrically defined ray used in ray casting functions. |
RayResult | Class representing the results of a ray cast operation.
* |
RayResultIterator | Haxe Iterator |
RayResultList | Nape list of RayResult 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:RayResult = 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:RayResult = 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:RayResult = list.pop(); * // operate on object. * // ... * } * |
Vec2 | 2 Dimensional vector.
* * var vertices = Polygon.box(20, 20, true); * var polygon = new Polygon(vertices); ** In this example, passing true to the Polygon.box method means
* that we will be returned a Vec2List containing only 'weak' Vec2s. Upon
* passing this Vec2List to the Polygon constructor, all of the Vec2s from
* that list will be automatically disposed. |
Vec2Iterator | Haxe Iterator |
Vec2List | Nape list of Vec2 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:Vec2 = 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:Vec2 = 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:Vec2 = list.pop(); * // operate on object. * // ... * } * |
Vec3 | A 3 dimensional vector object.
* |
Winding | Enumeration represents the winding of a Polygon.
* |