/// <summary> /// Constructs a new constraint tries to rotate two entities so that they reach a specified relative orientation around an axis. /// </summary> /// <param name="connectionA">First connection of the pair.</param> /// <param name="connectionB">Second connection of the pair.</param> /// <param name="motorizedAxis">Rotation axis to control in world space.</param> public RevoluteMotor(Entity connectionA, Entity connectionB, Vector3f motorizedAxis) { ConnectionA = connectionA; ConnectionB = connectionB; SetupJointTransforms(motorizedAxis); settings = new MotorSettings1D(this); }
/// <summary> /// Constructs a new constraint which prevents the connected entities from twisting relative to each other. /// </summary> /// <param name="connectionA">First connection of the pair.</param> /// <param name="connectionB">Second connection of the pair.</param> /// <param name="axisA">Twist axis attached to the first connected entity.</param> /// <param name="axisB">Twist axis attached to the second connected entity.</param> public TwistMotor(Entity connectionA, Entity connectionB, Vector3f axisA, Vector3f axisB) { ConnectionA = connectionA; ConnectionB = connectionB; SetupJointTransforms(axisA, axisB); settings = new MotorSettings1D(this); }
/// <summary> /// Constrains anchors on two entities to move relative to each other on a line. /// </summary> /// <param name="connectionA">First connection of the pair.</param> /// <param name="connectionB">Second connection of the pair.</param> /// <param name="anchorA">World space point to attach to connection A that will be constrained.</param> /// <param name="anchorB">World space point to attach to connection B that will be constrained.</param> /// <param name="axis">Limited axis in world space to attach to connection A.</param> public LinearAxisMotor(Entity connectionA, Entity connectionB, Vector3f anchorA, Vector3f anchorB, Vector3f axis) { ConnectionA = connectionA; ConnectionB = connectionB; AnchorA = anchorA; AnchorB = anchorB; Axis = axis; settings = new MotorSettings1D(this); }
/// <summary> /// Constructs a new constraint tries to rotate two entities so that they reach a specified relative orientation around an axis. /// To finish the initialization, specify the connections (ConnectionA and ConnectionB) /// as well as the Basis and TestAxis. /// This constructor sets the constraint's IsActive property to false by default. /// </summary> public RevoluteMotor() { settings = new MotorSettings1D(this); IsActive = false; }
/// <summary> /// Constructs a new constraint which prevents the connected entities from twisting relative to each other. /// To finish the initialization, specify the connections (ConnectionA and ConnectionB) /// as well as the BasisA and BasisB. /// This constructor sets the constraint's IsActive property to false by default. /// </summary> public TwistMotor() { IsActive = false; settings = new MotorSettings1D(this); }
/// <summary> /// Constrains anchors on two entities to move relative to each other on a line. /// To finish the initialization, specify the connections (ConnectionA and ConnectionB) /// as well as the AnchorA, AnchorB and the Axis (or their entity-local versions). /// This constructor sets the constraint's IsActive property to false by default. /// </summary> public LinearAxisMotor() { settings = new MotorSettings1D(this); IsActive = false; }