Table of Contents

Class HingeJoint

Namespace
Jitter2.Dynamics.Constraints
Assembly
Jitter2.dll

Constructs a hinge joint utilizing a HingeAngle, a BallSocket, and an optional AngularMotor.

public class HingeJoint : Joint, IDebugDrawable
Inheritance
HingeJoint
Implements
Inherited Members

Constructors

HingeJoint(World, RigidBody, RigidBody, JVector, JVector, AngularLimit, bool)

Initializes a new hinge joint.

public HingeJoint(World world, RigidBody body1, RigidBody body2, JVector hingeCenter, JVector hingeAxis, AngularLimit angle, bool hasMotor = false)

Parameters

world World
body1 RigidBody
body2 RigidBody
hingeCenter JVector
hingeAxis JVector
angle AngularLimit
hasMotor bool

Exceptions

ArgumentException

Thrown when hingeCenter contains a non-finite value, when hingeAxis is zero or contains a non-finite value, when either body does not belong to world, or when both body references are the same.

HingeJoint(World, RigidBody, RigidBody, JVector, JVector, bool)

Initializes a new hinge joint.

public HingeJoint(World world, RigidBody body1, RigidBody body2, JVector hingeCenter, JVector hingeAxis, bool hasMotor = false)

Parameters

world World
body1 RigidBody
body2 RigidBody
hingeCenter JVector
hingeAxis JVector
hasMotor bool

Exceptions

ArgumentException

Thrown when hingeCenter contains a non-finite value, when hingeAxis is zero or contains a non-finite value, when either body does not belong to world, or when both body references are the same.

Properties

BallSocket

public BallSocket BallSocket { get; }

Property Value

BallSocket

Body1

public RigidBody Body1 { get; }

Property Value

RigidBody

Body2

public RigidBody Body2 { get; }

Property Value

RigidBody

HingeAngle

public HingeAngle HingeAngle { get; }

Property Value

HingeAngle

Motor

public AngularMotor? Motor { get; }

Property Value

AngularMotor