API Documentation

class pyb2d3.BodyFactory(world, **kwargs)[source]
add_box(*args, **kwargs)[source]
add_capsule(*args, **kwargs)[source]
add_circle(*args, **kwargs)[source]
add_polygon(*args, **kwargs)[source]
create()[source]
dynamic()[source]
kinematic()[source]
shape(material=None, **kwargs)[source]
static()[source]
surface_material(**kwargs)[source]
class pyb2d3.DebugDraw[source]
draw_aabb(aabb, color)[source]
draw_circle(center, radius, color)[source]
draw_point(p, size, color)[source]
draw_polygon(points, color)[source]
draw_segment(p1, p2, color)[source]
draw_solid_capsule(p1, p2, radius, color)[source]
draw_solid_circle(transform, radius, color)[source]
draw_solid_polygon(transform, points, radius, color)[source]
draw_string(x, y, string)[source]
draw_transform(transform)[source]
class pyb2d3.HexColor(*values)[source]
AliceBlue = 15792383
AntiqueWhite = 16444375
Aquamarine = 8388564
Azure = 15794175
Beige = 16119260
Bisque = 16770244
Black = 0
BlanchedAlmond = 16772045
Blue = 255
BlueViolet = 9055202
Box2DBlue = 3190463
Box2DGreen = 9226532
Box2DRed = 14430514
Box2DYellow = 16772748
Brown = 10824234
Burlywood = 14596231
CadetBlue = 6266528
Chartreuse = 8388352
Chocolate = 13789470
Coral = 16744272
CornflowerBlue = 6591981
Cornsilk = 16775388
Crimson = 14423100
Cyan = 65535
DarkBlue = 139
DarkCyan = 35723
DarkGoldenrod = 12092939
DarkGray = 11119017
DarkGreen = 25600
DarkKhaki = 12433259
DarkMagenta = 9109643
DarkOliveGreen = 5597999
DarkOrange = 16747520
DarkOrchid = 10040012
DarkRed = 9109504
DarkSalmon = 15308410
DarkSeaGreen = 9419919
DarkSlateBlue = 4734347
DarkSlateGray = 3100495
DarkTurquoise = 52945
DarkViolet = 9699539
DeepPink = 16716947
DeepSkyBlue = 49151
DimGray = 6908265
DodgerBlue = 2003199
Firebrick = 11674146
FloralWhite = 16775920
ForestGreen = 2263842
Gainsboro = 14474460
GhostWhite = 16316671
Gold = 16766720
Goldenrod = 14329120
Gray = 12500670
Gray1 = 1710618
Gray2 = 3355443
Gray3 = 5066061
Gray4 = 6710886
Gray5 = 8355711
Gray6 = 10066329
Gray7 = 11776947
Gray8 = 13421772
Gray9 = 15066597
Green = 65280
GreenYellow = 11403055
Honeydew = 15794160
HotPink = 16738740
IndianRed = 13458524
Indigo = 4915330
Ivory = 16777200
Khaki = 15787660
Lavender = 15132410
LavenderBlush = 16773365
LawnGreen = 8190976
LemonChiffon = 16775885
LightBlue = 11393254
LightCoral = 15761536
LightCyan = 14745599
LightGoldenrod = 15654274
LightGoldenrodYellow = 16448210
LightGray = 13882323
LightGreen = 9498256
LightPink = 16758465
LightSalmon = 16752762
LightSeaGreen = 2142890
LightSkyBlue = 8900346
LightSlateBlue = 8679679
LightSlateGray = 7833753
LightSteelBlue = 11584734
LightYellow = 16777184
LimeGreen = 3329330
Linen = 16445670
Magenta = 16711935
Maroon = 11546720
MediumAquamarine = 6737322
MediumBlue = 205
MediumOrchid = 12211667
MediumPurple = 9662683
MediumSeaGreen = 3978097
MediumSlateBlue = 8087790
MediumSpringGreen = 64154
MediumTurquoise = 4772300
MediumVioletRed = 13047173
MidnightBlue = 1644912
MintCream = 16121850
MistyRose = 16770273
Moccasin = 16770229
NavajoWhite = 16768685
NavyBlue = 128
OldLace = 16643558
Olive = 8421376
OliveDrab = 7048739
Orange = 16753920
OrangeRed = 16729344
Orchid = 14315734
PaleGoldenrod = 15657130
PaleGreen = 10025880
PaleTurquoise = 11529966
PaleVioletRed = 14381203
PapayaWhip = 16773077
PeachPuff = 16767673
Peru = 13468991
Pink = 16761035
Plum = 14524637
PowderBlue = 11591910
Purple = 10494192
RebeccaPurple = 6697881
Red = 16711680
RosyBrown = 12357519
RoyalBlue = 4286945
SaddleBrown = 9127187
Salmon = 16416882
SandyBrown = 16032864
SeaGreen = 3050327
Seashell = 16774638
Sienna = 10506797
Silver = 12632256
SkyBlue = 8900331
SlateBlue = 6970061
SlateGray = 7372944
Snow = 16775930
SpringGreen = 65407
SteelBlue = 4620980
Tan = 13808780
Teal = 32896
Thistle = 14204888
Tomato = 16737095
Turquoise = 4251856
Violet = 15631086
VioletRed = 13639824
Wheat = 16113331
White = 16777215
WhiteSmoke = 16119285
Yellow = 16776960
YellowGreen = 10145074
class pyb2d3.PathBuilder(start)[source]
arc_to(radius, clockwise=True, segments=10, major_arc=False, **point_args)[source]
chain_def(is_loop=False, material=None, reverse=False)[source]
line_to(**point_args)[source]
class pyb2d3.World(thread_pool=None, **kwargs)[source]
pyb2d3.aabb(lower_bound, upper_bound)[source]
pyb2d3.aabb_arround_point(point, radius)[source]
pyb2d3.add_to_sys_path(path)[source]

