Home | Trees | Indices | Help |
|
---|
|
A shape is used for collision detection. Shapes are created in b2World. You can use shape for collision detection before they are attached to the world. WARNING: you cannot reuse shapes.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
thisown The membership flag |
|||
userData GetUserData(self) -> PyObject |
|||
filter GetFilterData(self) -> b2FilterData |
|||
friction GetFriction(self) -> float32 |
|||
restitution GetRestitution(self) -> float32 |
|||
density GetDensity(self) -> float32 |
|||
isSensor IsSensor(self) -> bool |
|
|
|
b2Shape_GetType(b2Shape self) -> b2ShapeType Get the type of this shape. You can use this to down cast to the concrete shape. the shape type. |
b2Shape_IsSensor(b2Shape self) -> bool Is this shape a sensor (non-solid)? the true if the shape is a sensor. |
b2Shape_SetFilterData(b2Shape self, b2FilterData filter) Set the contact filtering data. You must call b2World::Refilterto correct existing contacts/non-contacts. |
b2Shape_GetFilterData(b2Shape self) -> b2FilterData Get the contact filtering data. |
b2Shape_GetBody(b2Shape self) -> b2Body Get the parent body of this shape. This is NULL if the shape is not attached. the parent body. |
b2Shape_GetNext(b2Shape self) -> b2Shape Get the next shape in the parent body's shape list. the next shape. |
b2Shape_TestPoint(b2Shape self, b2XForm xf, b2Vec2 p) -> bool Test a point for containment in this shape. This only works for convex shapes. Parameters: ----------- xf: the shape world transform. p: a point in world coordinates. |
b2Shape_ComputeAABB(b2Shape self, b2AABB aabb, b2XForm xf) Given a transform, compute the associated axis aligned bounding box for this shape. Parameters: ----------- aabb: returns the axis aligned box. xf: the world transform of the shape. |
b2Shape_ComputeSweptAABB(b2Shape self, b2AABB aabb, b2XForm xf1, b2XForm xf2) Given two transforms, compute the associated swept axis aligned bounding box for this shape. Parameters: ----------- aabb: returns the axis aligned box. xf1: the starting shape world transform. xf2: the ending shape world transform. |
b2Shape_ComputeMass(b2Shape self, b2MassData massData) Compute the mass properties of this shape using its dimensions and density. The inertia tensor is computed about the local origin, not the centroid. Parameters: ----------- massData: returns the mass data for this shape. |
b2Shape_ComputeSubmergedArea(b2Shape self, b2Vec2 normal, float32 offset, b2XForm xf, b2Vec2 c) -> float32 Compute the volume and centroid of this shape intersected with a half plane Parameters: ----------- normal: the surface normal offset: the surface offset along normal xf: the shape transform c: returns the centroid the total volume less than offset along normal |
b2Shape_GetSweepRadius(b2Shape self) -> float32 Get the maximum radius about the parent body's center of mass. |
b2Shape_GetFriction(b2Shape self) -> float32 Get the coefficient of friction. |
b2Shape_SetFriction(b2Shape self, float32 friction) Set the coefficient of friction. |
b2Shape_GetRestitution(b2Shape self) -> float32 Get the coefficient of restitution. |
b2Shape_SetRestitution(b2Shape self, float32 restitution) Set the coefficient of restitution. |
b2Shape_GetDensity(b2Shape self) -> float32 Get the density of the shape. |
b2Shape_SetDensity(b2Shape self, float32 density) Set the density of the shape. |
b2Shape_GetUserData(b2Shape self) -> PyObject Get the user data that was assigned in the shape definition. Use this to store your application specific data. |
b2Shape_SetUserData(b2Shape self, PyObject data) Set the user data. Use this to store your application specific data. |
b2Shape___hash__(b2Shape self) -> int32
|
TestSegment(b2XForm xf, float32 _lambda, b2Vec2 normal, b2Segment segment, float32 maxLambda) -> b2SegmentCollide b2Shape_TestSegment(b2Shape self, b2XForm xf, b2Segment segment, float32 maxLambda) -> PyObject Perform a ray cast against this shape. Parameters: ----------- xf: the shape world transform. lambda: returns the hit fraction. You can use this to compute the contact point p = (1 - lambda) * segment.p1 + lambda * segment.p2. normal: returns the normal at the contact point. If there is no intersection, the normal is not set. segment: defines the begin and end point of the ray cast. maxLambda: a number typically in the range [0,1]. |
|
thisownThe membership flag |
userDataGetUserData(self) -> PyObject Get the user data that was assigned in the shape definition. Use this to store your application specific data. |
filterGetFilterData(self) -> b2FilterData Get the contact filtering data. |
frictionGetFriction(self) -> float32 Get the coefficient of friction. |
restitutionGetRestitution(self) -> float32 Get the coefficient of restitution. |
densityGetDensity(self) -> float32 Get the density of the shape. |
isSensorIsSensor(self) -> bool Is this shape a sensor (non-solid)? the true if the shape is a sensor. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Feb 24 18:39:59 2009 | http://epydoc.sourceforge.net |