Package pybox2d :: Module Box2D :: Class b2PolygonShape |
[hide private]
[frames] | no frames]

# type b2PolygonShape

source code

A convex polygon.

Instance Methods | [hide private]
__init__(self, *args, **kwargs) | source code
__getstate__(self, additional_ignore=`[``]`) Returns a dictionary representation of self, with dict(var=value [, ...]) | source code
__setstate__(self, data) The factory output cannot be created just yet, so store the necessary information to create it later. | source code
_pickle_finalize(self, world=None, body=None) Finalize one of the outputs that we previously set as a dictionary. | source code
__eq__(a, b) | source code
__ne__(self, other) | source code
__repr__(self) | source code
getCoreVertices_tuple(self) Returns all of the core vertices as a list of tuples [ (x1,y1), (x2,y2) ... | source code
getCoreVertices_b2Vec2(self) Returns all of the core vertices as a list of b2Vec2's [ (x1,y1), (x2,y2) ... | source code
getVertices_tuple(self) Returns all of the vertices as a list of tuples [ (x1,y1), (x2,y2) ... | source code
getVertices_b2Vec2(self) Returns all of the vertices as a list of b2Vec2's [ (x1,y1), (x2,y2) ... | source code
getNormals_tuple(self) Returns all of the normals as a list of tuples [ (x1,y1), (x2,y2) ... | source code
getNormals_b2Vec2(self) Returns all of the normals as a list of b2Vec2's [ (x1,y1), (x2,y2) ... | source code
__iter__(self) Iterates over the vertices in the polygon | source code
__swig_destroy__(...) delete_b2PolygonShape(b2PolygonShape self) |
GetOBB(...) b2PolygonShape_GetOBB(b2PolygonShape self) -> b2OBB | source code
GetCentroid(...) b2PolygonShape_GetCentroid(b2PolygonShape self) -> b2Vec2 | source code
GetVertexCount(...) b2PolygonShape_GetVertexCount(b2PolygonShape self) -> int32 | source code
GetCoreVertices(...) b2PolygonShape_GetCoreVertices(b2PolygonShape self) -> b2Vec2 | source code
GetFirstVertex(...) b2PolygonShape_GetFirstVertex(b2PolygonShape self, b2XForm xf) -> b2Vec2 | source code
Centroid(...) b2PolygonShape_Centroid(b2PolygonShape self, b2XForm xf) -> b2Vec2 | source code
Support(...) b2PolygonShape_Support(b2PolygonShape self, b2XForm xf, b2Vec2 d) -> b2Vec2 | source code
getVertex(...) b2PolygonShape_getVertex(b2PolygonShape self, uint16 vnum) -> b2Vec2 | source code
getCoreVertex(...) b2PolygonShape_getCoreVertex(b2PolygonShape self, uint16 vnum) -> b2Vec2 | source code
getNormal(...) b2PolygonShape_getNormal(b2PolygonShape self, uint16 vnum) -> b2Vec2 | source code
Inherited from b2Shape
ClearUserData(...) b2Shape_ClearUserData(b2Shape self) | source code
ComputeAABB(...) b2Shape_ComputeAABB(b2Shape self, b2AABB aabb, b2XForm xf) | source code
ComputeMass(...) b2Shape_ComputeMass(b2Shape self, b2MassData massData) | source code
ComputeSubmergedArea(...) b2Shape_ComputeSubmergedArea(b2Shape self, b2Vec2 normal, float32 offset, b2XForm xf, b2Vec2 c) -> float32 | source code
ComputeSweptAABB(...) b2Shape_ComputeSweptAABB(b2Shape self, b2AABB aabb, b2XForm xf1, b2XForm xf2) | source code
GetBody(...) b2Shape_GetBody(b2Shape self) -> b2Body | source code
GetDensity(...) b2Shape_GetDensity(b2Shape self) -> float32 | source code
GetFilterData(...) b2Shape_GetFilterData(b2Shape self) -> b2FilterData | source code
GetFriction(...) b2Shape_GetFriction(b2Shape self) -> float32 | source code
GetNext(...) b2Shape_GetNext(b2Shape self) -> b2Shape | source code
GetRestitution(...) b2Shape_GetRestitution(b2Shape self) -> float32 | source code
GetSweepRadius(...) b2Shape_GetSweepRadius(b2Shape self) -> float32 | source code
GetType(...) b2Shape_GetType(b2Shape self) -> b2ShapeType | source code
GetUserData(...) b2Shape_GetUserData(b2Shape self) -> PyObject | source code
IsSensor(...) b2Shape_IsSensor(b2Shape self) -> bool | source code
SetDensity(...) b2Shape_SetDensity(b2Shape self, float32 density) | source code
SetFilterData(...) b2Shape_SetFilterData(b2Shape self, b2FilterData filter) | source code
SetFriction(...) b2Shape_SetFriction(b2Shape self, float32 friction) | source code
SetRestitution(...) b2Shape_SetRestitution(b2Shape self, float32 restitution) | source code
SetUserData(...) b2Shape_SetUserData(b2Shape self, PyObject data) | source code
TestPoint(...) b2Shape_TestPoint(b2Shape self, b2XForm xf, b2Vec2 p) -> bool | source code
TestSegment(...) TestSegment(b2XForm xf, float32 _lambda, b2Vec2 normal, b2Segment segment, float32 maxLambda) -> b2SegmentCollide b2Shape_TestSegment(b2Shape self, b2XForm xf, b2Segment segment, float32 maxLambda) -> PyObject | source code
__hash__(...) b2Shape___hash__(b2Shape self) -> int32 | source code
asCircle(...) b2Shape_asCircle(b2Shape self) -> b2CircleShape | source code
asEdge(...) b2Shape_asEdge(b2Shape self) -> b2EdgeShape | source code
asPolygon(...) b2Shape_asPolygon(b2Shape self) -> b2PolygonShape | source code
getAsType(self) Return a typecasted version of the shape | source code
typeName(self) | source code

Properties | [hide private]
| thisown The membership flag
| vertices Returns all of the vertices as a list of tuples [ (x1,y1), (x2,y2) ...
| coreVertices Returns all of the core vertices as a list of tuples [ (x1,y1), (x2,y2) ...
| normals Returns all of the normals as a list of tuples [ (x1,y1), (x2,y2) ...
Inherited from b2Shape
| density GetDensity(self) -> float32
| filter GetFilterData(self) -> b2FilterData
| friction GetFriction(self) -> float32
| isSensor IsSensor(self) -> bool
| restitution GetRestitution(self) -> float32
| userData GetUserData(self) -> PyObject

Method Details | [hide private]

### __init__(self, *args, **kwargs) (Constructor) | source code
Overrides: b2Shape.__init__

### __getstate__(self, additional_ignore=`[``]`) | source code
    Returns a dictionary representation of self, with
     dict(var=value [, ...])

    additional_ignore can be specified to ignore certain
    properties.
Overrides: no_pickle

### __setstate__(self, data) | source code
The factory output cannot be created just yet, so store the necessary information to create it later. Overrides: _generic_setstate

### __eq__(a, b) (Equality operator) | source code
Overrides: b2ShapeCompare

### __ne__(self, other) | source code
Overrides: b2Shape.__ne__

### __repr__(self) (Representation operator) | source code
Overrides: b2Shape.__repr__

### getCoreVertices_tuple(self) | source code
Returns all of the core vertices as a list of tuples [ (x1,y1), (x2,y2) ... (xN,yN) ]

### getCoreVertices_b2Vec2(self) | source code
Returns all of the core vertices as a list of b2Vec2's [ (x1,y1), (x2,y2) ... (xN,yN) ]

### getVertices_tuple(self) | source code
Returns all of the vertices as a list of tuples [ (x1,y1), (x2,y2) ... (xN,yN) ]

### getVertices_b2Vec2(self) | source code
Returns all of the vertices as a list of b2Vec2's [ (x1,y1), (x2,y2) ... (xN,yN) ]

### getNormals_tuple(self) | source code
Returns all of the normals as a list of tuples [ (x1,y1), (x2,y2) ... (xN,yN) ]

### getNormals_b2Vec2(self) | source code
Returns all of the normals as a list of b2Vec2's [ (x1,y1), (x2,y2) ... (xN,yN) ]

### GetOBB(...) | source code
b2PolygonShape_GetOBB(b2PolygonShape self) -> b2OBB Get the oriented bounding box relative to the parent body.

### GetCentroid(...) | source code
b2PolygonShape_GetCentroid(b2PolygonShape self) -> b2Vec2 Get local centroid relative to the parent body.

### GetVertexCount(...) | source code
b2PolygonShape_GetVertexCount(b2PolygonShape self) -> int32 Get the vertex count.

### GetCoreVertices(...) | source code
b2PolygonShape_GetCoreVertices(b2PolygonShape self) -> b2Vec2 Get the core vertices in local coordinates. These vertices represent a smaller polygon that is used for time of impact computations.

### GetFirstVertex(...) | source code
b2PolygonShape_GetFirstVertex(b2PolygonShape self, b2XForm xf) -> b2Vec2 Get the first vertex and apply the supplied transform.

### Centroid(...) | source code
b2PolygonShape_Centroid(b2PolygonShape self, b2XForm xf) -> b2Vec2 Get the centroid and apply the supplied transform.

### Support(...) | source code
b2PolygonShape_Support(b2PolygonShape self, b2XForm xf, b2Vec2 d) -> b2Vec2 Get the support point in the given world direction. Use the supplied transform.

Property Details | [hide private]

### thisown The membership flag

### vertices Returns all of the vertices as a list of tuples [ (x1,y1), (x2,y2) ... (xN,yN) ] Get Method: getVertices_tuple(self) - Returns all of the vertices as a list of tuples [ (x1,y1), (x2,y2) ...

### coreVertices Returns all of the core vertices as a list of tuples [ (x1,y1), (x2,y2) ... (xN,yN) ] Get Method: getCoreVertices_tuple(self) - Returns all of the core vertices as a list of tuples [ (x1,y1), (x2,y2) ...

### normals Returns all of the normals as a list of tuples [ (x1,y1), (x2,y2) ... (xN,yN) ] Get Method: getNormals_tuple(self) - Returns all of the normals as a list of tuples [ (x1,y1), (x2,y2) ...