Add the directory of the given file to the sys.path.

pyb2d3.body_def(**kwargs)[source]
pyb2d3.box(hx, hy, center=None, rotation=None, radius=None)[source]
pyb2d3.capsule(center1, center2, radius)[source]
pyb2d3.chain_box(hx, hy, center=(0, 0), angle=None)[source]

Create a chain shape that represents a box centered at center with half-width hx and half-height hy.

pyb2d3.chain_def(points, materials=None, material=None, is_loop=False, filter=None)[source]
pyb2d3.chain_segment(segment, ghost1, ghost2)[source]
pyb2d3.circle(center=(0, 0), radius=1)[source]
pyb2d3.create_body(world_id, *args, **kwargs)[source]
pyb2d3.create_dynamic_body(world_id, *args, **kwargs)
pyb2d3.create_kinematic_body(world_id, *args, **kwargs)
pyb2d3.create_static_body(world_id, *args, **kwargs)
pyb2d3.distance_joint_def(**kwargs)[source]
pyb2d3.dynamic_body_def(**kwargs)
pyb2d3.explosion_def(**kwargs)[source]
pyb2d3.filter_joint_def(**kwargs)[source]
pyb2d3.hex_color(*args)[source]

Create a HexColor object from RGB values.

pyb2d3.import_local(path, module_name)[source]
pyb2d3.kinematic_body_def(**kwargs)
pyb2d3.make_filter(**kwargs)[source]
pyb2d3.make_query_filter(**kwargs)[source]
pyb2d3.motor_joint_def(**kwargs)[source]
pyb2d3.mouse_joint_def(**kwargs)[source]
pyb2d3.polygon(points=None, hull=None, radius=None, position=None, rotation=None)[source]
pyb2d3.prismatic_joint_def(**kwargs)[source]
pyb2d3.query_filter(**kwargs)[source]

Create a QueryFilter object with the given keyword arguments.

pyb2d3.random_hex_color()[source]

Generate a random hexadecimal color integer.

pyb2d3.ray_cast_input(origin=(0, 0), translation=(0, 0), max_fraction=1.0)[source]
pyb2d3.revolute_joint_def(**kwargs)[source]
pyb2d3.rgb_to_hex_color(r, g, b)[source]

Convert RGB values to a hexadecimal integer.

pyb2d3.rgba_to_hex_color(r, g, b, a)[source]

Convert RGBA values to a hexadecimal integer.

pyb2d3.segment(point1, point2)[source]
pyb2d3.shape_def(**kwargs)[source]
pyb2d3.static_body_def(**kwargs)
pyb2d3.surface_material(**kwargs)[source]
pyb2d3.transform(p=None, q=None)[source]
pyb2d3.weld_joint_def(**kwargs)[source]
pyb2d3.wheel_joint_def(**kwargs)[source]
pyb2d3.with_sys_path(path)[source]
pyb2d3.world_def(**kwargs)[source]

Python bindings for Box2D, a 2D physics engine.

