Android Programming Press on the image to return to the main documentation page.

XUI2D

List of types:

B2AABB
B2Body
B2BodyDef
B2ChainShape
B2CircleShape
B2Contact
B2ContactImpulse
B2DistanceJoint
B2DistanceJointDef
B2EdgeShape
B2Fixture
B2FixtureDef
B2Joint
B2JointDef
B2Manifold
B2ManifoldPoint
B2MotorJoint
B2MotorJointDef
B2PolygonShape
B2PrismaticJoint
B2PrismaticJointDef
B2RevoluteJoint
B2RevoluteJointDef
B2RopeJoint
B2RopeJointDef
B2Shape
B2Transform
B2Vec2
B2WeldJoint
B2WeldJointDef
B2WheelJoint
B2WheelJointDef
B2World
B2WorldManifold

B2AABB


Events:

None

Members:


  BottomLeft As B2Vec2 [read only]

  Center As B2Vec2 [read only]

  Combine (Other As B2AABB)

  Contains (Other As B2AABB) As Boolean

  Height As Float [read only]

  Initialize

  Initialize2 (BottomLeft As B2Vec2, TopRight As B2Vec2)

  TestOverlap (Other As B2AABB) As Boolean

  TopRight As B2Vec2 [read only]

  Width As Float [read only]

Members description:

BottomLeft As B2Vec2 [read only]
Returns the bottom left point. You can modify it.
Center As B2Vec2 [read only]
Combine (Other As B2AABB)
Combine this AABB with the Other AABB.
Contains (Other As B2AABB) As Boolean
Returns true if this AABB contains the Other AABB.
Height As Float [read only]
Initialize
Initialize2 (BottomLeft As B2Vec2, TopRight As B2Vec2)
TestOverlap (Other As B2AABB) As Boolean
Returns true if this AABB overlaps the Other AABB.
TopRight As B2Vec2 [read only]
Returns the top right point. You can modify it.
Width As Float [read only]

B2Body


Events:

None

Members:


  Angle As Float [read only]

  AngularDamping As Float

  AngularVelocity As Float

  ApplyAngularImpulse (Impulse As Float)

  ApplyForce (Force As B2Vec2, Point As B2Vec2)

  ApplyForceToCenter (Force As B2Vec2)

  ApplyLinearImpulse (Impulse As B2Vec2, Point As B2Vec2)

  ApplyTorque (Torque As Float)

  Awake As Boolean

  BodyType As Object

  Bullet As Boolean [write only]

  CreateFixture (FixtureDef As B2FixtureDef) As B2Fixture

  CreateFixture2 (Shape As org.jbox2d.collision.shapes.Shape, Density As Float) As B2Fixture

  DestroyFixture (Fixture As B2Fixture)

  FirstFixture As B2Fixture [read only]

  FixedRotation As Boolean

  GetContactList (TouchingOnly As Boolean) As List

  GetLocalPoint (WorldPoint As B2Vec2) As B2Vec2

  GetLocalVector (WorldVector As B2Vec2) As B2Vec2

  GetWorldPoint (LocalPoint As B2Vec2) As B2Vec2

  GetWorldVector (LocalVector As B2Vec2) As B2Vec2

  GravityScale As Float

  Inertia As Float [read only]

  IsBullet As Boolean [read only]

  IsColliding As Boolean [read only]

  IsInitialized As Boolean [read only]

  LinearDamping As Float

  LinearVelocity As B2Vec2

  LocalCenter As B2Vec2 [read only]

  Mass As Float [read only]

  Position As B2Vec2 [read only]

  SetTransform (Position As B2Vec2, Angle As Float)

  SleepingAllowed As Boolean

  Tag As Object

  Transform As B2Transform [read only]

  TYPE_DYNAMIC As Object

  TYPE_KINEMATIC As Object

  TYPE_STATIC As Object

  WorldCenter As B2Vec2 [read only]

Members description:

Angle As Float [read only]
Get the angle in radians.
AngularDamping As Float
Get or set the angular damping of the body.
AngularVelocity As Float
Gets or sets the angular velocity. Measured in radians/second.
ApplyAngularImpulse (Impulse As Float)
Apply an angular impulse.

Impulse - the angular impulse in units of kg*m*m/s
ApplyForce (Force As B2Vec2, Point As B2Vec2)
Apply a force at a world point. If the force is not applied at the center of mass, it will
generate a torque and affect the angular velocity. This wakes up the body.

Force - the world force vector, usually in Newtons (N).
Point - the world position of the point of application.
ApplyForceToCenter (Force As B2Vec2)
Apply a force to the center of mass. This wakes up the body.

Force - the world force vector, usually in Newtons (N).
ApplyLinearImpulse (Impulse As B2Vec2, Point As B2Vec2)
Apply an impulse at a point. This immediately modifies the velocity. It also modifies the
angular velocity if the point of application is not at the center of mass. This wakes up the
body.

Impulse - the world impulse vector, usually in N-seconds or kg-m/s.
Point - the world position of the point of application.
Wake - also wake up the body
ApplyTorque (Torque As Float)
Apply a torque. This affects the angular velocity without affecting the linear velocity of the
center of mass. This wakes up the body.

Torque - about the z-axis (out of the screen), usually in N-m.
Awake As Boolean
Get or set the sleeping state of this body. A sleeping body has very low CPU cost.
BodyType As Object
Gets or sets the body type.
Bullet As Boolean [write only]
CreateFixture (FixtureDef As B2FixtureDef) As B2Fixture
Creates a fixture and attach it to this body. Use this function if you need to set some fixture
parameters, like friction. Otherwise you can create the fixture directly from a shape with CreateFixture2. If the
density is non-zero, this function automatically updates the mass of the body. Contacts are not
created until the next time step.
This function is locked during callbacks.
CreateFixture2 (Shape As org.jbox2d.collision.shapes.Shape, Density As Float) As B2Fixture
Creates a fixture from a shape and attach it to this body. This is a convenience function. Use
FixtureDef if you need to set parameters like friction, restitution, user data, or filtering.
If the density is non-zero, this function automatically updates the mass of the body.

Shape - The fixture shape. Do not reuse this shape!
Density - the shape density (set to zero for static bodies).
This function is locked during callbacks.
DestroyFixture (Fixture As B2Fixture)
Destroy a fixture. This removes the fixture from the broad-phase and destroys all contacts
associated with this fixture. This will automatically adjust the mass of the body if the body
is dynamic and the fixture has positive density. All fixtures attached to a body are implicitly
destroyed when the body is destroyed.

This function is locked during callbacks.
FirstFixture As B2Fixture [read only]
Returns the first fixture.
FixedRotation As Boolean
Get or set whether this body have fixed rotation. Setting causes the mass to be reset.
GetContactList (TouchingOnly As Boolean) As List
Returns a list with the body contacts.
TouchingOnly - If False then the list will include non-touching collisions (based on the bodies AABBs).
GetLocalPoint (WorldPoint As B2Vec2) As B2Vec2
Gets a local point relative to the body's origin given a world point.
GetLocalVector (WorldVector As B2Vec2) As B2Vec2
Gets a local vector given a world vector.
GetWorldPoint (LocalPoint As B2Vec2) As B2Vec2
Get the world coordinates of a point given the local coordinates.

