Class PrismaticJoint
- Namespace
- Jitter2.Dynamics.Constraints
- Assembly
- Jitter2.dll
Constructs a prismatic joint utilizing a PointOnLine constraint in conjunction with FixedAngle, HingeAngle, and LinearMotor constraints.
public class PrismaticJoint : Joint, IDebugDrawable
- Inheritance
-
PrismaticJoint
- Implements
- Inherited Members
Constructors
PrismaticJoint(World, RigidBody, RigidBody, JVector, JVector, LinearLimit, bool, bool)
Initializes a new prismatic joint.
public PrismaticJoint(World world, RigidBody body1, RigidBody body2, JVector center, JVector axis, LinearLimit limit, bool pinned = true, bool hasMotor = false)
Parameters
worldWorldbody1RigidBodybody2RigidBodycenterJVectoraxisJVectorlimitLinearLimitpinnedboolhasMotorbool
Exceptions
- ArgumentException
Thrown when
centercontains a non-finite value, whenaxisis zero or contains a non-finite value, when either limit value is NaN, when either body does not belong toworld, or when both body references are the same.
PrismaticJoint(World, RigidBody, RigidBody, JVector, JVector, bool, bool)
Initializes a new prismatic joint.
public PrismaticJoint(World world, RigidBody body1, RigidBody body2, JVector center, JVector axis, bool pinned = true, bool hasMotor = false)
Parameters
Exceptions
- ArgumentException
Thrown when
centercontains a non-finite value, whenaxisis zero or contains a non-finite value, when either limit value is NaN, when either body does not belong toworld, or when both body references are the same.
Properties
Body1
public RigidBody Body1 { get; }
Property Value
Body2
public RigidBody Body2 { get; }
Property Value
FixedAngle
public FixedAngle? FixedAngle { get; }
Property Value
HingeAngle
public HingeAngle? HingeAngle { get; }
Property Value
Motor
public LinearMotor? Motor { get; }
Property Value
Slider
public PointOnLine Slider { get; }