class pyb2d3._pyb2d3.AABB(*args, **kwargs)
center
contains
is_valid
property lower_bound

(self) -> pyb2d3._pyb2d3.Vec2

property upper_bound

(self) -> pyb2d3._pyb2d3.Vec2

class pyb2d3._pyb2d3.Bodies(*args, **kwargs)
append

Append an item to the batch

get_angular_velocities

Get angular_velocities

get_is_valid

Get is_valid

get_linear_velocities

Get linear_velocities

get_linear_velocities_magnitude

Get linear_velocities_magnitude

get_local_point_velocities

Get the linear velocity of a local point attached to a body. Usually in meters per second.

get_local_points

Get a local point on a body given a world point

get_local_vectors

Get a local vector on a body given a world vector

get_positions

Get positions

get_rotations

Get rotations

get_transforms

Get transforms

get_types

Get types

get_user_data

Get user_data

get_world_point_velocities

Get the linear velocity of a world point attached to a body. Usually in meters per second.

get_world_points

Get a world point on a body given a local point

get_world_vectors

Get a world vector on a body given a local vector

id_iter
set_angular_velocities

Set angular_velocities

set_linear_velocities

Set linear_velocities

set_transforms

Set transforms

set_types

Set types

set_user_data

Set user_data

class pyb2d3._pyb2d3.Body(*args, **kwargs)
property angle

(self) -> float

property angular_damping

(self) -> float

property angular_velocity

(self) -> float

apply_angular_impulse
apply_force
apply_force_to_center
apply_linear_impulse
apply_linear_impulse_to_center
apply_mass_from_shapes
apply_torque
property awake

(self) -> bool

property bullet

(self) -> bool

compute_aabb
create_capsule_shape
create_chain
create_circle_shape
create_polygon_shape
create_segment_shape
create_shape(shape_def, shape)
create_shapes(shape_def, shapes)
destroy
property enabled

(self) -> bool

property enabled_sleep

(self) -> bool

property fixed_rotation

(self) -> bool

get_distance_to
property gravity_scale

(self) -> float

property id

(self) -> int

is_valid
property linear_damping

(self) -> float

property linear_velocity

(self) -> pyb2d3._pyb2d3.Vec2

linear_velocity_magnitude
local_center_of_mass
local_point
local_vector
property mass

(self) -> float

property mass_data

(self) -> b2MassData

property name

(self) -> str

property position

(self) -> pyb2d3._pyb2d3.Vec2

property rotation

(self) -> b2Rot

rotational_inertia
set_transform
property shape_count

(self) -> int

property shapes

(self) -> list[b2ShapeId]

property sleep_threshold

(self) -> float

property transform

(self) -> b2Transform

property type

(self) -> pyb2d3._pyb2d3.BodyType

property user_data

(self) -> int

property world

(self) -> pyb2d3._pyb2d3.WorldView

world_center_of_mass
world_point
world_vector
class pyb2d3._pyb2d3.BodyDef(*args, **kwargs)
property angular_damping

(self) -> float

property angular_velocity

(self) -> float

copy
property enable_sleep

(self) -> bool

property fixed_rotation

(self) -> bool

property gravity_scale

(self) -> float

property internal_value

(self) -> int

property is_awake

(self) -> bool

property is_bullet

(self) -> bool

property is_enabled

(self) -> bool

property linear_damping

(self) -> float

property linear_velocity

(self) -> pyb2d3._pyb2d3.Vec2

property name

(self) -> str

property position

(self) -> pyb2d3._pyb2d3.Vec2

property rotation

(self) -> b2Rot

property sleep_threshold

(self) -> float

property type

(self) -> pyb2d3._pyb2d3.BodyType

update(**kwargs)
property user_data

(self) -> int

class pyb2d3._pyb2d3.BodyEvents
property move_count

(self) -> int

class pyb2d3._pyb2d3.BodyMoveEvent
property body_id

(self) -> b2BodyId

property fell_asleep

(self) -> bool

property transform

(self) -> b2Transform

property user_data

(self) -> int

class pyb2d3._pyb2d3.BodyType(*values)
DYNAMIC = 2
KINEMATIC = 1
STATIC = 0
class pyb2d3._pyb2d3.CanvasWorldTransform(*args, **kwargs)
batch_canvas_to_world

Convert a batch of points from canvas coordinates to world coordinates. If output is not provided, a new array will be allocated.

batch_world_to_canvas