LocalPoint - a point on the body measured relative the the body's origin.
GetWorldVector (LocalVector As B2Vec2) As B2Vec2
Get the world coordinates of a vector given the local coordinates.

LocalVector - a vector fixed in the body.
GravityScale As Float
Gets or sets the gravity scale.
Inertia As Float [read only]
Get the central rotational inertia of the body. Usually in kg-m^2
IsBullet As Boolean [read only]
Is this body treated like a bullet for continuous collision detection?
IsColliding As Boolean [read only]
Returns true if the contact list is not empty. Note that the list includes non-touching contacts.
IsInitialized As Boolean [read only]
LinearDamping As Float
Get or set the linear damping of the body.
LinearVelocity As B2Vec2
Get or sets the linear velocity of the center of mass. Do not modify the returned vector.
LocalCenter As B2Vec2 [read only]
Get the local position of the center of mass. Do not modify.
Mass As Float [read only]
Get the total mass of the body. Usually in kilograms (kg).
Position As B2Vec2 [read only]
Get the world body origin position. Do not modify.
SetTransform (Position As B2Vec2, Angle As Float)
Set the position of the body's origin and rotation. This breaks any contacts and wakes the
other bodies. Manipulating a body's transform may cause non-physical behavior. Note: contacts
are updated on the next call to World.TimeStep().

Position - the world position of the body's local origin.
Angle - the world rotation in radians.
SleepingAllowed As Boolean
Get or set whether sleeping is allowed.
Tag As Object
Transform As B2Transform [read only]
Gets the body transformation.
TYPE_DYNAMIC As Object
TYPE_KINEMATIC As Object
TYPE_STATIC As Object
WorldCenter As B2Vec2 [read only]
Get the world position of the center of mass. Do not modify.

B2BodyDef


Events:

None

Members:


  Active As Boolean

  AllowSleep As Boolean

  Angle As Float

  AngularDamping As Float

  AngularVelocity As Float

  Awake As Boolean

  BodyType As Object

  Bullet As Boolean

  FixedRotation As Boolean

  GravityScale As Float

  LinearDamping As Float

  LinearVelocity As B2Vec2

  Position As B2Vec2

  TYPE_DYNAMIC As Object

  TYPE_KINEMATIC As Object

  TYPE_STATIC As Object

Members description:

Active As Boolean
Does this body start out active?
AllowSleep As Boolean
Set this flag to false if this body should never fall asleep. Note that this increases CPU
usage.
Angle As Float
The world angle of the body in radians.
AngularDamping As Float
Angular damping is use to reduce the angular velocity. The damping parameter can be larger than
1.0f but the damping effect becomes sensitive to the time step when the damping parameter is
large.
AngularVelocity As Float
The angular velocity of the body.
Awake As Boolean
Is this body initially sleeping?
BodyType As Object
Get or set the body type.
Bullet As Boolean
Is this a fast moving body that should be prevented from tunneling through other moving bodies?
Note that all bodies are prevented from tunneling through kinematic and static bodies. This
setting is only considered on dynamic bodies.

You should use this flag sparingly since it increases processing time.
FixedRotation As Boolean
Should this body be prevented from rotating? Useful for characters.
GravityScale As Float
Experimental: scales the inertia tensor.
LinearDamping As Float
Linear damping is use to reduce the linear velocity. The damping parameter can be larger than
1.0f but the damping effect becomes sensitive to the time step when the damping parameter is
large.
LinearVelocity As B2Vec2
The linear velocity of the body in world co-ordinates.
Position As B2Vec2
The world position of the body. Avoid creating bodies at the origin since this can lead to many
overlapping shapes.
TYPE_DYNAMIC As Object
TYPE_KINEMATIC As Object
TYPE_STATIC As Object

B2ChainShape

A chain shape is a free form sequence of line segments. The chain has two-sided collision, so you
can use inside and outside collision. Therefore, you may use any winding order. Connectivity
information is used to create smooth collisions. WARNING: The chain will not collide properly if
there are self-intersections.

Events:

None

Members:


  ComputeAABB (Output As B2AABB, Transform As B2Transform)

  CreateChain (Vertices As List)

  CreateLoop (Vertices As List)

  EdgeCount As Int [read only]

  GetEdge (Index As Int, OutShape As B2EdgeShape)

  Initialize

  IsInitialized As Boolean

  Radius As Float

  SHAPE_CHAIN As Object

  SHAPE_CIRCLE As Object

  SHAPE_EDGE As Object

  SHAPE_POLYGON As Object

  ShapeType As Object [read only]

  TestPoint (Transform As B2Transform, Point As B2Vec2) As Boolean

Members description:

ComputeAABB (Output As B2AABB, Transform As B2Transform)
Computes the shape AABB based on the passed transform. The result is stored in the Output object.
CreateChain (Vertices As List)
Create a chain with isolated end vertices.
CreateLoop (Vertices As List)
Create a loop. This automatically adjusts connectivity.
EdgeCount As Int [read only]
Returns the number of edges.
GetEdge (Index As Int, OutShape As B2EdgeShape)
Copies the edge to OutShape.
Initialize
IsInitialized As Boolean
Radius As Float
Gets or sets the radius of the underlying shape. This can refer to different things depending on the
shape type.
SHAPE_CHAIN As Object
SHAPE_CIRCLE As Object
SHAPE_EDGE As Object
SHAPE_POLYGON As Object
ShapeType As Object [read only]
Returns the shape type which is one of the SHAPE constants.
TestPoint (Transform As B2Transform, Point As B2Vec2) As Boolean
Test a point for containment in this shape. This only works for convex shapes.

Transform - the shape world transform.
Point - a point in world coordinates.

B2CircleShape

Circle shape.

Events:

None

Members:


  ComputeAABB (Output As B2AABB, Transform As B2Transform)

  Initialize (Radius As Float)

  IsInitialized As Boolean

  Radius As Float

  SHAPE_CHAIN As Object

  SHAPE_CIRCLE As Object

  SHAPE_EDGE As Object

  SHAPE_POLYGON As Object

  ShapeType As Object [read only]

  SupportVertex As B2Vec2 [read only]

  TestPoint (Transform As B2Transform, Point As B2Vec2) As Boolean

Members description:

ComputeAABB (Output As B2AABB, Transform As B2Transform)
Computes the shape AABB based on the passed transform. The result is stored in the Output object.
Initialize (Radius As Float)
IsInitialized As Boolean
Radius As Float
Gets or sets the radius of the underlying shape. This can refer to different things depending on the
shape type.
SHAPE_CHAIN As Object
SHAPE_CIRCLE As Object
SHAPE_EDGE As Object
SHAPE_POLYGON As Object
ShapeType As Object [read only]
Returns the shape type which is one of the SHAPE constants.
SupportVertex As B2Vec2 [read only]
TestPoint (Transform As B2Transform, Point As B2Vec2) As Boolean
Test a point for containment in this shape. This only works for convex shapes.

