Table of Contents

Class UniversalJoint

Namespace
Jitter2.Dynamics.Constraints
Assembly
Jitter2.dll

Creates a universal joint using a TwistAngle and a BallSocket, with an optional AngularMotor or AngularServo.

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

Constructors

UniversalJoint(World, RigidBody, RigidBody, JVector, JVector, JVector, JointDrive)

Initializes a new universal joint.

public UniversalJoint(World world, RigidBody body1, RigidBody body2, JVector center, JVector rotateAxis1, JVector rotateAxis2, JointDrive drive = JointDrive.None)

Parameters

world World
body1 RigidBody
body2 RigidBody
center JVector
rotateAxis1 JVector
rotateAxis2 JVector
drive JointDrive

The optional drive. Motor and servo torque default to zero.

Exceptions

ArgumentOutOfRangeException

The drive selection is invalid.

ArgumentException

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

UniversalJoint(World, RigidBody, RigidBody, JVector, JVector, JVector, bool)

Initializes a new universal joint.

[Obsolete("Use the overload accepting JointDrive instead of hasMotor.")]
public UniversalJoint(World world, RigidBody body1, RigidBody body2, JVector center, JVector rotateAxis1, JVector rotateAxis2, bool hasMotor)

Parameters

world World
body1 RigidBody
body2 RigidBody
center JVector
rotateAxis1 JVector
rotateAxis2 JVector
hasMotor bool

Exceptions

ArgumentOutOfRangeException

The drive selection is invalid.

ArgumentException

Thrown when center contains a non-finite value, when either rotation axis 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

Motor

public AngularMotor? Motor { get; }

Property Value

AngularMotor

Servo

public AngularServo? Servo { get; }

Property Value

AngularServo

TwistAngle

public TwistAngle TwistAngle { get; }

Property Value

TwistAngle