Convert a batch of points from world coordinates to canvas coordinates. If output is not provided, a new array will be allocated.

property canvas_shape

(self) -> list[int]

canvas_to_world
property offset

(self) -> list[float]

property ppm

(self) -> float

scale_canvas_to_world
scale_world_to_canvas
world_to_canvas
class pyb2d3._pyb2d3.Capsule(*args, **kwargs)
property center1

(self) -> pyb2d3._pyb2d3.Vec2

property center2

(self) -> pyb2d3._pyb2d3.Vec2

property radius

(self) -> float

class pyb2d3._pyb2d3.CapsuleBuilderWithTransform(*args, **kwargs)
build
get_vertices_buffer
class pyb2d3._pyb2d3.CapsuleShape(*args, **kwargs)
property capsule

(self) -> b2Capsule

class pyb2d3._pyb2d3.CastOutput(*args, **kwargs)
property fraction

(self) -> float

property hit

(self) -> bool

property iterations

(self) -> int

property normal

(self) -> pyb2d3._pyb2d3.Vec2

property point

(self) -> pyb2d3._pyb2d3.Vec2

class pyb2d3._pyb2d3.Chain(*args, **kwargs)
property friction

(self) -> float

get_segments
property id

(self) -> int

property is_valid

(self) -> bool

property material

(self) -> int

property restitution

(self) -> float

property segment_count

(self) -> int

property world

(self) -> b2WorldId

class pyb2d3._pyb2d3.ChainDef(*args, **kwargs)
copy
property filter

(self) -> pyb2d3._pyb2d3.Filter

property is_loop

(self) -> bool

property materials

(self) -> list[pyb2d3._pyb2d3.SurfaceMaterial]

property points

(self) -> numpy.ndarray[dtype=float32, shape=(*, 2), order=’C’]

class pyb2d3._pyb2d3.ChainSegment(*args, **kwargs)
property ghost1

(self) -> pyb2d3._pyb2d3.Vec2

property ghost2

(self) -> pyb2d3._pyb2d3.Vec2

property segment

(self) -> pyb2d3._pyb2d3.Segment

class pyb2d3._pyb2d3.ChainSegmentShape(*args, **kwargs)
property parent_chain

(self) -> b2ChainId

property segment

(self) -> b2Segment

class pyb2d3._pyb2d3.Circle(*args, **kwargs)
property center

(self) -> pyb2d3._pyb2d3.Vec2

property radius

(self) -> float

class pyb2d3._pyb2d3.CircleShape(*args, **kwargs)
property circle

(self) -> b2Circle

class pyb2d3._pyb2d3.ContactBeginTouchEvent
property manifold

(self) -> b2Manifold

property shape_a

(self) -> b2ShapeId

property shape_b

(self) -> b2ShapeId

class pyb2d3._pyb2d3.ContactData
property manifold

(self) -> b2Manifold

property shape_a

(self) -> b2ShapeId

property shape_b

(self) -> b2ShapeId

class pyb2d3._pyb2d3.ContactEndTouchEvent
property shape_a

(self) -> b2ShapeId

property shape_b

(self) -> b2ShapeId

class pyb2d3._pyb2d3.ContactEvents
property begin_count

(self) -> int

begin_events
property end_count

(self) -> int

end_events
property hit_count

(self) -> int

hit_events
class pyb2d3._pyb2d3.ContactHitEvent
property approach_speed

(self) -> float

property normal

(self) -> pyb2d3._pyb2d3.Vec2

property point

(self) -> pyb2d3._pyb2d3.Vec2

property shape_a

(self) -> b2ShapeId

property shape_b

(self) -> b2ShapeId

class pyb2d3._pyb2d3.Counters
property body_count

(self) -> int

property byte_count

(self) -> int

property contact_count

(self) -> int

property island_count

(self) -> int

property joint_count

(self) -> int

property shape_count

(self) -> int

property stack_used

(self) -> int

property static_tree_height

(self) -> int

property task_count

(self) -> int

property tree_height

(self) -> int

class pyb2d3._pyb2d3.DebugDrawBase(*args, **kwargs)
class pyb2d3._pyb2d3.DistanceJoint(*args, **kwargs)
property current_length

(self) -> float

property length

(self) -> float

property limit_enabled

(self) -> bool

property max_length

(self) -> float

property max_motor_force

(self) -> float

property min_length

(self) -> float

property motor_enabled

(self) -> bool

property motor_force

(self) -> float

property motor_speed