Transform - the shape world transform.
Point - a point in world coordinates.

B2Contact

A contact between two bodies. Note that a contact is created whenever the bodies AABBs overlap.
Check IsTouching to find whether the two bodies are actually touching.

Events:

None

Members:


  FixtureA As B2Fixture [read only]

  FixtureB As B2Fixture [read only]

  GetManifold As B2Manifold

  GetWorldManifold (OutManifold As B2WorldManifold)

  IsEnabled As Boolean

  IsTouching As Boolean [read only]

  NextContact As B2Contact

Members description:

FixtureA As B2Fixture [read only]
Returns the first fixture. Note that the order of fixtures is not consistent.
FixtureB As B2Fixture [read only]
Returns the second fixture.
GetManifold As B2Manifold
Gets the contact manifold.
GetWorldManifold (OutManifold As B2WorldManifold)
Gets the world manifold.
IsEnabled As Boolean
Enable/disable this contact. This can be used inside the pre-solve contact listener. The
contact is only disabled for the current time step (or sub-step in continuous collisions).
IsTouching As Boolean [read only]
Returns true if the two bodies are actually touching.
NextContact As B2Contact
Returns the next contact or Null if none. Should only be used with contacts accessed with World.FirstContact.
To avoid creating new objects the current object will point to the next contact.

B2ContactImpulse


Events:

None

Members:


  GetNormalImpulse (Index As Int) As Float

  GetTangentImpulse (Index As Int) As Float

  PointCount As Int [read only]

Members description:

GetNormalImpulse (Index As Int) As Float
GetTangentImpulse (Index As Int) As Float
PointCount As Int [read only]

B2DistanceJoint

A distance joint constrains two points on two bodies to remain at a fixed distance from each
other. You can view this as a massless, rigid rod.

Events:

None

Members:


  AnchorA As B2Vec2 [read only]

  AnchorB As B2Vec2 [read only]

  BodyA As B2Body [read only]

  BodyB As B2Body [read only]

  DampingRatio As Float

  FrequencyHz As Float

  IsInitialized As Boolean [read only]

  JOINT_DISTANCE As Object

  JOINT_FRICTION As Object

  JOINT_GEAR As Object

  JOINT_MOTOR As Object

  JOINT_MOUSE As Object

  JOINT_PRISMATIC As Object

  JOINT_PULLEY As Object

  JOINT_REVOLUTE As Object

  JOINT_ROPE As Object

  JOINT_UNKNOWN As Object

  JOINT_WELD As Object

  JOINT_WHEEL As Object

  JointType As Object [read only]

  Length As Float

  NextJoint As B2Joint

  Tag As Object

Members description:

AnchorA As B2Vec2 [read only]
Gets the anchor point of BodyA in world coordinates.
AnchorB As B2Vec2 [read only]
Gets the anchor point of BodyB in world coordinates.
BodyA As B2Body [read only]
Gets the first attached body.
BodyB As B2Body [read only]
Gets the second attached body.
DampingRatio As Float
FrequencyHz As Float
IsInitialized As Boolean [read only]
JOINT_DISTANCE As Object
JOINT_FRICTION As Object
JOINT_GEAR As Object
JOINT_MOTOR As Object
JOINT_MOUSE As Object
JOINT_PRISMATIC As Object
JOINT_PULLEY As Object
JOINT_REVOLUTE As Object
JOINT_ROPE As Object
JOINT_UNKNOWN As Object
JOINT_WELD As Object
JOINT_WHEEL As Object
JointType As Object [read only]
Length As Float
NextJoint As B2Joint
Returns the next joint. Returns Null if this is the last joint.
Tag As Object

B2DistanceJointDef


Events:

None

Members:


  BodyA As B2Body [read only]

  BodyB As B2Body [read only]

  CollideConnected As Boolean

  DampingRatio As Float

  FrequencyHz As Float

  Initialize (BodyA As B2Body, BodyB As B2Body, WorldPointA As B2Vec2, WorldPointB As B2Vec2)

  Length As Float

Members description:

BodyA As B2Body [read only]
Gets the first attached body.
BodyB As B2Body [read only]
Gets the second attached body.
CollideConnected As Boolean
Gets or sets whether the attached bodies can collide.
DampingRatio As Float
Spring damping ratio, one indicates critical damping.
FrequencyHz As Float
Spring frequency, zero indicates no suspension.
Initialize (BodyA As B2Body, BodyB As B2Body, WorldPointA As B2Vec2, WorldPointB As B2Vec2)
Sets the bodies and the Connection points.
Length As Float

B2EdgeShape

A line segment (edge) shape. These can be connected in chains or loops to other edge shapes. The
connectivity information is used to ensure correct contact normals.

Events:

None

Members:


  ComputeAABB (Output As B2AABB, Transform As B2Transform)

  Initialize (FromVec As B2Vec2, ToVec As B2Vec2)

  IsInitialized As Boolean

  Radius As Float

  Set (FromVec As B2Vec2, ToVec As B2Vec2)

  SHAPE_CHAIN As Object

  SHAPE_CIRCLE As Object

  SHAPE_EDGE As Object

  SHAPE_POLYGON As Object

  ShapeType As Object [read only]

  TestPoint (Transform As B2Transform, Point As B2Vec2) As Boolean

  Vertex1 As B2Vec2 [read only]

  Vertex2 As B2Vec2 [read only]

Members description:

ComputeAABB (Output As B2AABB, Transform As B2Transform)
Computes the shape AABB based on the passed transform. The result is stored in the Output object.
Initialize (FromVec As B2Vec2, ToVec As B2Vec2)
IsInitialized As Boolean
Radius As Float
Gets or sets the radius of the underlying shape. This can refer to different things depending on the
shape type.
Set (FromVec As B2Vec2, ToVec As B2Vec2)
SHAPE_CHAIN As Object
SHAPE_CIRCLE As Object
SHAPE_EDGE As Object
SHAPE_POLYGON As Object
ShapeType As Object [read only]
Returns the shape type which is one of the SHAPE constants.
TestPoint (Transform As B2Transform, Point As B2Vec2) As Boolean
Test a point for containment in this shape. This only works for convex shapes.

Transform - the shape world transform.
Point - a point in world coordinates.
Vertex1 As B2Vec2 [read only]
Vertex2 As B2Vec2 [read only]

B2Fixture


Events:

None

Members:


  Body As B2Body [read only]

  Density As Float

  Friction As Float

  IsInitialized As Boolean [read only]

  IsSensor As Boolean

  NextFixture As B2Fixture

  Restitution As Float

  SetFilterBits (CategoryBits As Int, MaskBits As Int)

  Shape As B2Shape [read only]

  Tag As Object

Members description:

Body As B2Body [read only]
Get the body that this fixture is attached to.
Density As Float
The density, usually in kg/m^2
Friction As Float
The friction coefficient, usually in the range [0,1].
IsInitialized As Boolean [read only]
IsSensor As Boolean
A sensor shape collects contact information but never generates a collision response.
NextFixture As B2Fixture
Returns the next fixture. Returns Null if this is the last fixture.
Restitution As Float
The restitution (elasticity) usually in the range [0,1].
SetFilterBits (CategoryBits As Int, MaskBits As Int)
Limited to lower 16 bits.
CategoryBits - A bit (or more) that defines the current fixture. Default value: 1.
MaskBits - Bits defining the other fixtures that will collide with this fixture. Default value 0xFFFF.
Shape As B2Shape [read only]
Get the child shape. You can modify the child shape, however you should not change the number
of vertices because this will crash some collision caching mechanisms.
Tag As Object

B2FixtureDef


Events:

None

Members:


  Density As Float

  Friction As Float

  IsSensor As Boolean

  Restitution As Float

  SetFilterBits (CategoryBits As Int, MaskBits As Int)

  Shape As B2Shape

Members description:

Density As Float
The density, usually in kg/m^2
Friction As Float
The friction coefficient, usually in the range [0,1].
IsSensor As Boolean
A sensor shape collects contact information but never generates a collision response.
Restitution As Float
The restitution (elasticity) usually in the range [0,1].
SetFilterBits (CategoryBits As Int, MaskBits As Int)
Limited to lower 16 bits.
CategoryBits - A bit (or more) that defines the current fixture. Default value: 1.
MaskBits - Bits defining the other fixtures that will collide with this fixture. Default value 0xFFFF.
Shape As B2Shape
The shape, this must be set. The shape will be cloned when the fixture is created.

B2Joint


Events:

None

Members:


  AnchorA As B2Vec2 [read only]

  AnchorB As B2Vec2 [read only]

  BodyA As B2Body [read only]

  BodyB As B2Body [read only]

  IsInitialized As Boolean [read only]

  JOINT_DISTANCE As Object

  JOINT_FRICTION As Object

  JOINT_GEAR As Object

  JOINT_MOTOR As Object

  JOINT_MOUSE As Object

  JOINT_PRISMATIC As Object

  JOINT_PULLEY As Object

  JOINT_REVOLUTE As Object

  JOINT_ROPE As Object

  JOINT_UNKNOWN As Object

  JOINT_WELD As Object

  JOINT_WHEEL As Object

  JointType As Object [read only]

  NextJoint As B2Joint

  Tag As Object

Members description:

AnchorA As B2Vec2 [read only]
Gets the anchor point of BodyA in world coordinates.
AnchorB As B2Vec2 [read only]
Gets the anchor point of BodyB in world coordinates.
BodyA As B2Body [read only]
Gets the first attached body.
BodyB As B2Body [read only]
Gets the second attached body.
IsInitialized As Boolean [read only]
JOINT_DISTANCE As Object
JOINT_FRICTION As Object
JOINT_GEAR As Object
JOINT_MOTOR As Object
JOINT_MOUSE As Object
JOINT_PRISMATIC As Object
JOINT_PULLEY As Object
JOINT_REVOLUTE As Object
JOINT_ROPE As Object
JOINT_UNKNOWN As Object
JOINT_WELD As Object
JOINT_WHEEL As Object
JointType As Object [read only]
NextJoint As B2Joint
Returns the next joint. Returns Null if this is the last joint.
Tag As Object

B2JointDef


Events:

None

Members:


  BodyA As B2Body [read only]

  BodyB As B2Body [read only]

  CollideConnected As Boolean

Members description:

BodyA As B2Body [read only]
Gets the first attached body.
BodyB As B2Body [read only]
Gets the second attached body.
CollideConnected As Boolean
Gets or sets whether the attached bodies can collide.

B2Manifold


Events:

None

Members:


  GetManifoldPoint (Index As Int) As B2ManifoldPoint

  PointCount As Int [read only]

Members description:

GetManifoldPoint (Index As Int) As B2ManifoldPoint
PointCount As Int [read only]

B2ManifoldPoint


Events:

None

Members:


  LocalPoint As B2Vec2 [read only]

  NormalImpulse As Float [read only]

  TangentImpulse As Float [read only]

Members description:

LocalPoint As B2Vec2 [read only]
NormalImpulse As Float [read only]
TangentImpulse As Float [read only]

B2MotorJoint

A prismatic joint. This joint provides one degree of freedom: translation along an axis fixed in
bodyA. Relative rotation is prevented. You can use a joint limit to restrict the range of motion
and a joint motor to drive the motion or to model joint friction.

Events:

None

Members:


  AnchorA As B2Vec2 [read only]

  AnchorB As B2Vec2 [read only]

  AngularOffset As Float

  BodyA As B2Body [read only]

  BodyB As B2Body [read only]

  CorrectionFactor As Float

  IsInitialized As Boolean [read only]

  JOINT_DISTANCE As Object

  JOINT_FRICTION As Object

  JOINT_GEAR As Object

  JOINT_MOTOR As Object

  JOINT_MOUSE As Object

  JOINT_PRISMATIC As Object

  JOINT_PULLEY As Object

  JOINT_REVOLUTE As Object

  JOINT_ROPE As Object

  JOINT_UNKNOWN As Object

  JOINT_WELD As Object

  JOINT_WHEEL As Object

  JointType As Object [read only]

  LinearOffset As B2Vec2

  MaxMotorForce As Float

  MaxMotorTorque As Float

  NextJoint As B2Joint

  Tag As Object

Members description:

AnchorA As B2Vec2 [read only]
Gets the anchor point of BodyA in world coordinates.
AnchorB As B2Vec2 [read only]
Gets the anchor point of BodyB in world coordinates.
AngularOffset As Float
Gets or sets the target angular offset of BodyB relative to BodyA.
BodyA As B2Body [read only]
Gets the first attached body.
BodyB As B2Body [read only]
Gets the second attached body.
CorrectionFactor As Float
Gets or sets the position correction factor [0, 1].
IsInitialized As Boolean [read only]
JOINT_DISTANCE As Object
JOINT_FRICTION As Object
JOINT_GEAR As Object
JOINT_MOTOR As Object
JOINT_MOUSE As Object
JOINT_PRISMATIC As Object
JOINT_PULLEY As Object
JOINT_REVOLUTE As Object
JOINT_ROPE As Object
JOINT_UNKNOWN As Object
JOINT_WELD As Object
JOINT_WHEEL As Object
JointType As Object [read only]
LinearOffset As B2Vec2
Gets or sets the target linear offset of BodyB relative to BodyA.
MaxMotorForce As Float
Gets or sets the maximum motor force, usually in N-m.
MaxMotorTorque As Float
Gets or sets the maximum motor torque, usually in N-m.
NextJoint As B2Joint
Returns the next joint. Returns Null if this is the last joint.
Tag As Object

B2MotorJointDef


Events:

None

Members:


  AngularOffset As Float

  BodyA As B2Body [read only]

  BodyB As B2Body [read only]

  CollideConnected As Boolean

  CorrectionFactor As Float

  Initialize (BodyA As B2Body, BodyB As B2Body)

  LinearOffset As B2Vec2

  MaxMotorForce As Float

  MaxMotorTorque As Float

Members description:

AngularOffset As Float
Gets or sets the angular offset of BodyB relative to BodyA.
BodyA As B2Body [read only]
Gets the first attached body.
BodyB As B2Body [read only]
Gets the second attached body.
CollideConnected As Boolean
Gets or sets whether the attached bodies can collide.
CorrectionFactor As Float
Gets or sets the position correction factor [0, 1].
Initialize (BodyA As B2Body, BodyB As B2Body)
Sets the bodies. BodyB moves relatively to BodyA.
LinearOffset As B2Vec2
Gets or sets the linear offset of BodyB relative to BodyA.
MaxMotorForce As Float
Gets or sets the maximum motor force, usually in N-m.
MaxMotorTorque As Float
Gets or sets the maximum motor torque, usually in N-m.

B2PolygonShape

A convex polygon shape. Polygons have a maximum number of vertices equal to 8.
In most cases you should not need many vertices for a convex polygon.

Events:

None

Members:


  ComputeAABB (Output As B2AABB, Transform As B2Transform)

  GetVertex (Index As Int) As B2Vec2

  Initialize

  IsInitialized As Boolean

  Radius As Float

  Set (B2Vecs As List)

  SetAsBox (HalfWidth As Float, HalfHeight As Float)

  SetAsBox2 (HalfWidth As Float, HalfHeight As Float, Center As B2Vec2, Angle As Float)

  SHAPE_CHAIN As Object

  SHAPE_CIRCLE As Object

  SHAPE_EDGE As Object

  SHAPE_POLYGON As Object

  ShapeType As Object [read only]

  TestPoint (Transform As B2Transform, Point As B2Vec2) As Boolean

  VertexCount As Int [read only]

Members description:

ComputeAABB (Output As B2AABB, Transform As B2Transform)
Computes the shape AABB based on the passed transform. The result is stored in the Output object.
GetVertex (Index As Int) As B2Vec2
Gets the vertex at the given index.
Initialize
IsInitialized As Boolean
Radius As Float
Gets or sets the radius of the underlying shape. This can refer to different things depending on the
shape type.
Set (B2Vecs As List)
Creates a convex polygon. Maximum number of vertices is 8.
SetAsBox (HalfWidth As Float, HalfHeight As Float)
Creates a box polygon.
SetAsBox2 (HalfWidth As Float, HalfHeight As Float, Center As B2Vec2, Angle As Float)
Creates a box polygon.
HalfWidth / HalfHeight - Box dimensions.
Center - Box center in local coordinates.
Angle - Box rotation in local coordinates (radians).
SHAPE_CHAIN As Object
SHAPE_CIRCLE As Object
SHAPE_EDGE As Object
SHAPE_POLYGON As Object
ShapeType As Object [read only]
Returns the shape type which is one of the SHAPE constants.
TestPoint (Transform As B2Transform, Point As B2Vec2) As Boolean
Test a point for containment in this shape. This only works for convex shapes.

Transform - the shape world transform.
Point - a point in world coordinates.
VertexCount As Int [read only]
Returns the number of vertex.

B2PrismaticJoint

A prismatic joint. This joint provides one degree of freedom: translation along an axis fixed in
bodyA. Relative rotation is prevented. You can use a joint limit to restrict the range of motion
and a joint motor to drive the motion or to model joint friction.

Events:

None

Members:


  AnchorA As B2Vec2 [read only]

  AnchorB As B2Vec2 [read only]

  BodyA As B2Body [read only]

  BodyB As B2Body [read only]

  IsInitialized As Boolean [read only]

  JOINT_DISTANCE As Object

  JOINT_FRICTION As Object

  JOINT_GEAR As Object

  JOINT_MOTOR As Object

  JOINT_MOUSE As Object

  JOINT_PRISMATIC As Object

  JOINT_PULLEY As Object

  JOINT_REVOLUTE As Object

  JOINT_ROPE As Object

  JOINT_UNKNOWN As Object

  JOINT_WELD As Object

  JOINT_WHEEL As Object

  JointSpeed As Float [read only]

  JointTranslation As Float [read only]

  JointType As Object [read only]

  LimitEnabled As Boolean

  LocalAnchorA As B2Vec2 [read only]

  LocalAnchorB As B2Vec2 [read only]

  LowerLimit As Float [read only]

  MaxMotorForce As Float

  MotorEnabled As Boolean

  MotorSpeed As Float

  NextJoint As B2Joint

  SetLimits (LowerLimit As Float, UpperLimit As Float)

  Tag As Object

  UpperLimit As Float [read only]

Members description:

AnchorA As B2Vec2 [read only]
Gets the anchor point of BodyA in world coordinates.
AnchorB As B2Vec2 [read only]
Gets the anchor point of BodyB in world coordinates.
BodyA As B2Body [read only]
Gets the first attached body.
BodyB As B2Body [read only]
Gets the second attached body.
IsInitialized As Boolean [read only]
JOINT_DISTANCE As Object
JOINT_FRICTION As Object
JOINT_GEAR As Object
JOINT_MOTOR As Object
JOINT_MOUSE As Object
JOINT_PRISMATIC As Object
JOINT_PULLEY As Object
JOINT_REVOLUTE As Object
JOINT_ROPE As Object
JOINT_UNKNOWN As Object
JOINT_WELD As Object
JOINT_WHEEL As Object
JointSpeed As Float [read only]
Gets the current joint speed in meters per second.
JointTranslation As Float [read only]
Gets the current joint translation in meters.
JointType As Object [read only]
LimitEnabled As Boolean
Gets or sets whether the limits are enabled.
LocalAnchorA As B2Vec2 [read only]
LocalAnchorB As B2Vec2 [read only]
LowerLimit As Float [read only]
Gets the lower limit in meters.
MaxMotorForce As Float
Gets or sets the maximum motor force, usually in N-m.
MotorEnabled As Boolean
Gets or sets whether the motor is enabled.
MotorSpeed As Float
Gets or sets the motor speed in meters per second.
NextJoint As B2Joint
Returns the next joint. Returns Null if this is the last joint.
SetLimits (LowerLimit As Float, UpperLimit As Float)
Sets the lower and upper limits measured in meters.
Tag As Object
UpperLimit As Float [read only]
Gets the upper limit in meters.

B2PrismaticJointDef


Events:

None

Members:


  BodyA As B2Body [read only]

  BodyB As B2Body [read only]

  CollideConnected As Boolean

  Initialize (BodyA As B2Body, BodyB As B2Body, AnchorPoint As B2Vec2, Axis As B2Vec2)

  LimitEnabled As Boolean

  LowerLimit As Float [read only]

  MaxMotorForce As Float

  MotorEnabled As Boolean

  MotorSpeed As Float

  SetLimits (LowerLimit As Float, UpperLimit As Float)

  UpperLimit As Float [read only]

Members description:

BodyA As B2Body [read only]
Gets the first attached body.
BodyB As B2Body [read only]
Gets the second attached body.
CollideConnected As Boolean
Gets or sets whether the attached bodies can collide.
Initialize (BodyA As B2Body, BodyB As B2Body, AnchorPoint As B2Vec2, Axis As B2Vec2)
Sets the bodies and the anchor based on the current positions.
LimitEnabled As Boolean
Gets or sets whether the limits are enabled.
LowerLimit As Float [read only]
Gets the lower limit in meters.
MaxMotorForce As Float
Gets or sets the maximum motor force, usually in N-m.
MotorEnabled As Boolean
Gets or sets whether the motor is enabled.
MotorSpeed As Float
Gets or sets the motor speed in radians per second.
SetLimits (LowerLimit As Float, UpperLimit As Float)
Sets the lower and upper limits measured in meters.
UpperLimit As Float [read only]
Gets the upper limit in meters.

B2RevoluteJoint

A revolute joint constrains two bodies to share a common point while they are free to rotate
about the point. The relative rotation about the shared point is the joint angle. You can limit
the relative rotation with a joint limit that specifies a lower and upper angle. You can use a
motor to drive the relative rotation about the shared point. A maximum motor torque is provided
so that infinite forces are not generated.

Events:

None

Members:


  AnchorA As B2Vec2 [read only]

  AnchorB As B2Vec2 [read only]

  BodyA As B2Body [read only]

  BodyB As B2Body [read only]

  IsInitialized As Boolean [read only]

  JOINT_DISTANCE As Object

  JOINT_FRICTION As Object

  JOINT_GEAR As Object

  JOINT_MOTOR As Object

  JOINT_MOUSE As Object

  JOINT_PRISMATIC As Object

  JOINT_PULLEY As Object

  JOINT_REVOLUTE As Object

  JOINT_ROPE As Object

  JOINT_UNKNOWN As Object

  JOINT_WELD As Object

  JOINT_WHEEL As Object

  JointAngle As Float [read only]

  JointSpeed As Float [read only]

  JointType As Object [read only]

  LimitEnabled As Boolean

  LocalAnchorA As B2Vec2 [read only]

  LocalAnchorB As B2Vec2 [read only]

  LowerLimit As Float [read only]

  MaxMotorTorque As Float

  MotorEnabled As Boolean

  MotorSpeed As Float

  NextJoint As B2Joint

  SetLimits (LowerLimit As Float, UpperLimit As Float)

  Tag As Object

  UpperLimit As Float [read only]

Members description:

AnchorA As B2Vec2 [read only]
Gets the anchor point of BodyA in world coordinates.
AnchorB As B2Vec2 [read only]
Gets the anchor point of BodyB in world coordinates.
BodyA As B2Body [read only]
Gets the first attached body.
BodyB As B2Body [read only]
Gets the second attached body.
IsInitialized As Boolean [read only]
JOINT_DISTANCE As Object
JOINT_FRICTION As Object
JOINT_GEAR As Object
JOINT_MOTOR As Object
JOINT_MOUSE As Object
JOINT_PRISMATIC As Object
JOINT_PULLEY As Object
JOINT_REVOLUTE As Object
JOINT_ROPE As Object
JOINT_UNKNOWN As Object
JOINT_WELD As Object
JOINT_WHEEL As Object
JointAngle As Float [read only]
Gets the current joint angle in radians.
JointSpeed As Float [read only]
Gets the current joint speed in radians per second.
JointType As Object [read only]
LimitEnabled As Boolean
Gets or sets whether the limits are enabled.
LocalAnchorA As B2Vec2 [read only]
LocalAnchorB As B2Vec2 [read only]
LowerLimit As Float [read only]
Gets the lower limit in radians.
MaxMotorTorque As Float
Gets or sets the maximum motor torque, usually in N-m.
MotorEnabled As Boolean
Gets or sets whether the motor is enabled.
MotorSpeed As Float
Gets or sets the motor speed in radians per second.
NextJoint As B2Joint
Returns the next joint. Returns Null if this is the last joint.
SetLimits (LowerLimit As Float, UpperLimit As Float)
Sets the lower and upper limits measured in radians.
Tag As Object
UpperLimit As Float [read only]
Gets the upper limit in radians.

B2RevoluteJointDef


Events:

None

Members:


  BodyA As B2Body [read only]

  BodyB As B2Body [read only]

  CollideConnected As Boolean

  Initialize (BodyA As B2Body, BodyB As B2Body, AnchorPoint As B2Vec2)

  LimitEnabled As Boolean

  LowerLimit As Float [read only]

  MaxMotorTorque As Float

  MotorEnabled As Boolean

  MotorSpeed As Float

  SetLimits (LowerLimit As Float, UpperLimit As Float)

  UpperLimit As Float [read only]

Members description:

BodyA As B2Body [read only]
Gets the first attached body.
BodyB As B2Body [read only]
Gets the second attached body.
CollideConnected As Boolean
Gets or sets whether the attached bodies can collide.
Initialize (BodyA As B2Body, BodyB As B2Body, AnchorPoint As B2Vec2)
Sets the bodies and the anchor based on the current positions.
LimitEnabled As Boolean
Gets or sets whether the limits are enabled.
LowerLimit As Float [read only]
Gets the lower limit in radians.
MaxMotorTorque As Float
Gets or sets the maximum motor torque, usually in N-m.
MotorEnabled As Boolean
Gets or sets whether the motor is enabled.
MotorSpeed As Float
Gets or sets the motor speed in radians per second.
SetLimits (LowerLimit As Float, UpperLimit As Float)
Sets the lower and upper limits measured in radians.
UpperLimit As Float [read only]
Gets the upper limit in radians.

B2RopeJoint

A rope joint enforces a maximum distance between two points on two bodies. It has no other
effect.

Events:

None

Members:


  AnchorA As B2Vec2 [read only]

  AnchorB As B2Vec2 [read only]

  BodyA As B2Body [read only]

  BodyB As B2Body [read only]

  IsInitialized As Boolean [read only]

  JOINT_DISTANCE As Object

  JOINT_FRICTION As Object

  JOINT_GEAR As Object

  JOINT_MOTOR As Object

  JOINT_MOUSE As Object

  JOINT_PRISMATIC As Object

  JOINT_PULLEY As Object

  JOINT_REVOLUTE As Object

  JOINT_ROPE As Object

  JOINT_UNKNOWN As Object

  JOINT_WELD As Object

  JOINT_WHEEL As Object

  JointType As Object [read only]

  MaxLength As Float

  NextJoint As B2Joint

  Tag As Object

Members description:

AnchorA As B2Vec2 [read only]
Gets the anchor point of BodyA in world coordinates.
AnchorB As B2Vec2 [read only]
Gets the anchor point of BodyB in world coordinates.
BodyA As B2Body [read only]
Gets the first attached body.
BodyB As B2Body [read only]
Gets the second attached body.
IsInitialized As Boolean [read only]
JOINT_DISTANCE As Object
JOINT_FRICTION As Object
JOINT_GEAR As Object
JOINT_MOTOR As Object
JOINT_MOUSE As Object
JOINT_PRISMATIC As Object
JOINT_PULLEY As Object
JOINT_REVOLUTE As Object
JOINT_ROPE As Object
JOINT_UNKNOWN As Object
JOINT_WELD As Object
JOINT_WHEEL As Object
JointType As Object [read only]
MaxLength As Float
Gets or sets the rope maximum length.
NextJoint As B2Joint
Returns the next joint. Returns Null if this is the last joint.
Tag As Object

