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

# type b2Contact

source code

Known Subclasses:
  - b2NullContact

The class manages contact between two shapes. A contact exists for each overlapping AABB in the broad-phase (except if filtered). Therefore a contact object may exist that has no contact points.

Instance Methods | [hide private]
__init__(self, *args, **kwargs) | source code
__swig_destroy__(...) delete_b2Contact(b2Contact self) |
__repr__(self) | source code
__getstate__(self, additional_ignore=`[``]`) Returns a dictionary representation of self, with dict(var=value [, ...]) | source code
__setstate__(self, dict) Takes each variable=value pair in the dictionary and sets the attributes based on them | source code
GetManifolds(...) b2Contact_GetManifolds(b2Contact self) -> b2Manifold | source code
GetManifoldCount(...) b2Contact_GetManifoldCount(b2Contact self) -> int32 | source code
IsSolid(...) b2Contact_IsSolid(b2Contact self) -> bool | source code
GetNext(...) b2Contact_GetNext(b2Contact self) -> b2Contact | source code
GetShape1(...) b2Contact_GetShape1(b2Contact self) -> b2Shape | source code
GetShape2(...) b2Contact_GetShape2(b2Contact self) -> b2Shape | source code
Update(...) b2Contact_Update(b2Contact self, b2ContactListener listener) | source code
Evaluate(...) b2Contact_Evaluate(b2Contact self, b2ContactListener listener) | source code

Static Methods | [hide private]
AddType(*args) AddType(b2ContactCreateFcn createFcn, b2ContactDestroyFcn destroyFcn, ... | source code
InitializeRegisters() | source code
Create(*args) Create(b2Shape shape1, b2Shape shape2, b2BlockAllocator allocator) -> b2Contact | source code
Destroy(*args) Destroy(b2Contact contact, b2BlockAllocator allocator) | source code

Class Variables | [hide private]
| e_nonSolidFlag = `1`
| e_slowFlag = `2`
| e_islandFlag = `4`
| e_toiFlag = `8`

Properties | [hide private]
| thisown The membership flag
| s_registers
| s_initialized
| flags b2Contact_flags_get(b2Contact self) -> uint32
| manifoldCount b2Contact_manifoldCount_get(b2Contact self) -> int32
| prev b2Contact_prev_get(b2Contact self) -> b2Contact
| next b2Contact_next_get(b2Contact self) -> b2Contact
| node1 b2Contact_node1_get(b2Contact self) -> b2ContactEdge
| node2 b2Contact_node2_get(b2Contact self) -> b2ContactEdge
| shape1 b2Contact_shape1_get(b2Contact self) -> b2Shape
| shape2 b2Contact_shape2_get(b2Contact self) -> b2Shape
| toi b2Contact_toi_get(b2Contact self) -> float32

Method Details | [hide private]

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

### AddType(*args) Static Method | source code
    AddType(b2ContactCreateFcn createFcn, b2ContactDestroyFcn destroyFcn,
        b2ShapeType type1, b2ShapeType type2)

### __repr__(self) (Representation operator) | source code
Overrides: object.__repr__ (inherited documentation)

### __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.

### GetManifolds(...) | source code
b2Contact_GetManifolds(b2Contact self) -> b2Manifold Get the manifold array.

### GetManifoldCount(...) | source code
b2Contact_GetManifoldCount(b2Contact self) -> int32 Get the number of manifolds. This is 0 or 1 between convex shapes. This may be greater than 1 for convex-vs-concave shapes. Each manifold holds up to two contact points with a shared contact normal.

### IsSolid(...) | source code
b2Contact_IsSolid(b2Contact self) -> bool Is this contact solid? true if this contact should generate a response.

### GetNext(...) | source code
b2Contact_GetNext(b2Contact self) -> b2Contact Get the next contact in the world's contact list.

### GetShape1(...) | source code
b2Contact_GetShape1(b2Contact self) -> b2Shape Get the first shape in this contact.

### GetShape2(...) | source code
b2Contact_GetShape2(b2Contact self) -> b2Shape Get the second shape in this contact.

Property Details | [hide private]

### thisown The membership flag

### s_registers

### s_initialized

### flags b2Contact_flags_get(b2Contact self) -> uint32

### manifoldCount b2Contact_manifoldCount_get(b2Contact self) -> int32

### prev b2Contact_prev_get(b2Contact self) -> b2Contact

### next b2Contact_next_get(b2Contact self) -> b2Contact

### node1 b2Contact_node1_get(b2Contact self) -> b2ContactEdge

### node2 b2Contact_node2_get(b2Contact self) -> b2ContactEdge

### shape1 b2Contact_shape1_get(b2Contact self) -> b2Shape

### shape2 b2Contact_shape2_get(b2Contact self) -> b2Shape

### toi b2Contact_toi_get(b2Contact self) -> float32