(self) -> float

property spring_damping_ratio

(self) -> float

property spring_enabled

(self) -> bool

property spring_hertz

(self) -> float

class pyb2d3._pyb2d3.DistanceJointDef(*args, **kwargs)
property body_a

(self) -> b2BodyId

property body_b

(self) -> b2BodyId

property collide_connected

(self) -> bool

copy
property damping_ratio

(self) -> float

property enable_limit

(self) -> bool

property enable_motor

(self) -> bool

property enable_spring

(self) -> bool

property hertz

(self) -> float

property length

(self) -> float

property local_anchor_a

(self) -> pyb2d3._pyb2d3.Vec2

property local_anchor_b

(self) -> pyb2d3._pyb2d3.Vec2

property max_length

(self) -> float

property max_motor_force

(self) -> float

property min_length

(self) -> float

property motor_speed

(self) -> float

property user_data

(self) -> int

class pyb2d3._pyb2d3.ExplosionDef(*args, **kwargs)
copy
property falloff

(self) -> float

property impulse_per_length

(self) -> float

property mask_bits

(self) -> int

property position

(self) -> pyb2d3._pyb2d3.Vec2

property radius

(self) -> float

class pyb2d3._pyb2d3.Filter(*args, **kwargs)
property category_bits

(self) -> int

property group_index

(self) -> int

property mask_bits

(self) -> int

class pyb2d3._pyb2d3.FilterJoint(*args, **kwargs)
property user_data

(self) -> int

class pyb2d3._pyb2d3.FilterJointDef(*args, **kwargs)
property body_a

(self) -> b2BodyId

property body_b

(self) -> b2BodyId

copy
property user_data

(self) -> int

class pyb2d3._pyb2d3.Hull(*args, **kwargs)
property count

(self) -> int

property points

(self) -> numpy.ndarray[dtype=float32, shape=(*, 2), order=’C’]

validate
class pyb2d3._pyb2d3.Joint(*args, **kwargs)
property body_a

(self) -> b2BodyId

property body_b

(self) -> b2BodyId

destroy
get_constraint_force
get_constraint_torque
property id

(self) -> int

property is_valid

(self) -> bool

property local_anchor_a

(self) -> pyb2d3._pyb2d3.Vec2

property local_anchor_b

(self) -> pyb2d3._pyb2d3.Vec2

property type

(self) -> pyb2d3._pyb2d3.JointType

property user_data

(self) -> int

wake_bodies
property world

(self) -> b2WorldId

class pyb2d3._pyb2d3.JointType(*values)
DISTANCE_JOINT = 0
MOTOR_JOINT = 2
MOUSE_JOINT = 3
PRISMATIC_JOINT = 4
REVOLUTE_JOINT = 5
WELD_JOINT = 6
WHEEL_JOINT = 7
class pyb2d3._pyb2d3.Manifold(*args, **kwargs)
property normal

(self) -> pyb2d3._pyb2d3.Vec2

property point_count

(self) -> int

points
class pyb2d3._pyb2d3.ManifoldPoint(*args, **kwargs)
property anchor_a

(self) -> pyb2d3._pyb2d3.Vec2

property anchor_b

(self) -> pyb2d3._pyb2d3.Vec2

property id

(self) -> int

property normal_impulse

(self) -> float

property normal_velocity

(self) -> float

property persisted

(self) -> bool

property point

(self) -> pyb2d3._pyb2d3.Vec2

property separation

(self) -> float

property tangent_impulse

(self) -> float

property total_normal_impulse

(self) -> float

class pyb2d3._pyb2d3.MassData(*args, **kwargs)
property center

(self) -> pyb2d3._pyb2d3.Vec2

property mass

(self) -> float

property rotational_inertia

(self) -> float

class pyb2d3._pyb2d3.MotorJoint(*args, **kwargs)
property angular_offset

(self) -> float

property correction_factor

(self) -> float

property linear_offset

(self) -> pyb2d3._pyb2d3.Vec2

property max_force

(self) -> float

property max_torque

(self) -> float

class pyb2d3._pyb2d3.MotorJointDef(*args, **kwargs)
property angular_offset

(self) -> float

property body_a

(self) -> b2BodyId

property body_b

(self) -> b2BodyId

property collide_connected

(self) -> bool

copy
property correction_factor

(self) -> float

property linear_offset

(self) -> pyb2d3._pyb2d3.Vec2

property max_force

(self) -> float

property max_torque

(self) -> float

