Home | Trees | Indices | Help |
|
---|
|
|
|||
b2PickleError | |||
b2Version Version numbering scheme. |
|||
b2Vec2 A 2D column vector. |
|||
b2Vec3 A 2D column vector with 3 elements. |
|||
b2Mat22 A 2-by-2 matrix. |
|||
b2Mat33 A 3-by-3 matrix. |
|||
b2XForm A transform contains translation and rotation. |
|||
b2Sweep This describes the motion of a body/shape for TOI computation. |
|||
b2Jacobian Proxy of C++ b2Jacobian class |
|||
b2JointEdge A joint edge is used to connect bodies and joints together in a joint graph where each body is a node and each joint is an edge. |
|||
b2JointDef Joint definitions are used to construct joints. |
|||
b2Joint The base joint class. |
|||
b2ContactID Proxy of C++ b2ContactID class |
|||
b2ContactID_features Proxy of C++ b2ContactID_features class |
|||
b2ManifoldPoint A manifold point is a contact point belonging to a contact manifold. |
|||
b2Manifold A manifold for two touching convex shapes. |
|||
b2Segment A line segment. |
|||
b2AABB An axis aligned bounding box. |
|||
b2OBB An oriented bounding box. |
|||
b2MassData This holds the mass data computed for a shape. |
|||
b2FilterData This holds contact filtering data. |
|||
b2ShapeDef A shape definition is used to construct a shape. |
|||
b2Shape A shape is used for collision detection. |
|||
b2CircleDef This structure is used to build circle shapes. |
|||
b2CircleShape A circle shape. |
|||
b2PolygonDef Convex polygon. |
|||
b2PolygonShape A convex polygon. |
|||
b2EdgeChainDef This structure is used to build edge shapes. |
|||
b2EdgeShape The edge shape. |
|||
b2Pair Proxy of C++ b2Pair class |
|||
b2BufferedPair Proxy of C++ b2BufferedPair class |
|||
b2PairCallback Proxy of C++ b2PairCallback class |
|||
b2PairManager Proxy of C++ b2PairManager class |
|||
b2Bound Proxy of C++ b2Bound class |
|||
b2Proxy Proxy of C++ b2Proxy class |
|||
b2BroadPhase Proxy of C++ b2BroadPhase class |
|||
b2DestructionListener Joints and shapes are destroyed when their associated body is destroyed. |
|||
b2BoundaryListener This is called when a body's shape passes outside of the world boundary. |
|||
b2ContactFilter Implement this class to provide collision filtering. |
|||
b2ContactListener Implement this class to get collision results. |
|||
b2Color Color for debug drawing. |
|||
b2DebugDraw Implement and register this class with a b2Worldto provide debug drawing of physics entities in your game. |
|||
b2BlockAllocator Proxy of C++ b2BlockAllocator class |
|||
b2StackEntry Proxy of C++ b2StackEntry class |
|||
b2StackAllocator Proxy of C++ b2StackAllocator class |
|||
b2ContactRegister Proxy of C++ b2ContactRegister class |
|||
b2ContactEdge A contact edge is used to connect bodies and contacts together in a contact graph where each body is a node and each contact is an edge. |
|||
b2ContactPoint This structure is used to report contact points. |
|||
b2ContactResult This structure is used to report contact point results. |
|||
b2Contact The class manages contact between two shapes. |
|||
b2NullContact Proxy of C++ b2NullContact class |
|||
b2ContactManager Proxy of C++ b2ContactManager class |
|||
b2TimeStep Proxy of C++ b2TimeStep class |
|||
b2World The world class manages all physics entities, dynamic simulation, and asynchronous queries. |
|||
b2ControllerEdge A controller edge is used to connect bodies and controllers together in a bipartite graph. |
|||
b2Controller Base class for controllers. |
|||
b2ControllerDef Proxy of C++ b2ControllerDef class |
|||
b2BodyDef A body definition holds all the data needed to construct a rigid body. |
|||
b2Body A rigid body. |
|||
b2BuoyancyController Calculates buoyancy forces for fluids in the form of a half plane. |
|||
b2BuoyancyControllerDef This class is used to build buoyancy controllers. |
|||
b2ConstantAccelController Applies a force every frame. |
|||
b2ConstantAccelControllerDef This class is used to build constant acceleration controllers. |
|||
b2ConstantForceController Applies a force every frame. |
|||
b2ConstantForceControllerDef This class is used to build constant force controllers. |
|||
b2GravityController Applies simplified gravity between every pair of bodies. |
|||
b2GravityControllerDef This class is used to build gravity controllers. |
|||
b2TensorDampingController Applies top down linear damping to the controlled bodies The damping is calculated by multiplying velocity by a matrix in local co-ordinates. |
|||
b2TensorDampingControllerDef This class is used to build tensor damping controllers. |
|||
b2DistanceJointDef Distance joint definition. |
|||
b2DistanceJoint A distance joint constrains two points on two bodies to remain at a fixed distance from each other. |
|||
b2GearJointDef Gear joint definition. |
|||
b2GearJoint A gear joint is used to connect two joints together. |
|||
b2LineJointDef Line joint definition. |
|||
b2LineJoint A line joint. |
|||
b2MouseJointDef Mouse joint definition. |
|||
b2MouseJoint A mouse joint is used to make a point on a body track a specified world point. |
|||
b2PrismaticJointDef Prismatic joint definition. |
|||
b2PrismaticJoint A prismatic joint. |
|||
b2PulleyJointDef Pulley joint definition. |
|||
b2PulleyJoint The pulley joint is connected to two bodies and two fixed ground points. |
|||
b2RevoluteJointDef Revolute joint definition. |
|||
b2RevoluteJoint A revolute joint constrains to bodies to share a common point while they are free to rotate about the point. |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
float32 |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
_newclass = 1
|
|||
cvar = <Swig global variables>
|
|||
b2_pi = 3.14159274101
|
|||
b2_maxManifoldPoints = 2
|
|||
b2_maxPolygonVertices = 16
|
|||
b2_maxProxies = 1024
|
|||
b2_maxPairs = 8192
|
|||
b2_linearSlop = 0.00499999988824
|
|||
b2_angularSlop = 0.0349065884948
|
|||
b2_toiSlop = 0.0399999991059
|
|||
b2_maxTOIContactsPerIsland = 32
|
|||
b2_maxTOIJointsPerIsland = 32
|
|||
b2_velocityThreshold = 1.0
|
|||
b2_maxLinearCorrection = 0.20000000298
|
|||
b2_maxAngularCorrection = 0.139626353979
|
|||
b2_maxLinearVelocity = 200.0
|
|||
b2_maxLinearVelocitySquared = 40000.0
|
|||
b2_maxAngularVelocity = 250.0
|
|||
b2_maxAngularVelocitySquared = 62500.0
|
|||
b2_contactBaumgarte = 0.20000000298
|
|||
b2_timeToSleep = 0.5
|
|||
b2_linearSleepTolerance = 0.00999999977648
|
|||
b2_angularSleepTolerance = 0.0111111113802
|
|||
e_unknownJoint = 0
|
|||
e_revoluteJoint = 1
|
|||
e_prismaticJoint = 2
|
|||
e_distanceJoint = 3
|
|||
e_pulleyJoint = 4
|
|||
e_mouseJoint = 5
|
|||
e_gearJoint = 6
|
|||
e_lineJoint = 7
|
|||
e_inactiveLimit = 0
|
|||
e_atLowerLimit = 1
|
|||
e_atUpperLimit = 2
|
|||
e_equalLimits = 3
|
|||
b2Vec2_zero = b2Vec2(0,0)
|
|||
b2Mat22_identity = b2Mat
|
|||
b2XForm_identity = b2XFo
|
|||
RAND_LIMIT = 32767
|
|||
B2_FLT_EPSILON = 1.192092896e-07
|
|||
FLT_EPSILON = 1.192092896e-07
|
|||
B2_FLT_MAX = 3.402823466e+38
|
|||
cvars =
|
|||
b2_nullFeature = 255
|
|||
e_unknownShape = -1
|
|||
e_circleShape = 0
|
|||
e_polygonShape = 1
|
|||
e_edgeShape = 2
|
|||
e_shapeTypeCount = 3
|
|||
e_startsInsideCollide = -1
|
|||
e_missCollide = 0
|
|||
e_hitCollide = 1
|
|||
b2_nullPair = 65535
|
|||
b2_nullProxy = 65535
|
|||
b2_tableCapacity = 8192
|
|||
b2_tableMask = 8191
|
|||
b2_invalid = 65535
|
|||
b2_nullEdge = 65535
|
|||
b2_chunkSize = 4096
|
|||
b2_maxBlockSize = 640
|
|||
b2_blockSizes = 14
|
|||
b2_chunkArrayIncrement = 128
|
|||
b2_stackSize = 102400
|
|||
b2_maxStackEntries = 32
|
|||
e_unknownController = -1
|
|||
e_buoyancyController = 0
|
|||
e_constantAccelController = 1
|
|||
e_constantForceController = 2
|
|||
e_gravityController = 3
|
|||
e_tensorDampingController = 4
|
|||
b2_minPulleyLength = 2.0
|
|||
__package__ =
|
|
Fixes: b2Body, b2Shape, b2Joint, b2Controller In place of an unpicklable b2Body outside of a world, use a dictionary with an index to the appropriate place in the world. |
Fix variables so that they may be pickled (or loaded from a pickled state). You cannot save a b2Body by itself, but if passed in with the world, it's possible to pickle it. So, be sure to use this on your box2d-related variables before and after pickling. e.g., + Save: my_pickled_vars = box2d.pickle_fix(myworld, my_vars, 'save') pickle.dump([myworld, my_pickled_vars], open(fn, 'wb')) + Load world, my_pickled_vars = pickle.load(open(fn, 'rb')) myworld = world._pickle_finalize() my_vars=box2d.pickle_fix(myworld, my_pickled_vars, 'load') For an actual implementation of pickling, see the testbed (main test and test_pickle). |
Returns a dictionary representation of self, with dict(var=value [, ...]) additional_ignore can be specified to ignore certain properties. |
Finalize a controller. It's mostly standard, just requires a custom bodyList. |
Finalize a joint. The bodies and joints need to be retrieved from the world list in order to make the joint. |
Finalize the shape list for a body. Only reason this has to be implemented separately is because of the way edge chains are implemented. |
Everything is essentially generic_getstate, except for edge shape handling. TODO: I can see a possible issue in this if joints are used on an edge shape or a body with edge shapes and other shapes. The shape list order could be improperly recreated. We'll see if anything happens... |
b2Alloc(int32 size) -> void Implement this function to use your own memory allocator. |
b2Free(void mem) If you implement b2Alloc, you should also implement this function. |
b2MixFriction(float32 friction1, float32 friction2) -> float32 Friction mixing law. Feel free to customize this. |
b2MixRestitution(float32 restitution1, float32 restitution2) -> float32 Restitution mixing law. Feel free to customize this. |
b2IsValid(float32 x) -> bool This function is used to ensure that a floating point number is not a NaN or infinity. |
b2InvSqrt(float32 x) -> float32 This is a approximate yet fast inverse square-root. |
b2NextPowerOfTwo(uint32 x) -> uint32 "Next Largest Power of 2 Given a binary integer value x, the next largest power of 2 can be computed by a SWAR algorithm that recursively "folds" the upper bits into the lower bits. This process yields a bit vector with the same most significant 1 as x, but all 1's below it. Adding 1 to that value yields the next largest power of 2. For a 32-bit value:" |
b2Dot(b2Vec2 a, b2Vec2 b) -> float32 b2Dot(b2Vec3 a, b2Vec3 b) -> float32 Perform the dot product on two vectors. |
b2Cross(b2Vec2 a, b2Vec2 b) -> float32 b2Cross(b2Vec2 a, float32 s) -> b2Vec2 b2Cross(float32 s, b2Vec2 a) -> b2Vec2 b2Cross(b2Vec3 a, b2Vec3 b) -> b2Vec3 Perform the cross product on two vectors. |
b2Mul(b2Mat22 A, b2Vec2 v) -> b2Vec2 b2Mul(b2Mat22 A, b2Mat22 B) -> b2Mat22 b2Mul(b2Mat33 A, b2Vec3 v) -> b2Vec3 b2Mul(b2XForm T, b2Vec2 v) -> b2Vec2 Multiply a matrix times a vector. |
b2MulT(b2Mat22 A, b2Vec2 v) -> b2Vec2 b2MulT(b2Mat22 A, b2Mat22 B) -> b2Mat22 b2MulT(b2XForm T, b2Vec2 v) -> b2Vec2 Multiply a matrix transpose times a vector. If a rotation matrix is provided, then this transforms the vector from one frame to another (inverse transform). |
Computes the centroid of the polygon shape definition, pd. Raises ValueError on an invalid vertex count or a small area. Ported from the Box2D C++ code. |
collideCircleParticle(b2CircleShape circle, b2Vec2 ppos) -> PyObject For liquid simulation. Checks if a particle would collide with the specified circle. |
b2CollidePolyParticle(b2PolygonShape polygon, b2Vec2 ppos, float32 pradius) -> PyObject For liquid simulation. Checks if a particle would collide with the specified polygon. |
Checks the Polygon definition to see if upon creation it will cause an assertion. Raises ValueError if an assertion would be raised. Ported from the Box2D C++ code for CreateShape(). The C++ version is now included as it's more accurate, please use b2CheckPolygonDef instead. |
b2Distance(b2Vec2 a, b2Vec2 b) -> float32 b2Distance(b2Shape shape1, b2XForm xf1, b2Shape shape2, b2XForm xf2) -> PyObject Compute the distance between two shapes and the closest points. the distance between the shapes or zero if they are overlapped/touching. |
b2AABBOverlaps(b2AABB aabb, b2Vec2 point) -> bool b2AABBOverlaps(b2AABB aabb, b2AABB aabb2) -> bool Checks if two AABBs overlap, or if a point lies in an AABB b2AABBOverlaps(AABB1, [AABB2/point]) |
b2CheckPolygonDef(b2PolygonDef poly, bool additional_checks = True) -> bool b2CheckPolygonDef(b2PolygonDef poly) -> bool Checks the Polygon definition to see if upon creation it will cause an assertion. Raises ValueError if an assertion would be raised. b2PolygonDef* poly - the polygon definition bool additional_checks - whether or not to run additional checks Additional checking: usually only in DEBUG mode on the C++ code. While shapes that pass this test can be created without assertions, they will ultimately create unexpected behavior. It's recommended to _not_ use any polygon that fails this test. |
b2Random(float32 lo, float32 hi) -> float32 Random floating point number in range [lo, hi]. With no arguments, returns one in -1,1.
|
b2CollideCircles(b2Manifold manifold, b2CircleShape circle1, b2XForm xf1, b2CircleShape circle2, b2XForm xf2) Compute the collision manifold between two circles. |
b2CollidePolygonAndCircle(b2Manifold manifold, b2PolygonShape polygon, b2XForm xf1, b2CircleShape circle, b2XForm xf2) Compute the collision manifold between a polygon and a circle. |
b2CollidePolygons(b2Manifold manifold, b2PolygonShape polygon1, b2XForm xf1, b2PolygonShape polygon2, b2XForm xf2) Compute the collision manifold between two circles. |
__b2Distance__(b2Vec2 x1, b2Vec2 x2, b2Shape shape1, b2XForm xf1, b2Shape shape2, b2XForm xf2) -> float32 Compute the distance between two shapes and the closest points. the distance between the shapes or zero if they are overlapped/touching. |
b2TimeOfImpact(b2Shape shape1, b2Sweep sweep1, b2Shape shape2, b2Sweep sweep2) -> float32 Compute the time when two shapes begin to touch or touch at a closer distance. WARNING: the sweeps must have the same time interval. the fraction between [0,1] in which the shapes first touch. fraction=0 means the shapes begin touching/overlapped, and fraction=1 means the shapes don't touch. |
b2Contact_AddType(b2ContactCreateFcn createFcn, b2ContactDestroyFcn destroyFcn, b2ShapeType type1, b2ShapeType type2) |
|
b2Mat22_identity
|
b2XForm_identity
|
cvars
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Feb 24 18:39:58 2009 | http://epydoc.sourceforge.net |