B2RopeJointDef


Events:

None

Members:


  BodyA As B2Body [read only]

  BodyB As B2Body [read only]

  CollideConnected As Boolean

  Initialize (BodyA As B2Body, BodyB As B2Body, LocalPointA As B2Vec2, LocalPointB As B2Vec2, MaxLength As Float)

Members description:

BodyA As B2Body [read only]
Gets the first attached body.
BodyB As B2Body [read only]
Gets the second attached body.
CollideConnected As Boolean
Gets or sets whether the attached bodies can collide.
Initialize (BodyA As B2Body, BodyB As B2Body, LocalPointA As B2Vec2, LocalPointB As B2Vec2, MaxLength As Float)
Sets the bodies and the local connections points.

B2Shape


Events:

None

Members:


  ComputeAABB (Output As B2AABB, Transform As B2Transform)

  IsInitialized As Boolean

  Radius As Float

  SHAPE_CHAIN As Object

  SHAPE_CIRCLE As Object

  SHAPE_EDGE As Object

  SHAPE_POLYGON As Object

  ShapeType As Object [read only]

  TestPoint (Transform As B2Transform, Point As B2Vec2) As Boolean

Members description:

ComputeAABB (Output As B2AABB, Transform As B2Transform)
Computes the shape AABB based on the passed transform. The result is stored in the Output object.
IsInitialized As Boolean
Radius As Float
Gets or sets the radius of the underlying shape. This can refer to different things depending on the
shape type.
SHAPE_CHAIN As Object
SHAPE_CIRCLE As Object
SHAPE_EDGE As Object
SHAPE_POLYGON As Object
ShapeType As Object [read only]
Returns the shape type which is one of the SHAPE constants.
TestPoint (Transform As B2Transform, Point As B2Vec2) As Boolean
Test a point for containment in this shape. This only works for convex shapes.

Transform - the shape world transform.
Point - a point in world coordinates.

B2Transform


Events:

None

Members:


  Angle As Float

  Initialize

  MultiplyRot (v As B2Vec2) As B2Vec2

  Translation As B2Vec2

Members description:

Angle As Float
Gets or sets the rotation caused by the transform
Initialize
Creates a new identity transform.
MultiplyRot (v As B2Vec2) As B2Vec2
Multiplies the vector with the transformation rotation matrix.
Translation As B2Vec2
Gets or sets the translation caused by the transform

B2Vec2


Events:

None

Members:


  AddToThis (Other As B2Vec2)

  CreateCopy As B2Vec2

  Equals (Other As B2Vec2) As Boolean

  Length As Float [read only]

  LengthSquared As Float [read only]

  MultiplyThis (Scalar As Float)

  Negate As B2Vec2

  NormalizeThis As Float

  Set (X As Float, Y As Float)

  SubtractFromThis (Other As B2Vec2)

  X As Float

  Y As Float

Members description:

AddToThis (Other As B2Vec2)
Add another vector to this one and returns result - alters this vector.
CreateCopy As B2Vec2
Creates a copy of the current vector.
Equals (Other As B2Vec2) As Boolean
Tests whether the two vectors are equal.
Length As Float [read only]
Return the length of this vector.
LengthSquared As Float [read only]
Return the squared length of this vector.
MultiplyThis (Scalar As Float)
Multiply this vector by a number and return result - alters this vector.
Negate As B2Vec2
Return the negation of this vector; does not alter this vector.
NormalizeThis As Float
Normalize this vector and return the length before normalization. Alters this vector.
Set (X As Float, Y As Float)
Set the vector component-wise.
SubtractFromThis (Other As B2Vec2)
Subtract another vector from this one and return result - alters this vector.
X As Float
Y As Float

B2WeldJoint

A joint that strictly connects two bodies together.

Events:

None

Members:


  AnchorA As B2Vec2 [read only]

  AnchorB As B2Vec2 [read only]

  BodyA As B2Body [read only]

  BodyB As B2Body [read only]

  IsInitialized As Boolean [read only]

  JOINT_DISTANCE As Object

  JOINT_FRICTION As Object

  JOINT_GEAR As Object

  JOINT_MOTOR As Object

  JOINT_MOUSE As Object

  JOINT_PRISMATIC As Object

  JOINT_PULLEY As Object

  JOINT_REVOLUTE As Object

  JOINT_ROPE As Object

  JOINT_UNKNOWN As Object

  JOINT_WELD As Object

  JOINT_WHEEL As Object

  JointType As Object [read only]

  NextJoint As B2Joint

  Tag As Object

Members description:

AnchorA As B2Vec2 [read only]
Gets the anchor point of BodyA in world coordinates.
AnchorB As B2Vec2 [read only]
Gets the anchor point of BodyB in world coordinates.
BodyA As B2Body [read only]
Gets the first attached body.
BodyB As B2Body [read only]
Gets the second attached body.
IsInitialized As Boolean [read only]
JOINT_DISTANCE As Object
JOINT_FRICTION As Object
JOINT_GEAR As Object
JOINT_MOTOR As Object
JOINT_MOUSE As Object
JOINT_PRISMATIC As Object
JOINT_PULLEY As Object
JOINT_REVOLUTE As Object
JOINT_ROPE As Object
JOINT_UNKNOWN As Object
JOINT_WELD As Object
JOINT_WHEEL As Object
JointType As Object [read only]
NextJoint As B2Joint
Returns the next joint. Returns Null if this is the last joint.
Tag As Object

B2WeldJointDef


Events:

None

Members:


  BodyA As B2Body [read only]

  BodyB As B2Body [read only]

  CollideConnected As Boolean

  Initialize (BodyA As B2Body, BodyB As B2Body, AnchorPoint As B2Vec2)

Members description:

BodyA As B2Body [read only]
Gets the first attached body.
BodyB As B2Body [read only]
Gets the second attached body.
CollideConnected As Boolean
Gets or sets whether the attached bodies can collide.
Initialize (BodyA As B2Body, BodyB As B2Body, AnchorPoint As B2Vec2)
Sets the bodies and the anchor based on the current positions.

B2WheelJoint

Wheel joint definition. This requires defining a line of motion using an axis and an anchor
point. The definition uses local anchor points and a local axis so that the initial configuration
can violate the constraint slightly.

Events:

None

Members:


  AnchorA As B2Vec2 [read only]

  AnchorB As B2Vec2 [read only]

  BodyA As B2Body [read only]

  BodyB As B2Body [read only]

  DampingRatio As Float

  FrequencyHz As Float

  IsInitialized As Boolean [read only]

  JOINT_DISTANCE As Object

  JOINT_FRICTION As Object

  JOINT_GEAR As Object

  JOINT_MOTOR As Object

  JOINT_MOUSE As Object

  JOINT_PRISMATIC As Object

  JOINT_PULLEY As Object

  JOINT_REVOLUTE As Object

  JOINT_ROPE As Object

  JOINT_UNKNOWN As Object

  JOINT_WELD As Object

  JOINT_WHEEL As Object

  JointSpeed As Float [read only]

  JointType As Object [read only]

  LocalAnchorA As B2Vec2 [read only]

  LocalAnchorB As B2Vec2 [read only]

  MaxMotorTorque As Float

  MotorEnabled As Boolean

  MotorSpeed As Float

  NextJoint As B2Joint

  Tag As Object