property user_data

(self) -> int

class pyb2d3._pyb2d3.MouseJoint(*args, **kwargs)
property max_force

(self) -> float

property spring_damping_ratio

(self) -> float

property spring_hertz

(self) -> float

property target

(self) -> pyb2d3._pyb2d3.Vec2

class pyb2d3._pyb2d3.MouseJointDef(*args, **kwargs)
property body_a

(self) -> b2BodyId

property body_b

(self) -> b2BodyId

property collide_connected

(self) -> bool

copy
property damping_ratio

(self) -> float

property hertz

(self) -> float

property max_force

(self) -> float

property target

(self) -> pyb2d3._pyb2d3.Vec2

property user_data

(self) -> int

class pyb2d3._pyb2d3.Plane(*args, **kwargs)
property normal

(self) -> pyb2d3._pyb2d3.Vec2

property offset

(self) -> float

class pyb2d3._pyb2d3.Polygon(*args, **kwargs)
property centroid

(self) -> pyb2d3._pyb2d3.Vec2

property count

(self) -> int

property normals

(self) -> numpy.ndarray[dtype=float32, shape=(*, 2), order=’C’]

property radius

(self) -> float

property vertices

(self) -> numpy.ndarray[dtype=float32, shape=(*, 2), order=’C’]

class pyb2d3._pyb2d3.PolygonShape(*args, **kwargs)
property polygon

(self) -> b2Polygon

class pyb2d3._pyb2d3.PrismaticJoint(*args, **kwargs)
property limit_enabled

(self) -> bool

property lower_limit

(self) -> float

property max_motor_force

(self) -> float

property motor_enabled

(self) -> bool

property motor_speed

(self) -> float

property speed

(self) -> float

property spring_damping_ratio

(self) -> float

property spring_enabled

(self) -> bool

property spring_hertz

(self) -> float

property translation

(self) -> float

property upper_limit

(self) -> float

class pyb2d3._pyb2d3.PrismaticJointDef(*args, **kwargs)
property body_a

(self) -> b2BodyId

property body_b

(self) -> b2BodyId

property collide_connected

(self) -> bool

copy
property damping_ratio

(self) -> float

property enable_limit

(self) -> bool

property enable_motor

(self) -> bool

property enable_spring

(self) -> bool

property hertz

(self) -> float

property local_anchor_a

(self) -> pyb2d3._pyb2d3.Vec2

property local_anchor_b

(self) -> pyb2d3._pyb2d3.Vec2

property local_axis_a

(self) -> pyb2d3._pyb2d3.Vec2

property lower_translation

(self) -> float

property max_motor_force

(self) -> float

property motor_speed

(self) -> float

property reference_angle

(self) -> float

property upper_translation

(self) -> float

property user_data

(self) -> int

class pyb2d3._pyb2d3.Profile
property apply_restitution

(self) -> float

property bullets

(self) -> float

property collide

(self) -> float

property hit_events

(self) -> float

property integrate_positions

(self) -> float

property integrate_velocities

(self) -> float

property merge_islands

(self) -> float

property pairs

(self) -> float

property prepare_constraints

(self) -> float

property prepare_stages

(self) -> float

property refit

(self) -> float

property relax_impulses

(self) -> float

property sensors

(self) -> float

property sleep_islands

(self) -> float

property solve

(self) -> float

property solve_constraints

(self) -> float

property solve_impulses

(self) -> float

property split_islands

(self) -> float

property step

(self) -> float

property store_impulses

(self) -> float

property transforms

(self) -> float

property warm_start

(self) -> float

class pyb2d3._pyb2d3.QueryFilter(*args, **kwargs)
property category_bits

(self) -> int

property mask_bits

(self) -> int

class pyb2d3._pyb2d3.RayCastInput
property max_fraction

(self) -> float

property origin

(self) -> pyb2d3._pyb2d3.Vec2

property translation

(self) -> pyb2d3._pyb2d3.Vec2

class pyb2d3._pyb2d3.RayResult
compute_normal(ray_direction)
property fraction

(self) -> float

property hit

(self) -> bool

property leaf_visits

(self) -> int

property node_visits

(self) -> int

property normal

(self) -> pyb2d3._pyb2d3.Vec2

property point

(self) -> pyb2d3._pyb2d3.Vec2

property shape

(self) -> b2ShapeId

class pyb2d3._pyb2d3.RevoluteJoint(*args, **kwargs)
property angle

(self) -> float

