C# Class Box2D.Dynamics.Joints.RevoluteJointDef

Revolute joint definition. This requires defining an anchor point where the bodies are joined. The definition uses local anchor points so that the initial configuration can violate the constraint slightly. You also need to specify the initial relative angle for joint limits. This helps when saving and loading a game. The local anchor points are measured from the body's origin rather than the center of mass because:
  • you might not know where the center of mass will be.
  • if you add/remove shapes from a body and recompute the mass, the joints will be broken.
Inheritance: JointDef
Afficher le fichier Open project: gerich-home/box2dnet Class Usage Examples

Méthodes publiques

Свойство Type Description
EnableLimit bool
EnableMotor bool
LocalAnchorA Box2D.Common.Vec2
LocalAnchorB Box2D.Common.Vec2
LowerAngle float
MaxMotorTorque float
MotorSpeed float
ReferenceAngle float
UpperAngle float

Méthodes publiques

Méthode Description
Initialize ( Body b1, Body b2, Vec2 anchor ) : void

Initialize the bodies, anchors, and reference angle using the world anchor.

RevoluteJointDef ( ) : Box2D.Common

Method Details

Initialize() public méthode

Initialize the bodies, anchors, and reference angle using the world anchor.
public Initialize ( Body b1, Body b2, Vec2 anchor ) : void
b1 Body
b2 Body
anchor Box2D.Common.Vec2
Résultat void

RevoluteJointDef() public méthode

public RevoluteJointDef ( ) : Box2D.Common
Résultat Box2D.Common

Property Details

EnableLimit public_oe property

A flag to enable joint limits.
public bool EnableLimit
Résultat bool

EnableMotor public_oe property

A flag to enable the joint motor.
public bool EnableMotor
Résultat bool

LocalAnchorA public_oe property

The local anchor point relative to body1's origin.
public Vec2,Box2D.Common LocalAnchorA
Résultat Box2D.Common.Vec2

LocalAnchorB public_oe property

The local anchor point relative to body2's origin.
public Vec2,Box2D.Common LocalAnchorB
Résultat Box2D.Common.Vec2

LowerAngle public_oe property

The lower angle for the joint limit (radians).
public float LowerAngle
Résultat float

MaxMotorTorque public_oe property

The maximum motor torque used to achieve the desired motor speed. Usually in N-m.
public float MaxMotorTorque
Résultat float

MotorSpeed public_oe property

The desired motor speed. Usually in radians per second.
public float MotorSpeed
Résultat float

ReferenceAngle public_oe property

The body2 angle minus body1 angle in the reference state (radians).
public float ReferenceAngle
Résultat float

UpperAngle public_oe property

The upper angle for the joint limit (radians).
public float UpperAngle
Résultat float