Members description:

AnchorA As B2Vec2 [read only]
Gets the anchor point of BodyA in world coordinates.
AnchorB As B2Vec2 [read only]
Gets the anchor point of BodyB in world coordinates.
BodyA As B2Body [read only]
Gets the first attached body.
BodyB As B2Body [read only]
Gets the second attached body.
DampingRatio As Float
FrequencyHz As Float
IsInitialized As Boolean [read only]
JOINT_DISTANCE As Object
JOINT_FRICTION As Object
JOINT_GEAR As Object
JOINT_MOTOR As Object
JOINT_MOUSE As Object
JOINT_PRISMATIC As Object
JOINT_PULLEY As Object
JOINT_REVOLUTE As Object
JOINT_ROPE As Object
JOINT_UNKNOWN As Object
JOINT_WELD As Object
JOINT_WHEEL As Object
JointSpeed As Float [read only]
Gets the current joint speed in radians per second.
JointType As Object [read only]
LocalAnchorA As B2Vec2 [read only]
LocalAnchorB As B2Vec2 [read only]
MaxMotorTorque As Float
Gets or sets the maximum motor torque, usually in N-m.
MotorEnabled As Boolean
Gets or sets whether the motor is enabled.
MotorSpeed As Float
Gets or sets the motor speed in radians per second.
NextJoint As B2Joint
Returns the next joint. Returns Null if this is the last joint.
Tag As Object

B2WheelJointDef


Events:

None

Members:


  BodyA As B2Body [read only]

  BodyB As B2Body [read only]

  CollideConnected As Boolean

  DampingRatio As Float

  FrequencyHz As Float

  Initialize (BodyA As B2Body, BodyB As B2Body, AnchorPoint As B2Vec2, Axis As B2Vec2)

  MaxMotorTorque As Float

  MotorEnabled As Boolean

  MotorSpeed As Float

Members description:

BodyA As B2Body [read only]
Gets the first attached body.
BodyB As B2Body [read only]
Gets the second attached body.
CollideConnected As Boolean
Gets or sets whether the attached bodies can collide.
DampingRatio As Float
Suspension damping ratio, one indicates critical damping.
FrequencyHz As Float
Suspension frequency, zero indicates no suspension.
Initialize (BodyA As B2Body, BodyB As B2Body, AnchorPoint As B2Vec2, Axis As B2Vec2)
Sets the bodies and the anchor based on the current positions.
MaxMotorTorque As Float
Gets or sets the maximum motor torque, usually in N-m.
MotorEnabled As Boolean
Gets or sets whether the motor is enabled.
MotorSpeed As Float
Gets or sets the motor speed in radians per second.

B2World


Events:

BeginContact (Contact As B2Contact)
EndContact (Contact As B2Contact)
PreSolve (Contact As B2Contact, OldManifold As B2Manifold)
PostSolve (Contact As B2Contact, Impulse As B2ContactImpulse)
RayCastCallback (Fixture As B2Fixture, Point As B2Vec2, Normal As B2Vec2, Fraction As Float) As Float

Members:


  AllBodies As List [read only]

  CreateBody (BodyDef As B2BodyDef) As B2Body

  CreateJoint (JointDef As B2JointDef) As B2Joint

  CreateVec2 (X As Float, Y As Float) As B2Vec2

  DestroyBody (Body As B2Body)

  DestroyJoint (Joint As B2Joint)

  DynamicBodies As List [read only]

  FirstContact As B2Contact

  FirstJoint As B2Joint

  Gravity As B2Vec2

  Initialize (EventName As String, Gravity As B2Vec2)

  Locked As Boolean [read only]

  QueryAABBToListOfFixtures (AABB As B2AABB) As List

  QueryAABBToMapOfBodies (AABB As B2AABB) As Map

  RayCast (FromVec As B2Vec2, ToVec As B2Vec2)

  sayGoodbye (joint As org.jbox2d.dynamics.joints.Joint)

  TimeStep (TimeStep As Float, VelocityIterations As Int, PositionIterations As Int)

Members description:

AllBodies As List [read only]
Returns a list with all the bodies.
CreateBody (BodyDef As B2BodyDef) As B2Body
Create a rigid body given a definition.
This function is locked during callbacks.
CreateJoint (JointDef As B2JointDef) As B2Joint
CreateVec2 (X As Float, Y As Float) As B2Vec2
Created a B2Vec2 vector.
DestroyBody (Body As B2Body)
This automatically deletes all associated shapes and joints.
This function is locked during callbacks.
DestroyJoint (Joint As B2Joint)
DynamicBodies As List [read only]
Returns a list with all the bodies with dynamic body type.
FirstContact As B2Contact
Returns the first contact. Note that the list of contacts includes non-touching contacts.
Example:
Dim contact As B2Contact = world.FirstContact
Do While contact <> Null
  If contact.IsTouching Then
    '...
  End If
  contact = contact.NextContact
Loop
FirstJoint As B2Joint
Gravity As B2Vec2
Gets or sets the world gravity.
Initialize (EventName As String, Gravity As B2Vec2)
Initializes the world and sets its gravity.
Locked As Boolean [read only]
Returns True if the world is currently locked for changes.
QueryAABBToListOfFixtures (AABB As B2AABB) As List
Queries the world for all fixtures that potentially overlap the given AABB.
Returns a List. Each item in the list is a B2Fixture.
QueryAABBToMapOfBodies (AABB As B2AABB) As Map
Queries the world for all fixtures that potentially overlap the given AABB.
Returns a Map with the bodies as keys. The map values are not used.
RayCast (FromVec As B2Vec2, ToVec As B2Vec2)
Ray-cast the world for all fixtures in the path of the ray, going from FromVec to ToVec. Your callback controls whether you
get the closest point, any point, or n-points. The ray-cast ignores shapes that contain the
starting point.

The RayCastCallback event will be raised. The return value from this event determines the behavior:
0 - Terminate the ray cast.
Fraction - Clip the ray to this point.
1 - Do not clip the ray and continue.
-1 - Ignore this fixture.
sayGoodbye (joint As org.jbox2d.dynamics.joints.Joint)
TimeStep (TimeStep As Float, VelocityIterations As Int, PositionIterations As Int)
Take a time step. This performs collision detection, integration, and constraint solution.

TimeStep - the amount of time to simulate, this should not vary.
VelocityIterations - for the velocity constraint solver.
PositionIterations - for the position constraint solver.

B2WorldManifold


Events:

None

Members:


  GetPoint (Index As Int) As B2Vec2

  Normal As B2Vec2 [read only]

  PointCount As Int

Members description:

GetPoint (Index As Int) As B2Vec2
World contact point (point of intersection)
Normal As B2Vec2 [read only]
PointCount As Int

Top