property limit_enabled

(self) -> bool

property lower_limit

(self) -> float

property max_motor_torque

(self) -> float

property motor_enabled

(self) -> bool

property motor_speed

(self) -> float

property motor_torque

(self) -> float

property spring_damping_ratio

(self) -> float

property spring_enabled

(self) -> bool

property spring_hertz

(self) -> float

property upper_limit

(self) -> float

class pyb2d3._pyb2d3.RevoluteJointDef(*args, **kwargs)
property body_a

(self) -> b2BodyId

property body_b

(self) -> b2BodyId

property collide_connected

(self) -> bool

copy
property damping_ratio

(self) -> float

property draw_size

(self) -> float

property enable_limit

(self) -> bool

property enable_motor

(self) -> bool

property enable_spring

(self) -> bool

property hertz

(self) -> float

property local_anchor_a

(self) -> pyb2d3._pyb2d3.Vec2

property local_anchor_b

(self) -> pyb2d3._pyb2d3.Vec2

property lower_angle

(self) -> float

property max_motor_torque

(self) -> float

property motor_speed

(self) -> float

property reference_angle

(self) -> float

property upper_angle

(self) -> float

property user_data

(self) -> int

class pyb2d3._pyb2d3.Rot(*args, **kwargs)
property c

(self) -> float

property s

(self) -> float

class pyb2d3._pyb2d3.Segment(*args, **kwargs)
property point1

(self) -> pyb2d3._pyb2d3.Vec2

property point2

(self) -> pyb2d3._pyb2d3.Vec2

class pyb2d3._pyb2d3.SegmentShape(*args, **kwargs)
property segment

(self) -> b2Segment

class pyb2d3._pyb2d3.SensorBeginTouchEvent
property sensor_shape_id

(self) -> b2ShapeId

property visitor_shape_id

(self) -> b2ShapeId

class pyb2d3._pyb2d3.SensorEndTouchEvent
property sensor_shape_id

(self) -> b2ShapeId

property visitor_shape_id

(self) -> b2ShapeId

class pyb2d3._pyb2d3.SensorEvents
property begin_count

(self) -> int

property end_count

(self) -> int

class pyb2d3._pyb2d3.Shape(*args, **kwargs)
property body

(self) -> b2BodyId

cast
property contact_events_enabled

(self) -> bool

property density

(self) -> float

property filter

(self) -> pyb2d3._pyb2d3.Filter

property friction

(self) -> float

property hit_events_enabled

(self) -> bool

property id

(self) -> int

property is_sensor

(self) -> bool

property is_valid

(self) -> bool

property material

(self) -> int

property pre_solve_events_enabled

(self) -> bool

ray_cast
property restitution

(self) -> float

property sensor_events_enabled

(self) -> bool

set_density
test_point
property type

(self) -> pyb2d3._pyb2d3.ShapeType

property user_data

(self) -> int

property world

(self) -> b2WorldId

class pyb2d3._pyb2d3.ShapeDef(*args, **kwargs)
copy
property density

(self) -> float

property enable_contact_events

(self) -> bool

property enable_hit_events

(self) -> bool

property enable_pre_solve_events

(self) -> bool

property enable_sensor_events

(self) -> bool

property filter

(self) -> pyb2d3._pyb2d3.Filter

property invoke_contact_creation

(self) -> bool

property is_sensor

(self) -> bool

property material

(self) -> pyb2d3._pyb2d3.SurfaceMaterial

update(**kwargs)
property update_body_mass

(self) -> bool

property user_data

(self) -> int

class pyb2d3._pyb2d3.ShapeProxy(*args, **kwargs)
property count

(self) -> int

property points

(self) -> numpy.ndarray[dtype=float32, shape=(*, 2), order=’C’]

property radius

(self) -> float

class pyb2d3._pyb2d3.ShapeType(*values)
capsule = 1
chain_segment = 4
circle = 0
polygon = 3
segment = 2
class pyb2d3._pyb2d3.SurfaceMaterial(*args, **kwargs)
copy
property custom_color

(self) -> int

property friction

(self) -> float

property restitution

(self) -> float

property rolling_resistance

(self) -> float

property tangent_speed

(self) -> float

property user_material_id

(self) -> int

class pyb2d3._pyb2d3.ThreadPool(*args, **kwargs)
class pyb2d3._pyb2d3.Transform(*args, **kwargs)
inv_transform_point
property p

(self) -> pyb2d3._pyb2d3.Vec2

