Table of Contents

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

world World
body1 RigidBody
body2 RigidBody
center JVector
axis JVector
limit LinearLimit
pinned bool
hasMotor bool

Exceptions

ArgumentException

Thrown when center contains a non-finite value, when axis is zero or contains a non-finite value, when either limit value is NaN, when either body does not belong to world, 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

world World
body1 RigidBody
body2 RigidBody
center JVector
axis JVector
pinned bool
hasMotor bool

Exceptions

ArgumentException

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

Properties

Body1

public RigidBody Body1 { get; }

Property Value

RigidBody

Body2

public RigidBody Body2 { get; }

Property Value

RigidBody

FixedAngle

public FixedAngle? FixedAngle { get; }

Property Value

FixedAngle

HingeAngle

public HingeAngle? HingeAngle { get; }

Property Value

HingeAngle

Motor

public LinearMotor? Motor { get; }

Property Value

LinearMotor

Slider

public PointOnLine Slider { get; }

Property Value

PointOnLine