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
worldWorldbody1RigidBodybody2RigidBodyhingeCenterJVectorhingeAxisJVectorangleAngularLimithasMotorbool
Exceptions
- ArgumentException
Thrown when
hingeCentercontains a non-finite value, whenhingeAxisis zero or contains a non-finite value, when either body does not belong toworld, 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
Exceptions
- ArgumentException
Thrown when
hingeCentercontains a non-finite value, whenhingeAxisis zero or contains a non-finite value, when either body does not belong toworld, or when both body references are the same.
Properties
BallSocket
public BallSocket BallSocket { get; }
Property Value
Body1
public RigidBody Body1 { get; }
Property Value
Body2
public RigidBody Body2 { get; }
Property Value
HingeAngle
public HingeAngle HingeAngle { get; }
Property Value
Motor
public AngularMotor? Motor { get; }