property q

(self) -> b2Rot

transform_point
class pyb2d3._pyb2d3.TreeStats(*args, **kwargs)
property leaf_visits

(self) -> int

property node_visits

(self) -> int

class pyb2d3._pyb2d3.Vec2(*args, **kwargs)
normalize
property x

(self) -> float

property y

(self) -> float

class pyb2d3._pyb2d3.WeldJoint(*args, **kwargs)
property angular_damping_ratio

(self) -> float

property angular_hertz

(self) -> float

property linear_damping_ratio

(self) -> float

property linear_hertz

(self) -> float

property reference_angle

(self) -> float

class pyb2d3._pyb2d3.WeldJointDef(*args, **kwargs)
property angular_damping_ratio

(self) -> float

property angular_hertz

(self) -> float

property body_a

(self) -> b2BodyId

property body_b

(self) -> b2BodyId

property collide_connected

(self) -> bool

copy
property linear_damping_ratio

(self) -> float

property linear_hertz

(self) -> float

property local_anchor_a

(self) -> pyb2d3._pyb2d3.Vec2

property local_anchor_b

(self) -> pyb2d3._pyb2d3.Vec2

property reference_angle

(self) -> float

property user_data

(self) -> int

class pyb2d3._pyb2d3.WheelJoint(*args, **kwargs)
property limit_enabled

(self) -> bool

property lower_limit

(self) -> float

property max_motor_torque

(self) -> float

property motor_enabled

(self) -> bool

property motor_speed

(self) -> float

property motor_torque

(self) -> float

property spring_damping_ratio

(self) -> float

property spring_enabled

(self) -> bool

property spring_hertz

(self) -> float

property upper_limit

(self) -> float

class pyb2d3._pyb2d3.WheelJointDef(*args, **kwargs)
property body_a

(self) -> b2BodyId

property body_b

(self) -> b2BodyId

property collide_connected

(self) -> bool

copy
property damping_ratio

(self) -> float

property enable_limit

(self) -> bool

property enable_motor

(self) -> bool

property enable_spring

(self) -> bool

property hertz

(self) -> float

property local_anchor_a

(self) -> pyb2d3._pyb2d3.Vec2

property local_anchor_b

(self) -> pyb2d3._pyb2d3.Vec2

property local_axis_a

(self) -> pyb2d3._pyb2d3.Vec2

property lower_translation

(self) -> float

property max_motor_torque

(self) -> float

property motor_speed

(self) -> float

property upper_translation

(self) -> float

property user_data

(self) -> int

class pyb2d3._pyb2d3.WorldDef(*args, **kwargs)
property contact_damping_ratio

(self) -> float

property contact_hertz

(self) -> float

copy
property gravity

(self) -> pyb2d3._pyb2d3.Vec2

property hit_event_threshold

(self) -> float

property internal_value

(self) -> int

property maximum_linear_speed

(self) -> float

property restitution_threshold

(self) -> float

update(**kwargs)
property user_data

(self) -> int

class pyb2d3._pyb2d3.WorldView(*args, **kwargs)
body_at_point
body_factory()
cast_ray(origin, translation, callback, query_filter=None)
cast_ray_closest
property continuous_enabled

(self) -> bool

create_body(body_def=None, **kwargs)
create_body_from_def
create_distance_joint(*args, **kwargs)
create_dynamic_body(body_def=None, **kwargs)
create_filter_joint(*args, **kwargs)
create_joint(joint_def)
create_kinematic_body(body_def=None, **kwargs)
create_motor_joint(*args, **kwargs)
create_mouse_joint(*args, **kwargs)
create_prismatic_joint(*args, **kwargs)
create_revolute_joint(*args, **kwargs)
create_static_body(body_def=None, **kwargs)
create_weld_joint(*args, **kwargs)
create_wheel_joint(*args, **kwargs)
destroy
draw(debug_draw, call_begin_end=True)
dyanmic_body_shape_at_point
dynamic_body_at_point
explode(explosion_def=None, **kwargs)
get_body_events
get_contact_events
get_sensor_events
property gravity

(self) -> pyb2d3._pyb2d3.Vec2

property hit_event_threshold

(self) -> float

property id

(self) -> int

is_valid
overlap_aabb(aabb, callback, query_filter=None, wrap_callback=True)
property restitution_threshold

(self) -> float

set_contact_tuning
shape_at_point
property sleeping_enabled

(self) -> bool

step
property user_data

(self) -> int