C# 클래스 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.
상속: JointDef
파일 보기 프로젝트 열기: gerich-home/box2dnet 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
EnableLimit bool
EnableMotor bool
LocalAnchorA Box2D.Common.Vec2
LocalAnchorB Box2D.Common.Vec2
LowerAngle float
MaxMotorTorque float
MotorSpeed float
ReferenceAngle float
UpperAngle float

공개 메소드들

메소드 설명
Initialize ( Body b1, Body b2, Vec2 anchor ) : void

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

RevoluteJointDef ( ) : Box2D.Common

메소드 상세

Initialize() 공개 메소드

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
리턴 void

RevoluteJointDef() 공개 메소드

public RevoluteJointDef ( ) : Box2D.Common
리턴 Box2D.Common

프로퍼티 상세

EnableLimit 공개적으로 프로퍼티

A flag to enable joint limits.
public bool EnableLimit
리턴 bool

EnableMotor 공개적으로 프로퍼티

A flag to enable the joint motor.
public bool EnableMotor
리턴 bool

LocalAnchorA 공개적으로 프로퍼티

The local anchor point relative to body1's origin.
public Vec2,Box2D.Common LocalAnchorA
리턴 Box2D.Common.Vec2

LocalAnchorB 공개적으로 프로퍼티

The local anchor point relative to body2's origin.
public Vec2,Box2D.Common LocalAnchorB
리턴 Box2D.Common.Vec2

LowerAngle 공개적으로 프로퍼티

The lower angle for the joint limit (radians).
public float LowerAngle
리턴 float

MaxMotorTorque 공개적으로 프로퍼티

The maximum motor torque used to achieve the desired motor speed. Usually in N-m.
public float MaxMotorTorque
리턴 float

MotorSpeed 공개적으로 프로퍼티

The desired motor speed. Usually in radians per second.
public float MotorSpeed
리턴 float

ReferenceAngle 공개적으로 프로퍼티

The body2 angle minus body1 angle in the reference state (radians).
public float ReferenceAngle
리턴 float

UpperAngle 공개적으로 프로퍼티

The upper angle for the joint limit (radians).
public float UpperAngle
리턴 float