FarseerPhysics.Dynamics.Joints.FixedPrismaticJoint.FixedPrismaticJoint C# (CSharp) Method

FixedPrismaticJoint() public method

This requires defining a line of motion using an axis and an anchor point. The definition uses local anchor points and a local axis so that the initial configuration can violate the constraint slightly. The joint translation is zero when the local anchor points coincide in world space. Using local anchors and a local axis helps when saving and loading a game.
public FixedPrismaticJoint ( Body body, System.Vector2 anchor, System.Vector2 axis ) : System
body Body The body.
anchor System.Vector2 The anchor.
axis System.Vector2 The axis.
return System
        public FixedPrismaticJoint(Body body, Vector2 anchor, Vector2 axis)
            : base(body)
        {
            JointType = JointType.FixedPrismatic;

            BodyB = BodyA;

            LocalAnchorA = anchor;
            LocalAnchorB = BodyB.GetLocalPoint(anchor);

            _localXAxis1 = axis;
            _localYAxis1 = MathUtils.Cross(1.0f, _localXAxis1);
            _refAngle = BodyB.Rotation;

            _limitState = LimitState.Inactive;
        }